Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.0 KiB
Nix
60 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
cmake,
|
|
pkg-config,
|
|
nlohmann_json,
|
|
spdlog,
|
|
argparse,
|
|
curl,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "d2hs";
|
|
version = "4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "neboer";
|
|
repo = "DNS2HostsSyncer";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-AYORL/efnE5OiRyVAFMlJUsbL1XBG6QAKjGWOYv+iEM=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
nlohmann_json
|
|
spdlog
|
|
argparse
|
|
curl
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 ./d2hs $out/bin/d2hs
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/Neboer/DNS2HostsSyncer";
|
|
description = "Small tool for periodically syncing dns records to hosts";
|
|
license = lib.licenses.gpl3Only;
|
|
platforms = lib.platforms.all;
|
|
maintainers = with lib.maintainers; [
|
|
peigongdsd
|
|
];
|
|
mainProgram = "d2hs";
|
|
};
|
|
})
|