3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/text/gawk/gawk-with-extensions.nix

14 lines
356 B
Nix
Raw Normal View History

{ runCommand, gawk, extensions, makeWrapper }:
runCommand "gawk-with-extensions" {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ gawk ] ++ extensions;
} ''
mkdir -p $out/bin
for i in ${gawk}/bin/*; do
name="$(basename "$i")"
makeWrapper $i $out/bin/$name \
--prefix AWKLIBPATH : "${gawk}/lib/gawk:''${AWKLIBPATH:-}"
done
''