3
0
Fork 0
forked from mirrors/nixpkgs

tang: 13 -> 14

Add updater and basic version test
This commit is contained in:
Jean-François Roche 2023-06-19 10:43:10 +02:00
parent 7084250df3
commit 652c4994d4

View file

@ -9,17 +9,21 @@
, systemd , systemd
, meson , meson
, ninja , ninja
, makeWrapper
, testers
, tang
, gitUpdater
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "tang"; pname = "tang";
version = "13"; version = "14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "latchset"; owner = "latchset";
repo = "tang"; repo = "tang";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-SOdgMUWavTaDUiVvpEyE9ac+9aDmZs74n7ObugksBcc="; hash = "sha256-QKURKb2g71pZvuZlJk3Rc26H3oU0WSkjgQtJQLrYGbw=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -27,6 +31,7 @@ stdenv.mkDerivation rec {
meson meson
ninja ninja
pkg-config pkg-config
makeWrapper
]; ];
buildInputs = [ buildInputs = [
@ -41,6 +46,21 @@ stdenv.mkDerivation rec {
"man" "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.version = testers.testVersion {
package = tang;
command = "${tang}/libexec/tangd --version";
version = "tangd ${version}";
};
updateScript = gitUpdater { };
};
meta = { meta = {
description = "Server for binding data to network presence"; description = "Server for binding data to network presence";
homepage = "https://github.com/latchset/tang"; homepage = "https://github.com/latchset/tang";