tmpls/template/pkgs/{{gitea_repo}}/default.nix

25 lines
571 B
Nix
Raw Normal View History

{ buildGoModule, fetchFromGitea, lib, ... }:
buildGoModule rec {
pname = "{{gitea_repo}}";
version = "{{version}}";
src = fetchFromGitea {
domain = "{{gitea_domain}}";
owner = "{{gitea_user}}";
repo = "{{gitea_repo}}";
rev = "v${version}";
sha256 = lib.fakeSha256;
};
vendorSha256 = lib.fakeSha256;
ldflags = [ "-s" "-w" "-X={{version_package}}.Version=${version}" ];
meta = with lib; {
description = "{{description}}";
homepage = "https://{{gitea_domain}}/{{gitea_user}}/{{gitea_repo}}";
license = licenses.mit;
};
}