aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix22
1 files changed, 19 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index ceb4ddb..d9c9ba5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,13 +2,29 @@
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
+
+ mozpkgs = {
+ url = "github:mozilla/nixpkgs-mozilla";
+ flake = false;
+ };
};
- outputs = { self, nixpkgs, flake-utils, naersk }:
+ outputs = { self, nixpkgs, flake-utils, naersk, mozpkgs }:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages."${system}";
- naersk-lib = naersk.lib."${system}";
+
+ mozilla = pkgs.callPackage (mozpkgs + "/package-set.nix") {};
+ rust = (mozilla.rustChannelOf {
+ date = "2022-04-30";
+ channel = "nightly";
+ sha256= "pKjVkFhROJV0+JZKx2n4Fn9fJFuGX8pZW3LjUAN+Jx0=";
+ }).rust;
+
+ naersk-lib = naersk.lib."${system}".override {
+ cargo = rust;
+ rustc = rust;
+ };
in
rec {
# `nix build`
@@ -95,7 +111,7 @@
# `nix develop`
devShell = pkgs.mkShell {
- nativeBuildInputs = with pkgs; [ rustc cargo ] ++ deps;
+ nativeBuildInputs = with pkgs; [ rust ] ++ deps;
};
}
);