mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
Merge pull request #23607 from NixOS/haskell/justStaticExecutables
Haskell/just static executables
This commit is contained in:
commit
722b129652
@ -76,6 +76,14 @@ rec {
|
|||||||
fixupPhase = ":";
|
fixupPhase = ":";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# link executables statically against haskell libs to reduce closure size
|
||||||
|
justStaticExecutables = drv: overrideCabal drv (drv: {
|
||||||
|
enableSharedExecutables = false;
|
||||||
|
isLibrary = false;
|
||||||
|
doHaddock = false;
|
||||||
|
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
||||||
|
});
|
||||||
|
|
||||||
buildFromSdist = pkg: pkgs.lib.overrideDerivation pkg (drv: {
|
buildFromSdist = pkg: pkgs.lib.overrideDerivation pkg (drv: {
|
||||||
unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
|
unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
|
||||||
echo "Source tarball is at ${src}/${tarname}.tar.gz"
|
echo "Source tarball is at ${src}/${tarname}.tar.gz"
|
||||||
|
@ -3289,14 +3289,9 @@ with pkgs;
|
|||||||
|
|
||||||
pal = callPackage ../tools/misc/pal { };
|
pal = callPackage ../tools/misc/pal { };
|
||||||
|
|
||||||
pandoc = haskell.lib.overrideCabal haskellPackages.pandoc (drv: {
|
pandoc = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.pandoc) (drv: {
|
||||||
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
|
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
|
||||||
buildTools = drv.buildTools or [] ++ [haskellPackages.hsb2hs];
|
buildTools = drv.buildTools or [] ++ [haskellPackages.hsb2hs];
|
||||||
enableSharedExecutables = false;
|
|
||||||
enableSharedLibraries = false;
|
|
||||||
isLibrary = false;
|
|
||||||
doHaddock = false;
|
|
||||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share";
|
|
||||||
});
|
});
|
||||||
|
|
||||||
panomatic = callPackage ../tools/graphics/panomatic { };
|
panomatic = callPackage ../tools/graphics/panomatic { };
|
||||||
@ -5134,15 +5129,12 @@ with pkgs;
|
|||||||
|
|
||||||
cabal-install = haskell.lib.disableSharedExecutables haskellPackages.cabal-install;
|
cabal-install = haskell.lib.disableSharedExecutables haskellPackages.cabal-install;
|
||||||
|
|
||||||
stack = haskell.lib.overrideCabal haskellPackages.stack (drv: {
|
stack = haskell.lib.justStaticExecutables haskellPackages.stack;
|
||||||
enableSharedExecutables = false;
|
|
||||||
isLibrary = false;
|
|
||||||
doHaddock = false;
|
|
||||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
|
||||||
});
|
|
||||||
|
|
||||||
all-cabal-hashes = callPackage ../data/misc/hackage/default.nix { };
|
all-cabal-hashes = callPackage ../data/misc/hackage/default.nix { };
|
||||||
|
|
||||||
|
purescript = haskell.lib.justStaticExecutables haskellPackages.purescript;
|
||||||
|
|
||||||
inherit (ocamlPackages) haxe;
|
inherit (ocamlPackages) haxe;
|
||||||
|
|
||||||
hxcpp = callPackage ../development/compilers/haxe/hxcpp.nix { };
|
hxcpp = callPackage ../development/compilers/haxe/hxcpp.nix { };
|
||||||
@ -6758,12 +6750,7 @@ with pkgs;
|
|||||||
|
|
||||||
shards = callPackage ../development/tools/build-managers/shards { };
|
shards = callPackage ../development/tools/build-managers/shards { };
|
||||||
|
|
||||||
shellcheck = haskell.lib.overrideCabal haskellPackages.ShellCheck (drv: {
|
shellcheck = haskell.lib.justStaticExecutables haskellPackages.ShellCheck;
|
||||||
isLibrary = false;
|
|
||||||
enableSharedExecutables = false;
|
|
||||||
doHaddock = false;
|
|
||||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
|
||||||
});
|
|
||||||
|
|
||||||
shncpd = callPackage ../tools/networking/shncpd { };
|
shncpd = callPackage ../tools/networking/shncpd { };
|
||||||
|
|
||||||
@ -13027,13 +13014,8 @@ with pkgs;
|
|||||||
|
|
||||||
cyclone = callPackage ../applications/audio/pd-plugins/cyclone { };
|
cyclone = callPackage ../applications/audio/pd-plugins/cyclone { };
|
||||||
|
|
||||||
darcs = haskell.lib.overrideCabal haskellPackages.darcs (drv: {
|
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.darcs) (drv: {
|
||||||
configureFlags = (stdenv.lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
|
configureFlags = (stdenv.lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
|
||||||
enableSharedExecutables = false;
|
|
||||||
enableSharedLibraries = false;
|
|
||||||
isLibrary = false;
|
|
||||||
doHaddock = false;
|
|
||||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share";
|
|
||||||
});
|
});
|
||||||
|
|
||||||
darktable = callPackage ../applications/graphics/darktable {
|
darktable = callPackage ../applications/graphics/darktable {
|
||||||
|
Loading…
Reference in New Issue
Block a user