diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-07 14:04:47 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-07 14:04:47 +0100 |
commit | ba08e4e99b00a6916c4360de7288a7bfcef85328 (patch) | |
tree | 347c8b6ad50fcaafc08e50f1307a861378650440 /nixpkgs/pkgs/by-name/al | |
parent | 190fd93d11701ad81af757be6260df9635bdb41a (diff) | |
parent | 2c7f3c0fb7c08a0814627611d9d7d45ab6d75335 (diff) | |
download | nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.gz nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.bz2 nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.lz nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.xz nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.zst nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/al')
-rw-r--r-- | nixpkgs/pkgs/by-name/al/alp/package.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/al/alp/package.nix b/nixpkgs/pkgs/by-name/al/alp/package.nix new file mode 100644 index 000000000000..34bc447ed6d5 --- /dev/null +++ b/nixpkgs/pkgs/by-name/al/alp/package.nix @@ -0,0 +1,56 @@ +{ stdenv +, lib +, buildGoModule +, fetchFromGitHub +, runCommand +, alp +}: + +buildGoModule rec { + pname = "alp"; + version = "1.1.17"; + + src = fetchFromGitHub { + owner = "gernotfeichter"; + repo = "alp"; + rev = version; + hash = "sha256-7lyWu1bVn7UwLb/Em6VBbg3FrMyxGjebxt5gJhm/xpI="; + }; + vendorHash = "sha256-a2CQZKN/rPWh/Pn9gXfSArTCcGST472tsz1Kqm7M4vM="; + + sourceRoot = "${src.name}/linux"; + + # Executing Go commands directly in checkPhase and buildPhase below, + # because the default testsuite runs all go tests, some of which require docker. + # Docker is too expensive for https://github.com/NixOS/ofborg. + checkPhase = '' + runHook preCheck + + go test -run Test_main_init + + runHook postCheck + ''; + + buildPhase = '' + runHook preBuild + + go build -o $GOPATH/bin/${pname} main.go + + runHook postBuild + ''; + + passthru.tests = { + test-version = runCommand "${pname}-test" {} '' + ${alp}/bin/alp version > $out + cat $out | grep '${version}' + ''; + }; + + meta = with lib; { + description = "A convenient authentication method that lets you use your android device as a key for your Linux machine"; + homepage = "https://github.com/gernotfeichter/alp"; + license = licenses.gpl2Only; + mainProgram = "alp"; + maintainers = with maintainers; [ gernotfeichter ]; + }; +} |