about summary refs log tree commit diff
path: root/pkgs/tools/text/zstxtns-utils/default.nix
blob: 485a8b3a40d9d4f2da93f0ab8d0fbc249c598eb1 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ coreutils
, fetchurl
, gnugrep
, lib
, makeWrapper
, moreutils
, stdenvNoCC
}:

stdenvNoCC.mkDerivation rec {
  pname = "zstxtns-utils";
  version = "0.0.3";

  src = fetchurl {
    url = "https://ytrizja.de/distfiles/zstxtns-utils-${version}.tar.gz";
    sha256 = "I/Gm7vHUr29NClYWQ1kwu8HrNZpdLXfE/nutTNoqcdU=";
  };

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall
    install -D -t $out/bin zstxtns-merge zstxtns-unmerge
    runHook postInstall
  '';

  postInstall = ''
    wrapProgram $out/bin/zstxtns-merge --set PATH "${lib.makeBinPath [coreutils gnugrep moreutils]}"
    wrapProgram $out/bin/zstxtns-unmerge --set PATH "${lib.makeBinPath [coreutils gnugrep]}"
  '';

  meta = with lib; {
    description = "utilities to deal with text based name service databases";
    homepage = "https://ytrizja.de/";
    license = licenses.gpl3Plus;
    maintainers = [ ];
    platforms = platforms.all;
  };
}