2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, asciidoc
|
|
|
|
, jansson
|
|
|
|
, jose
|
|
|
|
, http-parser
|
|
|
|
, systemd
|
|
|
|
, meson
|
|
|
|
, ninja
|
2023-07-15 17:15:38 +00:00
|
|
|
, makeWrapper
|
|
|
|
, testers
|
|
|
|
, tang
|
|
|
|
, gitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tang";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "latchset";
|
2023-03-04 12:14:45 +00:00
|
|
|
repo = "tang";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-QKURKb2g71pZvuZlJk3Rc26H3oU0WSkjgQtJQLrYGbw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2023-07-15 17:15:38 +00:00
|
|
|
makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
buildInputs = [
|
|
|
|
jansson
|
|
|
|
jose
|
|
|
|
http-parser
|
|
|
|
systemd
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +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 = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = tang;
|
|
|
|
command = "${tang}/libexec/tangd --version";
|
|
|
|
version = "tangd ${version}";
|
|
|
|
};
|
|
|
|
updateScript = gitUpdater { };
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Server for binding data to network presence";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/latchset/tang";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/latchset/tang/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ fpletz ];
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
}
|