2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, yacc }:
|
2017-07-27 15:06:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-07 17:01:42 +01:00
|
|
|
pname = "nawk";
|
|
|
|
version = "20180827";
|
2017-07-27 15:06:01 +01:00
|
|
|
|
2020-05-07 17:01:42 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "onetrueawk";
|
|
|
|
repo = "awk";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0qcsxhcwg6g3c0zxmbipqa8d8d5n8zxrq0hymb8yavsaz103fcl6";
|
2017-07-27 15:06:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ yacc ];
|
|
|
|
|
|
|
|
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).
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.cs.princeton.edu/~bwk/btl.mirror/";
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.konimex ];
|
|
|
|
platforms = lib.platforms.linux;
|
2017-07-27 15:06:01 +01:00
|
|
|
};
|
|
|
|
}
|