2023-08-17 03:27:04 +00:00
|
|
|
{
|
2023-12-20 23:00:48 +00:00
|
|
|
description = "{{description}}";
|
|
|
|
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs{{if unstable}}/nixpkgs-unstable{{end}}";
|
2023-08-17 03:27:04 +00:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
2023-12-20 23:00:48 +00:00
|
|
|
}: let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
builtins.map (
|
2023-08-17 03:27:04 +00:00
|
|
|
system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
2023-12-20 23:00:48 +00:00
|
|
|
{{if pname}}
|
|
|
|
packages.${system}.default = pkgs.buildGoModule {
|
|
|
|
pname = {{pname}};
|
|
|
|
version = {{version}};
|
|
|
|
src = ./.;
|
|
|
|
vendorHash = "";
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "{{description}}";
|
|
|
|
homepage = "{{url}}";
|
|
|
|
maintainers = with maintainers; [jolheiser];
|
|
|
|
mainProgram = "{{pname}}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
{{end}}
|
|
|
|
{{if packages}}
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
2023-08-17 03:27:04 +00:00
|
|
|
nativeBuildInputs = with pkgs; [
|
2023-08-20 19:31:11 +00:00
|
|
|
{{- range $pkg := (splitList "\n" packages)}}
|
2023-08-17 03:27:04 +00:00
|
|
|
{{trim $pkg}}
|
|
|
|
{{- end}}
|
|
|
|
];
|
|
|
|
};
|
2023-12-20 23:00:48 +00:00
|
|
|
{{end}}
|
2023-08-17 03:27:04 +00:00
|
|
|
}
|
2023-12-20 23:00:48 +00:00
|
|
|
)
|
|
|
|
systems;
|
|
|
|
}
|