3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/bore/default.nix
Artturin f4ea1208ec treewide: *Flags convert to list from str
*Flags implies a list

slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172

the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
2022-10-10 15:30:59 +03:00

49 lines
1.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv, rustPlatform, fetchFromBitbucket, llvmPackages, Libsystem, SystemConfiguration, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "bore";
version = "0.4.1";
src = fetchFromBitbucket {
owner = "delan";
repo = "nonymous";
rev = "${pname}-${version}";
sha256 = "1fdnnx7d18gj4rkv1dc6q379dqabl66zks9i0rjarjwcci8m30d9";
};
cargoSha256 = "1xlbfzmy0wjyz3jpr17r4ma4i79d9b32yqwwi10vrcjzr7vsyhmx";
cargoBuildFlags = [ "-p" pname ];
# FIXME cant test --all-targets and --doc in a single invocation
cargoTestFlags = [ "--all-targets" "--workspace" ];
checkFeatures = [ "std" ];
nativeBuildInputs = [ installShellFiles ]
++ lib.optional stdenv.isDarwin llvmPackages.libclang;
buildInputs = lib.optionals stdenv.isDarwin [
Libsystem
SystemConfiguration
];
LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";
postInstall = ''
installManPage $src/bore/doc/bore.1
'';
doInstallCheck = true;
installCheckPhase = ''
printf '\0\0\0\0\0\0\0\0\0\0\0\0' \
| $out/bin/bore --decode \
| grep -q ';; NoError #0 Query 0 0 0 0 flags'
'';
meta = with lib; {
description = "DNS query tool";
homepage = "https://crates.io/crates/bore";
license = licenses.isc;
maintainers = [ maintainers.delan ];
};
}