nixpkgs/pkgs/tools/system/nq/default.nix
Jelle Besseling 5cb8c9132f
Make nq available on macOS
Tested on macOS with NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1, builds and runs just fine
2021-01-28 15:18:15 +01:00

25 lines
668 B
Nix

{ stdenv, lib, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "nq";
version = "0.3.1";
src = fetchFromGitHub {
owner = "chneukirchen";
repo = "nq";
rev = "v${version}";
sha256 = "1db96ykz35r273jyhf7cdknqk4p2jj9l8gbz7pjy1hq4pb6ffk99";
};
makeFlags = [ "PREFIX=$(out)" ];
postPatch = ''
sed -i tq \
-e 's|\bfq\b|'$out'/bin/fq|g' \
-e 's|\bnq\b|'$out'/bin/nq|g'
'';
meta = with lib; {
description = "Unix command line queue utility";
homepage = "https://github.com/chneukirchen/nq";
license = licenses.publicDomain;
platforms = platforms.all;
maintainers = with maintainers; [ cstrahan ];
};
}