about summary refs log tree commit diff
path: root/pkgs/by-name/xh/xhosts/package.nix
blob: ba6b5a184d3f76c5919e6f1cba4f775c5703cb72 (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
{ lib
, rustPlatform
, fetchFromGitHub
}:

rustPlatform.buildRustPackage {
  pname = "nss-xhosts";
  version = "unstable-2023-12-30";

  src = fetchFromGitHub {
    owner = "dvob";
    repo = "nss-xhosts";
    rev = "78658cc24abb2546936f2b298a27d4abdf629186";
    hash = "sha256-saK9CxN4Ek1QBlPOydzEFei1217gPe5MZrUaUHh80hI=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';

  postFixup = "mv $out/lib/*.so $out/lib/libnss_xhosts.so.2";

  meta = with lib; {
    description = "NSS Module which supports wildcards";
    homepage = "https://github.com/dvob/nss-xhosts";
    license = licenses.mit;
    maintainers = with maintainers; [ matthewcroughan ];
    mainProgram = "nss-xhosts";
  };
}