diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-22 12:28:04 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-22 12:28:04 -0700 |
| commit | e29cc7653956bee24a26ca1344b38da4e86ae4ad (patch) | |
| tree | 0994108decbbcaa6c56a16dab3ac0f4b160b7993 /flake.nix | |
Force-Push: yes Change-Id: Ib3239558573d3f4d2588e58ac42b7769a45f08d0
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 36 |
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 + ]; + }; + }); + }; +} + |