From 53bf234c85b7e386d939ac5913366e9e97c8c47d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 19 Jul 2018 00:28:14 -0400 Subject: [PATCH] fortune: remove gcc from closure Fixup is only run on $out/bin not $out/games. Luckily fortune is relocatable so just moving it to $out/bin works & reduces closure size. --- pkgs/tools/misc/fortune/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix index 5e6db9fdc209..59c0396eebea 100644 --- a/pkgs/tools/misc/fortune/default.nix +++ b/pkgs/tools/misc/fortune/default.nix @@ -2,24 +2,25 @@ stdenv.mkDerivation { name = "fortune-mod-1.99.1"; - + src = fetchurl { url = http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_1.99.1.orig.tar.gz; sha256 = "1kpa2hgbglj5dbfasvl9wc1q3xpl91mqn3sfby46r4rwyzhswlgw"; }; - + buildInputs = [ recode ]; - + preConfigure = '' - sed -i "s|/usr/|$out/|" Makefile + sed -i "s|/usr/|$out/|" Makefile ''; preBuild = '' makeFlagsArray=("CC=$CC" "REGEXDEFS=-DHAVE_REGEX_H -DPOSIX_REGEX" "LDFLAGS=") ''; - + postInstall = '' - ln -s $out/games/fortune $out/bin/fortune + mv $out/games/fortune $out/bin/fortune + rmdir $out/games ''; meta = {