rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / tools / networking / bore / default.nix
blobabbbcc414751f913d90d31efd8dd9c452a76c4c1
1 { lib, stdenv, rustPlatform, fetchFromBitbucket, Libsystem, SystemConfiguration, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
4   pname = "bore";
5   version = "0.4.1";
7   src = fetchFromBitbucket {
8     owner = "delan";
9     repo = "nonymous";
10     rev = "${pname}-${version}";
11     sha256 = "1fdnnx7d18gj4rkv1dc6q379dqabl66zks9i0rjarjwcci8m30d9";
12   };
14   cargoSha256 = "1xlbfzmy0wjyz3jpr17r4ma4i79d9b32yqwwi10vrcjzr7vsyhmx";
15   cargoBuildFlags = [ "-p" pname ];
17   # error[E0793]: reference to packed field is unaligned
18   doCheck = !stdenv.isDarwin;
20   # FIXME can’t test --all-targets and --doc in a single invocation
21   cargoTestFlags = [ "--all-targets" "--workspace" ];
22   checkFeatures = [ "std" ];
24   nativeBuildInputs = [ installShellFiles ]
25     ++ lib.optional stdenv.isDarwin rustPlatform.bindgenHook;
27   buildInputs = lib.optionals stdenv.isDarwin [
28     Libsystem
29     SystemConfiguration
30   ];
32   postInstall = ''
33     installManPage $src/bore/doc/bore.1
34   '';
36   doInstallCheck = true;
37   installCheckPhase = ''
38     printf '\0\0\0\0\0\0\0\0\0\0\0\0' \
39     | $out/bin/bore --decode \
40     | grep -q ';; NoError #0 Query 0 0 0 0 flags'
41   '';
43   meta = with lib; {
44     description = "DNS query tool";
45     homepage = "https://crates.io/crates/bore";
46     license = licenses.isc;
47     maintainers = [ maintainers.delan ];
48     mainProgram = "bore";
49   };