Merge pull request #268588 from gernotfeichter/alp-1.1.9

alp: init at 1.1.17
This commit is contained in:
Emily Trau 2023-12-02 13:17:24 +11:00 committed by GitHub
commit f14bfcba0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 0 deletions

View File

@ -6555,6 +6555,12 @@
githubId = 67984144;
name = "Gerhard Schwanzer";
};
gernotfeichter = {
email = "gernotfeichter@gmail.com";
github = "gernotfeichter";
githubId = 23199375;
name = "Gernot Feichter";
};
gerschtli = {
email = "tobias.happ@gmx.de";
github = "Gerschtli";

View File

@ -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 ];
};
}