summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-22 12:28:04 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-22 12:28:04 -0700
commite29cc7653956bee24a26ca1344b38da4e86ae4ad (patch)
tree0994108decbbcaa6c56a16dab3ac0f4b160b7993 /flake.nix
initial (does nothing useful yet) HEAD main
Force-Push: yes
Change-Id: Ib3239558573d3f4d2588e58ac42b7769a45f08d0
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..51cf752
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,36 @@
+{
+  inputs = {
+    nixpkgs = {
+      type = "github";
+      owner = "NixOS";
+      repo = "nixpkgs";
+      ref = "nixos-26.05";
+    };
+
+    crane = {
+      url = "github:ipetkov/crane";
+    };
+  };
+
+  outputs = { self, nixpkgs, crane }:
+  let supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
+      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
+      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
+  in {
+    packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in {
+      default = (crane.mkLib pkgs).buildPackage {
+        src = ./.;
+      };
+    });
+
+    devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in {
+      default = pkgs.mkShell {
+        nativeBuildInputs = with pkgs; [
+          cargo
+          rustc
+        ];
+      };
+    });
+  };
+}
+