depot/third_party/nixpkgs/pkgs/tools/system/nq/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

25 lines
670 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.linux;
maintainers = with maintainers; [ cstrahan ];
};
}