git.iko.soy/typeable/cabal2nix
on master help sign in
Link stack statically to improve start-up performance.
772d150Peter Simons
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+5−4
@@ -59,7 +59,7 @@ hooks =
59 , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
59 , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
60 , ("readline", over (libraryDepends . system) (Set.union (pkgs ["readline", "ncurses"])))
60 , ("readline", over (libraryDepends . system) (Set.union (pkgs ["readline", "ncurses"])))
61 , ("rocksdb-haskell", set (metaSection . platforms) (Set.singleton (Platform X86_64 Linux)))
61 , ("rocksdb-haskell", set (metaSection . platforms) (Set.singleton (Platform X86_64 Linux)))
62− , ("stack", set phaseOverrides stackPostInstall)
62+ , ("stack", set phaseOverrides stackOverrides)
63 , ("target", set (testDepends . system . contains (pkg "z3")) True)
63 , ("target", set (testDepends . system . contains (pkg "z3")) True)
64 , ("terminfo", set (libraryDepends . system . contains (pkg "ncurses")) True)
64 , ("terminfo", set (libraryDepends . system . contains (pkg "ncurses")) True)
65 , ("thyme", set (libraryDepends . tool . contains (bind "self.cpphs")) True) -- required on Darwin
65 , ("thyme", set (libraryDepends . tool . contains (bind "self.cpphs")) True) -- required on Darwin
@@ -167,9 +167,10 @@ agdaPostInstall = unlines
167 , "'';"
167 , "'';"
168 ]
168 ]
169
169
170−stackPostInstall :: String
170+stackOverrides :: String
171−stackPostInstall = unlines
171+stackOverrides = unlines
172+ [ "enableSharedExecutables = false;"
172− [ "postInstall = ''"
173+ , "postInstall = ''"
173 , " exe=$out/bin/stack"
174 , " exe=$out/bin/stack"
174 , " mkdir -p $out/share/bash-completion/completions"
175 , " mkdir -p $out/share/bash-completion/completions"
175 , " $exe --bash-completion-script $exe >$out/share/bash-completion/completions/stack"
176 , " $exe --bash-completion-script $exe >$out/share/bash-completion/completions/stack"