From 39c3e7baf034bdbecc29f5f441d8dde634833b52 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 9 Sep 2023 13:04:59 +0530 Subject: fix builds --- flake.lock | 39 --------------------------------------- flake.nix | 35 ++++------------------------------- 2 files changed, 4 insertions(+), 70 deletions(-) diff --git a/flake.lock b/flake.lock index 52e1b55..93d8298 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1642141613, - "narHash": "sha256-WFS7T5oOLD8anu/77iz7EPz7zQsJZtP5qVa5485k3dI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "d75ffc9f1d3b60bb597e48ae01f486a6de27d30e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1642069818, @@ -39,26 +18,8 @@ }, "root": { "inputs": { - "fenix": "fenix", "nixpkgs": "nixpkgs" } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1642101527, - "narHash": "sha256-C4zcaWULWlrirpEt/pA85CCMBt+7SWZweMaMJ7EvrXw=", - "owner": "rust-analyzer", - "repo": "rust-analyzer", - "rev": "b4c31481a554d0132003228ba319bd9476fe85ae", - "type": "github" - }, - "original": { - "owner": "rust-analyzer", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index be5d5db..b041812 100644 --- a/flake.nix +++ b/flake.nix @@ -1,19 +1,11 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - - fenix = { - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; outputs = { self , nixpkgs - , fenix }: let supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; @@ -23,14 +15,6 @@ inherit system; overlays = [ self.overlay ]; }); - - chanspec = { - date = "2021-12-01"; - channel = "nightly"; - sha256 = "DhIP1w63/hMbWlgElJGBumEK/ExFWCdLaeBV5F8uWHc="; # set zeros after modifying channel or date - }; - rustChannel = p: (fenix.overlay p p).fenix.toolchainOf chanspec; - in { @@ -40,11 +24,8 @@ let pname = "prompt"; packageMeta = (lib.importTOML ./Cargo.toml).package; - rustPlatform = makeRustPlatform { - inherit (rustChannel final) cargo rustc; - }; in - rustPlatform.buildRustPackage { + final.rustPlatform.buildRustPackage { inherit pname; inherit (packageMeta) version; @@ -73,23 +54,15 @@ devShell = forAllSystems (system: let pkgs = nixpkgsFor."${system}"; - toolchain = (rustChannel pkgs).withComponents [ - "rustc" - "cargo" - "rust-std" - "rustfmt" - "clippy" - "rust-src" - ]; - inherit (fenix.packages."${system}") rust-analyzer; in pkgs.mkShell { nativeBuildInputs = [ pkgs.pkgconfig pkgs.openssl pkgs.bacon - rust-analyzer - toolchain + pkgs.rust-analyzer + pkgs.rustc + pkgs.cargo ]; RUST_LOG = "info"; RUST_BACKTRACE = 1; -- cgit v1.2.3