diff options
| author | Jamie Quigley <jamie@quigley.xyz> | 2024-06-13 12:10:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-13 12:10:44 +0100 |
| commit | 4ee7db5c5465270ae173014adb4bf7739ff65d92 (patch) | |
| tree | efad5a519cc4ef7d18b96eb45208be12f3b5f79a | |
| parent | chore(build): compile protobufs with protox (#2122) (diff) | |
| download | atuin-4ee7db5c5465270ae173014adb4bf7739ff65d92.zip | |
chore(nix): De-couple atuin nix build from nixpkgs rustc version (#2123)
| -rw-r--r-- | flake.lock | 39 | ||||
| -rw-r--r-- | flake.nix | 17 |
2 files changed, 56 insertions, 0 deletions
@@ -1,5 +1,26 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1717827974, + "narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=", + "owner": "nix-community", + "repo": "fenix", + "rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -52,11 +73,29 @@ }, "root": { "inputs": { + "fenix": "fenix", "flake-compat": "flake-compat", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1717583671, + "narHash": "sha256-+lRAmz92CNUxorqWusgJbL9VE1eKCnQQojglRemzwkw=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "48bbdd6a74f3176987d5c809894ac33957000d19", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -6,11 +6,16 @@ url = "github:edolstra/flake-compat"; flake = false; }; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, flake-utils, + fenix, ... }: flake-utils.lib.eachDefaultSystem (system: let @@ -18,6 +23,18 @@ in { packages.atuin = pkgs.callPackage ./atuin.nix { inherit (pkgs.darwin.apple_sdk.frameworks) Security SystemConfiguration AppKit; + rustPlatform = let + toolchain = + fenix.packages.${system}.fromToolchainFile + { + file = ./rust-toolchain.toml; + sha256 = "sha256-7QfkHty6hSrgNM0fspycYkRcB82eEqYa4CoAJ9qA3tU="; + }; + in + pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; }; packages.default = self.outputs.packages.${system}.atuin; |
