aboutsummaryrefslogtreecommitdiffstats
path: root/home/fast-p/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/fast-p/flake.nix')
-rw-r--r--home/fast-p/flake.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/home/fast-p/flake.nix b/home/fast-p/flake.nix
new file mode 100644
index 0000000..f12cd44
--- /dev/null
+++ b/home/fast-p/flake.nix
@@ -0,0 +1,49 @@
+{
+ description = "A Nix flake for building the fast-p Go binary";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
+ };
+
+ outputs =
+ { self, nixpkgs }:
+ let
+ # Support multiple systems
+ supportedSystems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ ];
+
+ # Helper function to generate outputs for each system
+ forEachSystem =
+ f:
+ nixpkgs.lib.genAttrs supportedSystems (
+ system:
+ f {
+ inherit system;
+ pkgs = nixpkgs.legacyPackages.${system};
+ }
+ );
+
+ in
+ {
+ packages = forEachSystem (
+ { system, pkgs }:
+ {
+ default = pkgs.buildGoModule {
+ pname = "fast-p";
+ version = "0.1.0";
+ src = ./.;
+ vendorHash = "sha256-/lKWY6NZrw8aGe1/R2jspT4EZQxAxP0ujckpwZQGn2w="; # Run `nix build` to get actual hash
+ };
+ }
+ );
+
+ devShells = forEachSystem (
+ { pkgs, ... }:
+ {
+ default = pkgs.mkShell { packages = with pkgs; [ go ]; };
+ }
+ );
+ };
+}