From 5069b585c832c3d613963f9d44b0ce7900398d2b Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 17 Dec 2024 17:53:51 +0000 Subject: [PATCH] bulid(nix): use new fenix for dev shell --- flake.lock | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 11 ++++++++--- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 61d10e0bbb..52c59ca6ce 100644 --- a/flake.lock +++ b/flake.lock @@ -115,6 +115,25 @@ "type": "github" } }, + "new-fenix": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1734417396, + "narHash": "sha256-32x1Z+Pz3Jv0cK9EG56cFTKXy/mZ/c+Ikxw+aVfKHp4=", + "owner": "nix-community", + "repo": "fenix", + "rev": "a18d41b26e998e95a598858fdb86ba22fb5da47d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1730207686, @@ -175,6 +194,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1731139594, "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", @@ -196,8 +231,9 @@ "fenix": "fenix", "flake-utils": "flake-utils_2", "naersk": "naersk", + "new-fenix": "new-fenix", "nix-filter": "nix-filter", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" } }, "rust-analyzer-src": { @@ -217,6 +253,23 @@ "type": "github" } }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1734386068, + "narHash": "sha256-Py025JiD9lcPmldB7X1AEjq3WBTS60jZUJRtTDonmaE=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "0a706f7d2ac093985eae317781200689cfd48b78", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index a92eda7008..d804b1e56e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,19 @@ { description = "Delta Chat core"; inputs = { + # Old Rust to build releases. fenix.url = "github:nix-community/fenix?rev=85f4139f3c092cf4afd9f9906d7ed218ef262c97"; + + # New Rust for development shell. + new-fenix.url = "github:nix-community/fenix"; + flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; nix-filter.url = "github:numtide/nix-filter"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; android.url = "github:tadfisher/android-nixpkgs"; }; - outputs = { self, nixpkgs, flake-utils, nix-filter, naersk, fenix, android }: + outputs = { self, nixpkgs, flake-utils, nix-filter, naersk, fenix, new-fenix, android }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; @@ -539,13 +544,13 @@ let pkgs = import nixpkgs { system = system; - overlays = [ fenix.overlays.default ]; + overlays = [ new-fenix.overlays.default ]; }; in pkgs.mkShell { buildInputs = with pkgs; [ - (fenix.packages.${system}.complete.withComponents [ + (new-fenix.packages.${system}.complete.withComponents [ "cargo" "clippy" "rust-src"