From abf86629f5f250d489fc9f0ef9c0ede6bf7eb426 Mon Sep 17 00:00:00 2001 From: oxalica Date: Thu, 1 Apr 2021 17:14:31 +0800 Subject: [PATCH] Update flake and expose beta/nightly in `packages` --- flake.lock | 22 ++++++++++++---------- flake.nix | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index c8051f5342c..4cd8d9db9e1 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1609246779, - "narHash": "sha256-eq6ZXE/VWo3EMC65jmIT6H/rrUc9UWOWVujkzav025k=", + "lastModified": 1614513358, + "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=", "owner": "numtide", "repo": "flake-utils", - "rev": "08c7ad4a0844adc4a7f9f5bb3beae482e789afa4", + "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3", "type": "github" }, "original": { @@ -17,15 +17,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1609079092, - "narHash": "sha256-KhyKfxBHtZlAgudpZ0EJVzeuqROjKfVOwj8j0cuhU50=", - "path": "/nix/store/5pmay8rdvgw5ml1xi6189xhdbygc850k-source", - "rev": "2f47650c2f28d87f86ab807b8a339c684d91ec56", - "type": "path" + "lastModified": 1617325113, + "narHash": "sha256-GksR0nvGxfZ79T91UUtWjjccxazv6Yh/MvEJ82v1Xmw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "54c1e44240d8a527a8f4892608c4bce5440c3ecb", + "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" } }, "root": { diff --git a/flake.nix b/flake.nix index fef6a13b229..327ab667587 100644 --- a/flake.nix +++ b/flake.nix @@ -5,10 +5,11 @@ ''; inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils, ... }@inputs: let + outputs = { self, nixpkgs, flake-utils }: let inherit (nixpkgs) lib; overlay = import ./.; @@ -47,8 +48,19 @@ lib.mapAttrs' (version: comps: { name = "rust-${lib.replaceStrings ["."] ["-"] version}"; value = comps.rust; - }) pkgs.rust-bin.stable // { + }) pkgs.rust-bin.stable // + lib.mapAttrs' (version: comps: { + name = "rust-nightly-${version}"; + value = comps.rust; + }) (removeAttrs pkgs.rust-bin.nightly [ "2018-11-01" "2020-09-12" ]) // # FIXME: `rust` is not available. + lib.mapAttrs' (version: comps: { + name = "rust-beta-${version}"; + value = comps.rust; + }) (removeAttrs pkgs.rust-bin.beta [ "2018-11-09" ]) // # FIXME: `rust` is not available. + { rust = packages.rust-latest; + rust-nightly = packages.rust-nightly-latest; + rust-beta = packages.rust-beta-latest; }; checks = let