From cb16d73342691ff84c38655b124240909e3f53cd Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Thu, 30 Mar 2023 22:52:59 -0400 Subject: [PATCH] Switch to using rustup to pin the rust toolchain --- flake.lock | 47 ----------------------------------------------- flake.nix | 13 ++++--------- rust-toolchain | 2 ++ 3 files changed, 6 insertions(+), 56 deletions(-) create mode 100644 rust-toolchain diff --git a/flake.lock b/flake.lock index 5c66945..9ac56cd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,20 +1,5 @@ { "nodes": { - "flake-utils": { - "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" - } - }, "nixpkgs": { "locked": { "lastModified": 1680122840, @@ -30,41 +15,9 @@ "type": "indirect" } }, - "nixpkgs_2": { - "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" - } - }, - "oxalica": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "narHash": "sha256-o28gi3WKSsVeXg3wDSR2kGpawrDO5lzGG4eUsLTPglw=", - "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" - } - }, "root": { "inputs": { "nixpkgs": "nixpkgs", - "oxalica": "oxalica", "unstable": "unstable" } }, diff --git a/flake.nix b/flake.nix index 751b4c2..57a1ff4 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,9 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-22.11"; unstable.url = "nixpkgs/nixos-unstable"; - oxalica.url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; }; - outputs = { self, nixpkgs, unstable, oxalica }: + outputs = { self, nixpkgs, unstable }: let version = builtins.string 0 8 self.lastModifiedDate; supportedSystems = [ "x86_64-linux" ]; @@ -15,12 +14,8 @@ { devShell."x86_64-linux" = let - rust_overlay = import oxalica; - pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ rust_overlay ]; }; - pkgs-unstable = import unstable { system = "x86_64-linux"; overlays = [ rust_overlay ]; }; - rust = pkgs.rust-bin.stable."1.65.0".default.override { - extensions = [ "rust-src" ]; - }; + pkgs = import nixpkgs { system = "x86_64-linux"; }; + pkgs-unstable = import unstable { system = "x86_64-linux"; }; in pkgs.mkShell { name = "ld-tools-devshell"; @@ -40,7 +35,7 @@ pkgs.pipewire pkgs.pkg-config pkgs.sqlite - rust + pkgs.rustup ]; LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"; }; diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..864d3c4 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.68.2"