From 8bec45393e6b54779d095ca5334a83e21fc6f2a7 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 8 Oct 2022 23:31:21 -0300 Subject: [PATCH 1/2] refactor(flake): rename utils to flake-utils This is the expected name for downstream consumers of colmena's flake who want to override the input. Having it be named `utils` causes some surprise/confusion when doing `inputs.flake-utils.follows` as is usual. --- flake.lock | 36 ++++++++++++++++++------------------ flake.nix | 6 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index bd74e06..5ab8dae 100644 --- a/flake.lock +++ b/flake.lock @@ -31,9 +31,24 @@ "type": "github" } }, + "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" + } + }, "nix-eval-jobs": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -72,10 +87,10 @@ "root": { "inputs": { "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "nix-eval-jobs": "nix-eval-jobs", "nixpkgs": "nixpkgs", - "stable": "stable", - "utils": "utils" + "stable": "stable" } }, "stable": { @@ -93,21 +108,6 @@ "repo": "nixpkgs", "type": "github" } - }, - "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" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index cb6cb9e..eba776a 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; stable.url = "github:NixOS/nixpkgs/nixos-22.05"; - utils.url = "github:numtide/flake-utils"; + flake-utils.url = "github:numtide/flake-utils"; # Temporary fork of nix-eval-job with changes to be upstreamed nix-eval-jobs.url = "github:zhaofengli/nix-eval-jobs/colmena"; @@ -17,11 +17,11 @@ }; }; - outputs = { self, nixpkgs, utils, nix-eval-jobs, ... }: let + outputs = { self, nixpkgs, flake-utils, nix-eval-jobs, ... }: let supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; colmenaOptions = import ./src/nix/hive/options.nix; colmenaModules = import ./src/nix/hive/modules.nix; - in utils.lib.eachSystem supportedSystems (system: let + in flake-utils.lib.eachSystem supportedSystems (system: let pkgs = import nixpkgs { inherit system; overlays = [ self._evalJobsOverlay ]; From 2d980888778114e91829d33b51743bb116134deb Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 8 Oct 2022 23:33:25 -0300 Subject: [PATCH 2/2] refactor(flake): make nix-eval-jobs's flake-utils follow ours This avoids having a duplicated flake-utils entry in the lockfile --- flake.lock | 19 +++---------------- flake.nix | 9 ++++++--- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 5ab8dae..2987100 100644 --- a/flake.lock +++ b/flake.lock @@ -31,24 +31,11 @@ "type": "github" } }, - "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" - } - }, "nix-eval-jobs": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": [ + "flake-utils" + ], "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index eba776a..0d1de6e 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,12 @@ flake-utils.url = "github:numtide/flake-utils"; - # Temporary fork of nix-eval-job with changes to be upstreamed - nix-eval-jobs.url = "github:zhaofengli/nix-eval-jobs/colmena"; - nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs"; + nix-eval-jobs = { + # Temporary fork of nix-eval-job with changes to be upstreamed + url = "github:zhaofengli/nix-eval-jobs/colmena"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; flake-compat = { url = "github:edolstra/flake-compat";