this repo has no description
1{
2 description = "Go example flake for Zero to Nix";
3
4 inputs = {
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 };
7
8 outputs =
9 { self, nixpkgs }:
10 let
11 # Systems supported
12 allSystems = [
13 "x86_64-linux" # 64-bit Intel/AMD Linux
14 "aarch64-linux" # 64-bit ARM Linux
15 "x86_64-darwin" # 64-bit Intel macOS
16 "aarch64-darwin" # 64-bit ARM macOS
17 ];
18
19 # Helper to provide system-specific attributes
20 forAllSystems =
21 f:
22 nixpkgs.lib.genAttrs allSystems (
23 system:
24 f {
25 pkgs = import nixpkgs { inherit system; };
26 }
27 );
28 in
29 {
30 packages = forAllSystems (
31 { pkgs }:
32 {
33 spindle-artifact = pkgs.buildGoModule {
34 name = "spindle-artifact";
35 src = self;
36 vendorHash = "sha256-Z1LxWHlFbVEXWXt+73lu6yMCXnJD/JhpVq/8AaE+08s=";
37 goSum = ./go.sum;
38
39 prePatch = ''
40 export HOME=$TMPDIR
41 '';
42 };
43 }
44 );
45 };
46}