From 482d57131375dafe610480ada3b03351c16c0617 Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Thu, 5 Jan 2023 17:56:15 -0500 Subject: [PATCH] :brain: `redesign` Use newer flake-utils --- doc/api-reference.md | 2 +- examples/devos/default.nix | 1 - flake.lock | 11 +++++++---- flake.nix | 5 +++-- src/mkFlake/default.nix | 1 - src/mkFlake/options.nix | 38 +++++++++++++++----------------------- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/doc/api-reference.md b/doc/api-reference.md index ee2cb9e..41fa2f7 100755 --- a/doc/api-reference.md +++ b/doc/api-reference.md @@ -59,5 +59,5 @@ list of strings _*Default*_ ``` -["aarch64-linux","aarch64-darwin","i686-linux","x86_64-darwin","x86_64-linux"] +["aarch64-linux","aarch64-darwin","x86_64-darwin","x86_64-linux"] ``` diff --git a/examples/devos/default.nix b/examples/devos/default.nix index 0468b22..3d5b5f9 100644 --- a/examples/devos/default.nix +++ b/examples/devos/default.nix @@ -5,7 +5,6 @@ let ciSystems = [ "aarch64-linux" - "i686-linux" "x86_64-linux" ]; diff --git a/flake.lock b/flake.lock index f4c85b3..da8f7ea 100644 --- a/flake.lock +++ b/flake.lock @@ -112,7 +112,9 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": "flake-utils_2" + "flake-utils": [ + "flake-utils" + ] }, "locked": { "lastModified": 1654029967, @@ -131,11 +133,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -218,6 +220,7 @@ "deploy": "deploy", "devshell": "devshell", "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", "flake-utils-plus": "flake-utils-plus", "home-manager": "home-manager", "nixlib": "nixlib", diff --git a/flake.nix b/flake.nix index 456b3a1..3571307 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,9 @@ devshell.url = "github:numtide/devshell"; devshell.inputs.nixpkgs.follows = "nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus/?ref=refs/pull/120/head"; + flake-utils-plus.inputs.flake-utils.follows = "flake-utils"; flake-compat = { url = "github:edolstra/flake-compat"; @@ -65,7 +67,6 @@ mkFlake = let mkFlake' = import ./src/mkFlake { inherit (nixlib) lib; - inherit (flake-utils-plus.inputs) flake-utils; inherit collectors darwin @@ -87,7 +88,7 @@ # .. see: https://demo.hedgedoc.org/s/_W6Ve03GK# # Super Stupid Flakes (ssf) / System As an Input - Style: - supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin"]; + supportedSystems = flake-utils-plus.lib.defaultSystems; # Pass this flake(self) as "digga" polyfillInputs = self.inputs // {digga = self;}; diff --git a/src/mkFlake/default.nix b/src/mkFlake/default.nix index dbe4179..e86a096 100644 --- a/src/mkFlake/default.nix +++ b/src/mkFlake/default.nix @@ -6,7 +6,6 @@ devshell, home-manager, flake-utils-plus, - flake-utils, internal-modules, tests, } @ injectedDeps: { diff --git a/src/mkFlake/options.nix b/src/mkFlake/options.nix index b75aa1d..6eb7baf 100644 --- a/src/mkFlake/options.nix +++ b/src/mkFlake/options.nix @@ -2,7 +2,7 @@ { lib, devshell, - flake-utils, + flake-utils-plus, self, inputs, ... @@ -16,14 +16,12 @@ with lib; # ############# /* + * Synopsis: maybeImport * - Synopsis: maybeImport - - Returns an imported path or string or the object otherwise. - - Use when you want to allow specifying an object directly or a path to it. - It saves the end user the additional import statement. + * Returns an imported path or string or the object otherwise. * + * Use when you want to allow specifying an object directly or a path to it. + * It saves the end user the additional import statement. */ maybeImport = obj: if (builtins.isPath obj || builtins.isString obj) @@ -31,13 +29,11 @@ with lib; else obj; /* + * Synopsis: maybeImportDevshellToml * - Synopsis: maybeImportDevshellToml - - Returns an imported path or string if the filename ends in `toml` or the object or path otherwise. - - Use only for devshell modules, as an apply function. + * Returns an imported path or string if the filename ends in `toml` or the object or path otherwise. * + * Use only for devshell modules, as an apply function. */ maybeImportDevshellToml = obj: if ((builtins.isPath obj || builtins.isString obj) && lib.hasSuffix ".toml" obj) @@ -45,24 +41,20 @@ with lib; else obj; /* + * Synopsis: pathToOr * - Synopsis: pathToOr - - Type resolver: types maybeImport's . - - Use in type declarations. + * Type resolver: types maybeImport's . * + * Use in type declarations. */ pathToOr = elemType: with types; coercedTo path maybeImport elemType; /* + * Synopsis: coercedListOf * - Synopsis: coercedListOf - - Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type . - - Use in type declarations. + * Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type . * + * Use in type declarations. */ coercedListOf = elemType: with types; @@ -439,7 +431,7 @@ with lib; }; supportedSystems = mkOption { type = listOf str; - default = flake-utils.lib.defaultSystems; + default = flake-utils-plus.lib.defaultSystems; description = '' The systems supported by this flake '';