Switch to the rustup toolchain specification for Rust

This commit is contained in:
Savanni D'Gerinel 2023-04-02 14:19:49 -04:00
parent 27eb2bc346
commit 4ad20dd1dc
3 changed files with 9 additions and 58 deletions

View File

@ -69,21 +69,6 @@
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
@ -130,22 +115,6 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1665296151,
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1654275867, "lastModified": 1654275867,
"narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=", "narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
@ -161,26 +130,11 @@
"type": "github" "type": "github"
} }
}, },
"oxalica": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"narHash": "sha256-8OfySbY1hhBzj0Iz90k4se6oFCGS3+ke31vkd0d4k/o=",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
}
},
"pkgs-cargo2nix": { "pkgs-cargo2nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
@ -201,7 +155,6 @@
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"oxalica": "oxalica",
"pkgs-cargo2nix": "pkgs-cargo2nix", "pkgs-cargo2nix": "pkgs-cargo2nix",
"unstable": "unstable" "unstable": "unstable"
} }

View File

@ -4,12 +4,11 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs.url = "nixpkgs/nixos-22.11";
unstable.url = "nixpkgs/nixos-unstable"; unstable.url = "nixpkgs/nixos-unstable";
oxalica.url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix"; pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
crane.url = "github:ipetkov/crane"; crane.url = "github:ipetkov/crane";
}; };
outputs = { self, nixpkgs, unstable, oxalica, pkgs-cargo2nix, crane, ... }: outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, crane, ... }:
let let
version = builtins.string 0 8 self.lastModifiedDate; version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ]; supportedSystems = [ "x86_64-linux" ];
@ -18,12 +17,8 @@
{ {
devShell."x86_64-linux" = devShell."x86_64-linux" =
let let
rust_overlay = import oxalica; pkgs = import nixpkgs { system = "x86_64-linux"; };
pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ rust_overlay ]; }; pkgs-unstable = import unstable { system = "x86_64-linux"; };
pkgs-unstable = import unstable { system = "x86_64-linux"; overlays = [ rust_overlay ]; };
rust = pkgs.rust-bin.stable."1.65.0".default.override {
extensions = [ "rust-src" ];
};
cargo2nix = pkgs-cargo2nix.packages."x86_64-linux"; cargo2nix = pkgs-cargo2nix.packages."x86_64-linux";
in in
pkgs.mkShell { pkgs.mkShell {
@ -44,7 +39,7 @@
pkgs.pipewire pkgs.pipewire
pkgs.pkg-config pkgs.pkg-config
pkgs.sqlite pkgs.sqlite
rust pkgs.rustup
]; ];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"; LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
}; };

3
rust-toolchain.toml Normal file
View File

@ -0,0 +1,3 @@
[toolchain]
channel = "1.68.2"
components = ["rust-src"]