Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
jolheiser | 5e15502da0 |
|
@ -1,6 +1,6 @@
|
||||||
# nixpkg template for [tmpl](https://git.jojodev.com/jolheiser/tmpl)
|
# tmpl templates
|
||||||
|
|
||||||
Starting at the root of your NUR, this template generates a pkg.
|
Check out the various branches for some basic examples of templates.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Delete this file and put something else here!
|
|
@ -1,24 +0,0 @@
|
||||||
{ 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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
25
tmpl.yaml
25
tmpl.yaml
|
@ -1,16 +1,11 @@
|
||||||
|
# tmpl.yaml
|
||||||
|
# Write any template args here to prompt the user for, giving any defaults/options as applicable
|
||||||
|
|
||||||
prompts:
|
prompts:
|
||||||
- id: gitea_domain
|
- id: name
|
||||||
label: Gitea Domain
|
label: Name
|
||||||
default: git.jojodev.com
|
default: MyProject
|
||||||
help: No protocol or trailing slash
|
- id: lang
|
||||||
- id: gitea_user
|
label: Language
|
||||||
label: Gitea User
|
default: Go
|
||||||
- id: gitea_repo
|
|
||||||
label: Gitea Repo
|
|
||||||
- id: version
|
|
||||||
label: Version
|
|
||||||
- id: version_package
|
|
||||||
label: Version Package
|
|
||||||
default: main
|
|
||||||
- id: description
|
|
||||||
label: Description
|
|
||||||
|
|
Loading…
Reference in New Issue