flake: add nix package output

This commit is contained in:
2026-09-18 21:33:06 -07:00
parent c9e74b236d
commit f05139f6c1
+32
View File
@@ -0,0 +1,32 @@
{
description = "tracker: single-binary project tracker (hackerman edition)";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
tracker = pkgs.buildGoModule {
pname = "tracker";
version = "0.1.0";
src = self;
env.CGO_ENABLED = "0";
vendorHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
default = tracker;
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/tracker";
};
});
};
}