1 { lib, stdenv, rustPlatform, fetchFromBitbucket, Libsystem, SystemConfiguration, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromBitbucket {
10 rev = "${pname}-${version}";
11 sha256 = "1fdnnx7d18gj4rkv1dc6q379dqabl66zks9i0rjarjwcci8m30d9";
14 cargoHash = "sha256-vUKv98lfsrxBiJxjL8ZKLZ1IVCX5hHzl+F5y4Ot3i/Y=";
15 cargoBuildFlags = [ "-p" pname ];
17 # error[E0793]: reference to packed field is unaligned
18 doCheck = !stdenv.hostPlatform.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.hostPlatform.isDarwin rustPlatform.bindgenHook;
27 buildInputs = lib.optionals stdenv.hostPlatform.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;
49 broken = stdenv.hostPlatform.isDarwin; # bindgen fails on: "in6_addr_union_(...)" is not a valid Ident