From 4ee7db5c5465270ae173014adb4bf7739ff65d92 Mon Sep 17 00:00:00 2001 From: Jamie Quigley Date: Thu, 13 Jun 2024 12:10:44 +0100 Subject: chore(nix): De-couple atuin nix build from nixpkgs rustc version (#2123) --- flake.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 67833754..8384a2c2 100644 --- a/flake.nix +++ b/flake.nix @@ -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; -- cgit v1.3.1