2023-03-01 22:28:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, asciidoc
|
|
|
|
, jansson
|
|
|
|
, jose
|
|
|
|
, http-parser
|
|
|
|
, systemd
|
|
|
|
, meson
|
|
|
|
, ninja
|
2023-06-19 08:43:10 +00:00
|
|
|
, makeWrapper
|
|
|
|
, testers
|
|
|
|
, tang
|
|
|
|
, gitUpdater
|
2023-10-16 11:10:15 +00:00
|
|
|
, nixosTests
|
2020-02-09 17:40:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tang";
|
2024-02-22 03:45:15 +00:00
|
|
|
version = "15";
|
2020-02-09 17:40:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "latchset";
|
2023-03-01 22:28:26 +00:00
|
|
|
repo = "tang";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-22 03:45:15 +00:00
|
|
|
hash = "sha256-nlC2hdNzQZrfirjS2gX4oFp2OD1OdxmLsN03hfxD3ug=";
|
2020-02-09 17:40:03 +00:00
|
|
|
};
|
|
|
|
|
2023-03-01 22:28:26 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2023-06-19 08:43:10 +00:00
|
|
|
makeWrapper
|
2020-02-09 17:40:03 +00:00
|
|
|
];
|
|
|
|
|
2023-03-01 22:28:26 +00:00
|
|
|
buildInputs = [
|
|
|
|
jansson
|
|
|
|
jose
|
|
|
|
http-parser
|
|
|
|
systemd
|
|
|
|
];
|
2020-02-09 17:40:03 +00:00
|
|
|
|
2023-03-01 22:28:26 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
2020-02-09 17:40:03 +00:00
|
|
|
|
2023-06-19 08:43:10 +00:00
|
|
|
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 = {
|
2023-10-16 11:10:15 +00:00
|
|
|
tests = {
|
|
|
|
inherit (nixosTests) tang;
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = tang;
|
|
|
|
command = "${tang}/libexec/tangd --version";
|
|
|
|
version = "tangd ${version}";
|
|
|
|
};
|
2023-06-19 08:43:10 +00:00
|
|
|
};
|
|
|
|
updateScript = gitUpdater { };
|
|
|
|
};
|
|
|
|
|
2020-02-09 17:40:03 +00:00
|
|
|
meta = {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Server for binding data to network presence";
|
2020-02-09 17:40:03 +00:00
|
|
|
homepage = "https://github.com/latchset/tang";
|
2023-03-01 22:28:26 +00:00
|
|
|
changelog = "https://github.com/latchset/tang/releases/tag/v${version}";
|
2020-02-09 17:40:03 +00:00
|
|
|
maintainers = with lib.maintainers; [ fpletz ];
|
|
|
|
license = lib.licenses.gpl3Plus;
|
2023-10-16 11:10:15 +00:00
|
|
|
mainProgram = "tangd";
|
2020-02-09 17:40:03 +00:00
|
|
|
};
|
|
|
|
}
|