1 { lib, stdenv, rustPlatform, fetchFromBitbucket, Libsystem, SystemConfiguration, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromBitbucket {
10 rev = "${pname}-${version}";
11 sha256 = "1fdnnx7d18gj4rkv1dc6q379dqabl66zks9i0rjarjwcci8m30d9";
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 [
33 installManPage $src/bore/doc/bore.1
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'
44 description = "DNS query tool";
45 homepage = "https://crates.io/crates/bore";
46 license = licenses.isc;
47 maintainers = [ maintainers.delan ];