git.iko.soy/typeable/cabal2nix
on master help sign in
Remove the cuda post-process hook, which is a total destaster of a hack.
commitb5143635f4de55ebac1e672a43013a083c1b04a8 authorPeter Simons <simons@cryp.to> dateWed 7 Jan 2015, 16:47 (12 years ago) parent44207c2
1 file changed−25
src/Cabal2Nix/PostProcess.hs−25
src/Cabal2Nix/PostProcess.hs−25
@@ -22,7 +22,6 @@ postProcess deriv@(MkDerivation {..})
2222 | pname == "cabal-bounds" = deriv { buildTools = "cabal-install":buildTools }
2323 | pname == "cabal-install" && version >= Version [0,14] []
2424 = deriv { phaseOverrides = cabalInstallPostInstall }
25− | pname == "cuda" = deriv { phaseOverrides = cudaConfigurePhase, extraLibs = "cudatoolkit":"nvidia_x11":"stdenv.cc":extraLibs }
2625 | pname == "darcs" = deriv { phaseOverrides = darcsInstallPostInstall }
2726 | pname == "dns" = deriv { testTarget = "spec" }
2827 | pname == "editline" = deriv { extraLibs = "libedit":extraLibs }
@@ -101,30 +100,6 @@ postProcess deriv@(MkDerivation {..})
101100 | pname == "xmonad" = deriv { phaseOverrides = xmonadPostInstall }
102101 | otherwise = deriv
103102
104−cudaConfigurePhase :: String
105−cudaConfigurePhase = unlines
106− [ "# The cudatoolkit provides both 64 and 32-bit versions of the"
107− , "# library. GHC's linker fails if the wrong version is found first."
108− , "# We solve this by eliminating lib64 from the path on 32-bit"
109− , "# platforms and putting lib64 first on 64-bit platforms."
110− , "configurePhase = ''"
111− , " for i in Setup.hs Setup.lhs; do"
112− , " test -f $i && ghc --make $i"
113− , " done"
114− , " for p in $extraBuildInputs $propagatedNativeBuildInputs; do"
115− , " if [ -d \"$p/include\" ]; then"
116− , " extraLibDirs=\"$extraLibDirs --extra-include-dir=$p/include\""
117− , " fi"
118− , " for d in ${if stdenv.is64bit then \"lib64 lib\" else \"lib\"}; do"
119− , " if [ -d \"$p/$d\" ]; then"
120− , " extraLibDirs=\"$extraLibDirs --extra-lib-dir=$p/$d\""
121− , " fi"
122− , " done"
123− , " done"
124− , " ./Setup configure --verbose --prefix=\"$out\" $libraryProfiling $extraLibDirs $configureFlags"
125− , "'';"
126− ]
127−
128103ghcModPostInstall :: String -> Version -> String
129104ghcModPostInstall pname version = unlines
130105 [ "configureFlags = \"--datasubdir=" ++ pname ++ "-" ++ display version ++ "\";"