diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-08 17:16:42 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-08 17:47:51 -0500 |
commit | a9924d7ab87235df86f6849ed53e9022f5b8e30e (patch) | |
tree | 9b5ef29b455c12d44d262cae4994e12f168d031d | |
parent | c86af902f443a7f0813467e734b0dcec92e9c2f9 (diff) |
libexecinfo: fix building statically
-rw-r--r-- | pkgs/development/libraries/libexecinfo/default.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/static.nix | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libexecinfo/default.nix b/pkgs/development/libraries/libexecinfo/default.nix index 147b213735db1..9c649c223c122 100644 --- a/pkgs/development/libraries/libexecinfo/default.nix +++ b/pkgs/development/libraries/libexecinfo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch }: +{ stdenv, fetchurl, fetchpatch, enableStatic ? true, enableShared ? true }: stdenv.mkDerivation rec { pname = "libexecinfo"; @@ -29,12 +29,19 @@ stdenv.mkDerivation rec { makeFlags = [ "CC:=$(CC)" "AR:=$(AR)" ]; + buildFlags = + stdenv.lib.optional enableStatic "static" + ++ stdenv.lib.optional enableShared "dynamic"; + patchFlags = [ "-p0" ]; installPhase = '' install -Dm644 execinfo.h stacktraverse.h -t $out/include - install -Dm755 libexecinfo.{a,so.1} -t $out/lib + '' + stdenv.lib.optionalString enableShared '' + install -Dm755 libexecinfo.so.1 -t $out/lib ln -s $out/lib/libexecinfo.so{.1,} + '' + stdenv.lib.optionalString enableStatic '' + install -Dm755 libexecinfo.a -t $out/lib ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index cd75209a9b98d..fcfe856398ef9 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -274,4 +274,6 @@ in { libev = super.libev.override { static = true; }; + + libexecinfo = super.libexecinfo.override { enableShared = false; }; } |