diff --git a/flake.lock b/flake.lock index e13dbde6..9e7bcdde 100644 --- a/flake.lock +++ b/flake.lock @@ -36,27 +36,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": [] - }, - "locked": { - "lastModified": 1701930186, - "narHash": "sha256-t9uIiU1fE7VXi3t460iOuAUW8Ece9mowRKva1aw48zI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "aeb764a8e4c16da3f36b200a302552d8e457b9f4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -95,9 +74,32 @@ "inputs": { "advisory-db": "advisory-db", "crane": "crane", - "fenix": "fenix", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708308739, + "narHash": "sha256-FtKWP6d51kz8282jfziNNcCBpAvEzv2TtKH6dYIXCuA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "d45281ce1027a401255db01ea44972afbc569b7e", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } }, "systems": { diff --git a/flake.nix b/flake.nix index 927cfc6a..1799c18e 100644 --- a/flake.nix +++ b/flake.nix @@ -9,10 +9,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - fenix = { - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.rust-analyzer-src.follows = ""; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + }; }; flake-utils.url = "github:numtide/flake-utils"; @@ -31,18 +33,22 @@ self, nixpkgs, crane, - fenix, flake-utils, advisory-db, + rust-overlay, ... }: flake-utils.lib.eachDefaultSystem (system: let pname = "Heartwood"; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [(import rust-overlay)]; + }; inherit (pkgs) lib; - craneLib = crane.lib.${system}; + rustToolChain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain; + craneLib = (crane.mkLib pkgs).overrideToolchain rustToolChain; srcFilters = path: type: # Allow sql schemas