git.iko.soy/typeable/cabal2nix
on master help sign in
hmatrix-special: drop hard-coded /usr path from cabal file

The prior code did a sed substitution of the dangerous /usr/ path in hmatrix.cabal with a safer /dont/hardcode/path one. That's fine for compilation of hmatrix, but hmatrix-special (which depends on hmatrix) then fails to compile because an impure (outside /nix/store) link is detected. So this commit deletes the problematic reference in hmatrix.cabal, rather than substitute it. Fixes https://github.com/NixOS/cabal2nix/issues/307. Closes https://github.com/NixOS/cabal2nix/pull/308.

commit50aa754ac568b6bac1f6015babff0a29cafe7b89 authorSukant Hajra <rrudbskr5g@snkmail.com> dateSat 21 Oct 2017, 23:38 (9 years ago) parent404d240
1 file changed+1−1
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+1−1
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+1−1
@@ -75,7 +75,7 @@ hooks =
7575 , ("hfsevents", hfseventsOverrides)
7676 , ("HFuse", set phaseOverrides hfusePreConfigure)
7777 , ("hlibgit2 >= 0.18.0.14", set (testDepends . tool . contains (pkg "git")) True)
78− , ("hmatrix", set phaseOverrides "preConfigure = \"sed -i hmatrix.cabal -e 's@/usr/@/dont/hardcode/paths/@'\";")
78+ , ("hmatrix", set phaseOverrides "preConfigure = \"sed -i hmatrix.cabal -e '/\\\\/usr\\\\//D'\";")
7979 , ("holy-project", set doCheck False) -- attempts to access the network
8080 , ("hoogle", set testTarget "--test-option=--no-net")
8181 , ("hsignal < 0.2.7.4", set phaseOverrides "prePatch = \"rm -v Setup.lhs\";") -- https://github.com/amcphail/hsignal/issues/1