build gozer flake

This commit is contained in:
wi11-holdsworth 2025-05-27 21:21:21 +10:00
parent bc6a65303a
commit ae7a72fb93
2 changed files with 71 additions and 0 deletions

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

44
flake.nix Normal file
View file

@ -0,0 +1,44 @@
{
description = "Gozer";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
allSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
"aarch64-linux" # 64-bit ARM Linux
"x86_64-darwin" # 64-bit Intel macOS
"aarch64-darwin" # 64-bit ARM macOS
];
forAllSystems =
f:
nixpkgs.lib.genAttrs allSystems (
system:
f {
pkgs = import nixpkgs { inherit system; };
}
);
in
{
packages = forAllSystems (
{ pkgs }:
{
default = pkgs.buildGoModule rec {
pname = "gozer";
version = "0.2.0";
src = pkgs.fetchFromGitHub {
owner = "dannyvankooten";
repo = "gozer";
tag = "${version}";
sha256 = "sha256-TTZM5sKTuN3FMcLTmdnSQKXTp8iiExDylC9FxnTfM3c=";
};
vendorHash = "sha256-PueVqanp3dAuB1RCtlAXpDki5Bj0lQQKj30BGWcuDII=";
};
}
);
};
}