Files
nixpkgs/pkgs/servers/tang/default.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

78 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
asciidoc,
jansson,
jose,
http-parser,
systemd,
meson,
ninja,
makeWrapper,
testers,
tang,
gitUpdater,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "tang";
version = "15";
src = fetchFromGitHub {
owner = "latchset";
repo = "tang";
tag = "v${version}";
hash = "sha256-nlC2hdNzQZrfirjS2gX4oFp2OD1OdxmLsN03hfxD3ug=";
};
nativeBuildInputs = [
asciidoc
meson
ninja
pkg-config
makeWrapper
];
buildInputs = [
jansson
jose
http-parser
systemd
];
outputs = [
"out"
"man"
];
postFixup = ''
wrapProgram $out/bin/tang-show-keys --prefix PATH ":" ${lib.makeBinPath [ jose ]}
wrapProgram $out/libexec/tangd-keygen --prefix PATH ":" ${lib.makeBinPath [ jose ]}
wrapProgram $out/libexec/tangd-rotate-keys --prefix PATH ":" ${lib.makeBinPath [ jose ]}
'';
passthru = {
tests = {
inherit (nixosTests) tang;
version = testers.testVersion {
package = tang;
command = "${tang}/libexec/tangd --version";
version = "tangd ${version}";
};
};
updateScript = gitUpdater { };
};
meta = {
description = "Server for binding data to network presence";
homepage = "https://github.com/latchset/tang";
changelog = "https://github.com/latchset/tang/releases/tag/v${version}";
maintainers = with lib.maintainers; [ fpletz ];
license = lib.licenses.gpl3Plus;
mainProgram = "tangd";
};
}