1{ lib
2, stdenv
3, fetchFromGitHub
4, rustPlatform
5, nix-gitignore
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "nsncd";
10 version = "unstable-2024-03-18";
11
12 src = fetchFromGitHub {
13 owner = "twosigma";
14 repo = "nsncd";
15 rev = "7605e330d5a313a8656e6fcaf1c10cd6b5cdd427";
16 hash = "sha256-Bd7qE9MP5coBCkr70TdoJfwYhQpdrn/zmN4KoARcaMI=";
17 };
18
19 cargoHash = "sha256-i1rmc5wxtc631hZy2oM4d6r7od0w8GrG7+/pdM6Gqco=";
20 checkFlags = [
21 # Relies on the test environment to be able to resolve "localhost"
22 # on IPv4. That's not the case in the Nix sandbox somehow. Works
23 # when running cargo test impurely on a (NixOS|Debian) machine.
24 "--skip=ffi::test_gethostbyname2_r"
25 ];
26
27 meta = with lib; {
28 description = "Name service non-caching daemon";
29 mainProgram = "nsncd";
30 longDescription = ''
31 nsncd is a nscd-compatible daemon that proxies lookups, without caching.
32 '';
33 homepage = "https://github.com/twosigma/nsncd";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ flokli picnoir ];
36 # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
37 broken = stdenv.isDarwin;
38 };
39}