nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 gitUpdater,
6 versionCheckHook,
7}:
8
9buildGoModule (finalAttrs: {
10 pname = "tkey-ssh-agent";
11 version = "1.0.0";
12
13 src = fetchFromGitHub {
14 owner = "tillitis";
15 repo = "tkey-ssh-agent";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-Uf3VJJfZn4UYX1q79JdaOfrore+L/Mic3whzpP32JV0=";
18 };
19
20 vendorHash = "sha256-SFyp1UB6+m7/YllRyY56SwweJ3X175bChXQYiG2M7zM=";
21
22 subPackages = [
23 "cmd/tkey-ssh-agent"
24 ];
25
26 ldflags = [
27 "-w"
28 "-X main.version=${finalAttrs.version}"
29 ];
30
31 passthru = {
32 updateScript = gitUpdater { rev-prefix = "v"; };
33 };
34
35 nativeInstallCheckInputs = [
36 versionCheckHook
37 ];
38 doInstallCheck = true;
39
40 meta = {
41 description = "SSH Agent for TKey, the flexible open hardware/software USB security key";
42 homepage = "https://tillitis.se/app/tkey-ssh-agent/";
43 changelog = "https://github.com/tillitis/tkey-ssh-agent/releases/tag/v${finalAttrs.version}";
44 license = lib.licenses.gpl2;
45 maintainers = with lib.maintainers; [ bbigras ];
46 mainProgram = "tkey-ssh-agent";
47 platforms = lib.platforms.all;
48 };
49})