nixpkgs/pkgs/by-name/pa/payme/package.nix

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

42 lines
991 B
Nix
Raw Normal View History

2024-03-02 17:01:45 +00:00
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "payme";
2024-08-09 15:42:02 +00:00
version = "1.2.3";
2024-03-02 17:01:45 +00:00
src = fetchFromGitHub {
owner = "jovandeginste";
repo = "payme";
rev = "v${version}";
2024-08-09 15:42:02 +00:00
hash = "sha256-jkJGR6i68kNzA60T5ZOu2u+fPvZht4ssEtr8aYocGUk=";
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse HEAD > $out/COMMIT
2024-05-02 17:29:06 +00:00
TZ=UTC0 git show --quiet --date=iso-local --format=%cd > $out/BUILD_TIME
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
2024-03-02 17:01:45 +00:00
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X main.gitRefName=${src.rev}"
];
preBuild = ''
ldflags+=" -X main.gitCommit=$(cat COMMIT)"
2024-05-02 17:29:06 +00:00
ldflags+=" -X 'main.buildTime=$(cat BUILD_TIME)'"
'';
2024-03-02 17:01:45 +00:00
meta = {
description = "QR code generator (ASCII & PNG) for SEPA payments";
mainProgram = "payme";
2024-03-02 17:01:45 +00:00
homepage = "https://github.com/jovandeginste/payme";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cimm ];
};
}