Merge pull request #314720 from tie/remove-gawkbug

gawk: move gawkbug to gawkInteractive

authored by philiptaron.tngl.sh and committed by GitHub fa70b505 8a977702

+23 -7
+23 -7
pkgs/tools/text/gawk/default.nix
··· 1 1 { lib, stdenv, fetchurl 2 + , removeReferencesTo 2 3 , runtimeShellPackage 3 4 # TODO: links -lsigsegv but loses the reference for some reason 4 5 , withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv ··· 36 37 outputs = [ "out" "info" ] 37 38 ++ lib.optional (!interactive) "man"; 38 39 40 + strictDeps = true; 41 + 39 42 # no-pma fix 40 - nativeBuildInputs = [ autoreconfHook ] 41 - ++ lib.optional (doCheck && stdenv.isLinux) glibcLocales; 43 + nativeBuildInputs = [ 44 + autoreconfHook 45 + ] ++ lib.optionals interactive [ 46 + removeReferencesTo 47 + ] ++ lib.optionals (doCheck && stdenv.isLinux) [ 48 + glibcLocales 49 + ]; 42 50 43 - buildInputs = [ 51 + buildInputs = lib.optionals interactive [ 44 52 runtimeShellPackage 45 - ] ++ lib.optional withSigsegv libsigsegv 46 - ++ lib.optional interactive readline 47 - ++ lib.optional stdenv.isDarwin locale; 53 + readline 54 + ] ++ lib.optionals withSigsegv [ 55 + libsigsegv 56 + ] ++ lib.optionals stdenv.isDarwin [ 57 + locale 58 + ]; 48 59 49 60 configureFlags = [ 50 61 (if withSigsegv then "--with-libsigsegv-prefix=${libsigsegv}" else "--without-libsigsegv") ··· 57 68 58 69 inherit doCheck; 59 70 60 - postInstall = '' 71 + postInstall = (if interactive then '' 72 + remove-references-to -t "$NIX_CC" "$out"/bin/gawkbug 73 + patchShebangs --host "$out"/bin/gawkbug 74 + '' else '' 75 + rm "$out"/bin/gawkbug 76 + '') + '' 61 77 rm "$out"/bin/gawk-* 62 78 ln -s gawk.1 "''${!outputMan}"/share/man/man1/awk.1 63 79 '';