1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-21 21:54:10 +00:00
nixpkgs/pkgs/tools/text/gawk/gawk-with-extensions.nix
tomberek 774ad67ce0 gawkextlib: init at unstable-2019-11-21 (#51721)
Co-Authored-By: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
2019-12-07 20:07:33 -05:00

13 lines
329 B
Nix

{ runCommand, gawk, extensions, makeWrapper }:
runCommand "gawk-with-extensions" {
buildInputs = [ makeWrapper 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
''