diff options
Diffstat (limited to 'pkgs/tools/compression/bzip2/default.nix')
-rw-r--r-- | pkgs/tools/compression/bzip2/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index bb04049d8a66..ea2ee660a2ce 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -37,6 +37,8 @@ in stdenv.mkDerivation { postInstall = ""; }; + outputs = [ "dev" "bin" "static" ] ++ stdenv.lib.optional sharedLibrary "out"; + preBuild = stdenv.lib.optionalString sharedLibrary '' make -f Makefile-libbz2_so ''; @@ -50,12 +52,15 @@ in stdenv.mkDerivation { ) ''; - installFlags = [ "PREFIX=$(out)" ]; + installFlags = [ "PREFIX=$(bin)" ]; postInstall = '' - rm $out/bin/bunzip2* $out/bin/bzcat* - ln -s bzip2 $out/bin/bunzip2 - ln -s bzip2 $out/bin/bzcat + rm $bin/bin/bunzip2* $bin/bin/bzcat* + ln -s bzip2 $bin/bin/bunzip2 + ln -s bzip2 $bin/bin/bzcat + + mkdir "$static" + mv "$bin/lib" "$static/" ''; patchPhase = '' |