git.iko.soy/nixpkgs-stackage
on master help sign in
stackage2nix-static disable-shared
commit3fa9589bd5491e9e6da81112aa90a283dbd979fa authorDmitry Bushev <bushevdv@gmail.com> dateWed 17 Jan 2018, 11:01 (9 years ago) parent8a67951
1 file changed+10−10
default.nix+10−10
default.nix+10−10
@@ -26,8 +26,11 @@ in {
2626
2727 stackage2nix-static = super.callPackage ./stackage2nix {
2828 stackage2nix =
29− let
30− staticConfigureFlags = super.lib.concatStringsSep " " [
29+ (self.haskell.packages.stackage.lts-100.callPackage ./stackage2nix/stackage2nix.nix {}).overrideAttrs (attrs: {
30+ enableSharedExecutables = false;
31+ enableSharedLibraries = false;
32+ configureFlags = [
33+ "--disable-shared"
3134 "--ghc-option=-optl=-static"
3235 "--ghc-option=-optl=-pthread"
3336 "--ghc-option=-optl=-L${super.glibc.static}/lib"
@@ -35,12 +38,9 @@ in {
3538 "--ghc-option=-optl=-L${self.icu-static.static}/lib"
3639 "--ghc-option=-optl=-L${self.openssl-static.static}/lib"
3740 "--ghc-option=-optl=-L${super.zlib.static}/lib"
41+ "--ghc-option=-fPIC"
3842 ];
39− buildStaticExecutable = drv:
40− super.haskell.lib.appendConfigureFlag (super.haskell.lib.disableSharedExecutables drv) staticConfigureFlags;
41− in
42− buildStaticExecutable
43− (self.haskell.packages.stackage.lts-100.callPackage ./stackage2nix/stackage2nix.nix{});
43+ });
4444 cacheVersion = builtins.readFile ./cache-version.txt;
4545 };
4646
@@ -50,7 +50,7 @@ in {
5050 outputs = attrs.outputs ++ [ "static" ];
5151 postInstall = ''
5252 moveToOutput "lib/*.a" "$static"
53− '' + attrs.postInstall;
53+ '' + (if attrs ? postInstall then attrs.postInstall else "");
5454 });
5555
5656 openssl-static = super.openssl.overrideAttrs (attrs: {
@@ -58,8 +58,8 @@ in {
5858 outputs = attrs.outputs ++ [ "static" ];
5959 postInstall = ''
6060 mkdir -p $static/lib;
61− moveToOutput "*.a" "$static/lib";
62− '' + attrs.postInstall;
61+ cp -v *.a $static/lib;
62+ '' + (if attrs ? postInstall then attrs.postInstall else "");
6363 });
6464
6565}