about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.lock34
-rw-r--r--flake.nix17
2 files changed, 43 insertions, 8 deletions
diff --git a/flake.lock b/flake.lock
index 55fffc0..5497fb5 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,23 @@
 {
   "nodes": {
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1749285348,
@@ -64,12 +82,28 @@
     },
     "root": {
       "inputs": {
+        "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs",
         "pyproject-build-systems": "pyproject-build-systems",
         "pyproject-nix": "pyproject-nix",
         "uv2nix": "uv2nix"
       }
     },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
     "uv2nix": {
       "inputs": {
         "nixpkgs": [
diff --git a/flake.nix b/flake.nix
index ceb084f..aaabb54 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,8 @@
 	inputs = {
 		nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
 
+		flake-utils.url = "github:numtide/flake-utils";
+
 		pyproject-nix = {
 			url = "github:pyproject-nix/pyproject.nix";
 			inputs.nixpkgs.follows = "nixpkgs";
@@ -27,14 +29,13 @@
 		self,
 		uv2nix,
 		nixpkgs,
+		flake-utils,
 		pyproject-nix,
 		pyproject-build-systems,
 		...
 	}:
+	flake-utils.lib.eachDefaultSystem (system:
 	let
-		# Define system arch
-		system = "aarch64-darwin";
-
 		# Refine nixpkgs used in flake to system arch
 		pkgs = import nixpkgs {
 			inherit system;
@@ -59,7 +60,7 @@
 			miasm = super.miasm.overrideAttrs (old: {
 				nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.setuptools ];
 			});
-			python-cpuid = super.python-cpuid.overrideAttrs (old: {
+			"python-cpuid" = super."python-cpuid".overrideAttrs (old: {
 				nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ 
 					self.setuptools
 					pkgs.clang
@@ -83,12 +84,12 @@
 		 # Create a Python venv with the default dependency group
 		 pythonEnv = pythonSet.mkVirtualEnv "focaccia-env" workspace.deps.default;
 	in {
-		packages.aarch64-darwin.default = pythonEnv;
+		packages.default = pythonEnv;
 
-		apps.aarch64-darwin.default = {
+		apps.default = {
 			type = "app";
-			program = "${self.packages.aarch64-darwin.default}/bin/focaccia";
+			program = "${self.packages.default}/bin/focaccia";
 		};
-	};
+	});
 }