3
0
Fork 0
forked from mirrors/nixpkgs

phylactery: use buildGoModule (#208980)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Aaron Jheng 2023-01-27 07:13:00 +08:00 committed by GitHub
parent e0d9cff058
commit 1771b6692c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View file

@ -1,20 +1,24 @@
{ lib, buildGoPackage, fetchFromSourcehut, nixosTests }:
{ lib, buildGoModule, fetchFromSourcehut, nixosTests }:
buildGoPackage rec {
buildGoModule rec {
pname = "phylactery";
version = "0.1.2";
goPackagePath = "git.sr.ht/~cnx/phylactery";
src = fetchFromSourcehut {
owner = "~cnx";
repo = pname;
rev = version;
sha256 = "sha256-HQN6wJ/4YeuQaDcNgdHj0RgYnn2NxXGRfxybmv60EdQ=";
hash = "sha256-HQN6wJ/4YeuQaDcNgdHj0RgYnn2NxXGRfxybmv60EdQ=";
};
# Upstream repo doesn't provide any test.
doCheck = false;
vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
preBuild = ''
cp ${./go.mod} go.mod
'';
ldflags = [ "-s" "-w" ];
passthru.tests.phylactery = nixosTests.phylactery;
meta = with lib; {

View file

@ -0,0 +1,3 @@
module git.sr.ht/~cnx/phylactery
go 1.18