summary refs log tree commit diff
path: root/pkgs/tools/system/nq/default.nix
blob: 239ac1368ad6821576cf3d5a2e65e56e86814ee6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ stdenv, lib, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "nq";
  version = "0.4";
  src = fetchFromGitHub {
    owner = "chneukirchen";
    repo = "nq";
    rev = "v${version}";
    sha256 = "sha256-UfCeHwOD+tG6X2obW64DYZr6j90yh1Yl7My4ur+sqmk=";
  };
  makeFlags = [ "PREFIX=$(out)" ];
  postPatch = ''
    sed -i tq \
      -e 's|\bnq\b|'$out'/bin/nq|g' \
      -e 's|\bfq\b|'$out'/bin/fq|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 ];
  };
}