Skip to content

Commit 4ee7db5

Browse files
chore(nix): De-couple atuin nix build from nixpkgs rustc version (#2123)
1 parent 9fa223e commit 4ee7db5

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

flake.lock

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+17
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,35 @@
66
url = "github:edolstra/flake-compat";
77
flake = false;
88
};
9+
fenix = {
10+
url = "github:nix-community/fenix";
11+
inputs.nixpkgs.follows = "nixpkgs";
12+
};
913
};
1014
outputs = {
1115
self,
1216
nixpkgs,
1317
flake-utils,
18+
fenix,
1419
...
1520
}:
1621
flake-utils.lib.eachDefaultSystem (system: let
1722
pkgs = nixpkgs.outputs.legacyPackages.${system};
1823
in {
1924
packages.atuin = pkgs.callPackage ./atuin.nix {
2025
inherit (pkgs.darwin.apple_sdk.frameworks) Security SystemConfiguration AppKit;
26+
rustPlatform = let
27+
toolchain =
28+
fenix.packages.${system}.fromToolchainFile
29+
{
30+
file = ./rust-toolchain.toml;
31+
sha256 = "sha256-7QfkHty6hSrgNM0fspycYkRcB82eEqYa4CoAJ9qA3tU=";
32+
};
33+
in
34+
pkgs.makeRustPlatform {
35+
cargo = toolchain;
36+
rustc = toolchain;
37+
};
2138
};
2239
packages.default = self.outputs.packages.${system}.atuin;
2340

0 commit comments

Comments
 (0)