summary refs log tree commit diff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-07-28 16:08:30 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-07-28 16:08:30 +0200
commitb116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed (patch)
treeff5748c1ec96643e47dcdeaa5def1aa950a913ce /pkgs/tools/text
parent9be40841ea4251a09ae7a1023abc1b6d191f61bb (diff)
parent20d2bfa4ff247a49f50fc0cf4d509fbd48723290 (diff)
downloadnixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar.gz
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar.bz2
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar.lz
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar.xz
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.tar.zst
nixlib-b116fa5ff2a832b24ffbc3ed3fa703ca6bf904ed.zip
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/tools/text')
-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;
+  };
+}