
Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format. It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input: xargs sed -i 's/^\(. *\)\(cargoHash\)\b/\1useFetchCargoVendor = true;\n\1cargoHash/' cut -d / -f 4 | xargs -n 1 nix-update --version=skip This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, pkg-config
|
|
, openssl
|
|
, pandoc
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "dogedns";
|
|
version = "0.2.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Dj-Codeman";
|
|
repo = "doge";
|
|
rev = "v${version}";
|
|
hash = "sha256-3wOka+MKSy2x3100eF0d9A5Jc0qFSNCiLsisHO1Uldc=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-9Qm93Hmxutmg3oCXSVrCUAYA2W4gXR/LPC5zZ34x5jQ=";
|
|
|
|
patches = [
|
|
# remove date info to make the build reproducible
|
|
# remove commit hash to avoid dependency on git and the need to keep `.git`
|
|
./remove-date-info.patch
|
|
];
|
|
|
|
checkFlags = [
|
|
"--skip=options::test::all_mixed_3"
|
|
"--skip=options::test::domain_and_class"
|
|
"--skip=options::test::domain_and_class_lowercase"
|
|
"--skip=options::test::domain_and_nameserver"
|
|
"--skip=options::test::domain_and_single_domain"
|
|
"--skip=options::test::just_domain"
|
|
"--skip=options::test::just_named_domain"
|
|
"--skip=options::test::two_classes"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles pandoc ]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion completions/doge.{bash,fish,zsh}
|
|
installManPage ./target/man/*.1
|
|
'';
|
|
|
|
meta = {
|
|
description = "Reviving a command-line DNS client";
|
|
homepage = "https://github.com/Dj-Codeman/doge";
|
|
license = lib.licenses.eupl12;
|
|
mainProgram = "doge";
|
|
maintainers = with lib.maintainers; [ aktaboot ];
|
|
};
|
|
}
|