nixpkgs/pkgs/servers/tang/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, asciidoc
, jansson
, jose
, http-parser
, systemd
, meson
, ninja
, makeWrapper
, testers
, tang
, gitUpdater
, nixosTests
2020-02-09 17:40:03 +00:00
}:
stdenv.mkDerivation rec {
pname = "tang";
version = "14";
2020-02-09 17:40:03 +00:00
src = fetchFromGitHub {
owner = "latchset";
repo = "tang";
rev = "refs/tags/v${version}";
hash = "sha256-QKURKb2g71pZvuZlJk3Rc26H3oU0WSkjgQtJQLrYGbw=";
2020-02-09 17:40:03 +00:00
};
nativeBuildInputs = [
asciidoc
meson
ninja
pkg-config
makeWrapper
2020-02-09 17:40:03 +00:00
];
buildInputs = [
jansson
jose
http-parser
systemd
];
2020-02-09 17:40:03 +00:00
outputs = [
"out"
"man"
];
2020-02-09 17:40:03 +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 = {
inherit (nixosTests) tang;
version = testers.testVersion {
package = tang;
command = "${tang}/libexec/tangd --version";
version = "tangd ${version}";
};
};
updateScript = gitUpdater { };
};
2020-02-09 17:40:03 +00:00
meta = {
description = "Server for binding data to network presence";
2020-02-09 17:40:03 +00:00
homepage = "https://github.com/latchset/tang";
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;
mainProgram = "tangd";
2020-02-09 17:40:03 +00:00
};
}