summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMuhammad Herdiansyah <herdiansyah@openmailbox.org>2017-07-27 21:06:01 +0700
committerMuhammad Herdiansyah <herdiansyah@openmailbox.org>2017-07-27 21:51:10 +0700
commitd31e7ee1bdddde42fcc7f38b9c88b485a1760efb (patch)
tree2efa8a7ce5e6669cc579ed600d5a90640478b878 /pkgs/tools
parenta905b7cd0c2dc0714195a50bf176cd8e4593502d (diff)
downloadnixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar.gz
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar.bz2
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar.lz
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar.xz
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.tar.zst
nixlib-d31e7ee1bdddde42fcc7f38b9c88b485a1760efb.zip
nawk: init at 20121220
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/text/nawk/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/text/nawk/default.nix b/pkgs/tools/text/nawk/default.nix
new file mode 100644
index 000000000000..d3056735b8d1
--- /dev/null
+++ b/pkgs/tools/text/nawk/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, yacc }:
+
+stdenv.mkDerivation rec {
+  name = "nawk-20121220";
+
+  src = fetchurl {
+    url = "https://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz";
+    sha256 = "10wvdn7xwc5bbp5h7l0b9fxby3bds21n8a34z54i8kjsbhb95h4d";
+  };
+
+  nativeBuildInputs = [ yacc ];
+
+  unpackPhase = ''
+    mkdir build
+    cd build
+    tar xvf ${src}
+  '';
+
+  patchPhase = ''
+    substituteInPlace ./makefile \
+    --replace "YACC = yacc -d -S" ""
+  '';
+
+  installPhase = ''
+    install -Dm755 a.out "$out/bin/nawk"
+    install -Dm644 awk.1 "$out/share/man/man1/nawk.1"
+  '';
+
+  meta = {
+    description = "The one, true implementation of AWK";
+    longDescription = ''
+       This is the version of awk described in "The AWK Programming
+       Language", by Al Aho, Brian Kernighan, and Peter Weinberger
+       (Addison-Wesley, 1988, ISBN 0-201-07981-X).
+    '';
+    homepage = https://www.cs.princeton.edu/~bwk/btl.mirror/;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.konimex ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}