Skip to content

Commit 482d571

Browse files
Lord-Valenblaggacao
authored andcommitted
🧠 redesign Use newer flake-utils
1 parent 7646c7d commit 482d571

File tree

6 files changed

+26
-32
lines changed

6 files changed

+26
-32
lines changed

Diff for: doc/api-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ list of strings
5959
_*Default*_
6060

6161
```
62-
["aarch64-linux","aarch64-darwin","i686-linux","x86_64-darwin","x86_64-linux"]
62+
["aarch64-linux","aarch64-darwin","x86_64-darwin","x86_64-linux"]
6363
```

Diff for: examples/devos/default.nix

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ let
55

66
ciSystems = [
77
"aarch64-linux"
8-
"i686-linux"
98
"x86_64-linux"
109
];
1110

Diff for: flake.lock

+7-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
devshell.url = "github:numtide/devshell";
2525
devshell.inputs.nixpkgs.follows = "nixpkgs";
2626

27+
flake-utils.url = "github:numtide/flake-utils";
2728
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus/?ref=refs/pull/120/head";
29+
flake-utils-plus.inputs.flake-utils.follows = "flake-utils";
2830

2931
flake-compat = {
3032
url = "github:edolstra/flake-compat";
@@ -65,7 +67,6 @@
6567
mkFlake = let
6668
mkFlake' = import ./src/mkFlake {
6769
inherit (nixlib) lib;
68-
inherit (flake-utils-plus.inputs) flake-utils;
6970
inherit
7071
collectors
7172
darwin
@@ -87,7 +88,7 @@
8788
# .. see: https://demo.hedgedoc.org/s/_W6Ve03GK#
8889

8990
# Super Stupid Flakes (ssf) / System As an Input - Style:
90-
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin"];
91+
supportedSystems = flake-utils-plus.lib.defaultSystems;
9192

9293
# Pass this flake(self) as "digga"
9394
polyfillInputs = self.inputs // {digga = self;};

Diff for: src/mkFlake/default.nix

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
devshell,
77
home-manager,
88
flake-utils-plus,
9-
flake-utils,
109
internal-modules,
1110
tests,
1211
} @ injectedDeps: {

Diff for: src/mkFlake/options.nix

+15-23
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
lib,
44
devshell,
5-
flake-utils,
5+
flake-utils-plus,
66
self,
77
inputs,
88
...
@@ -16,53 +16,45 @@ with lib;
1616
# #############
1717

1818
/*
19+
* Synopsis: maybeImport <path|string or obj>
1920
*
20-
Synopsis: maybeImport <path|string or obj>
21-
22-
Returns an imported path or string or the object otherwise.
23-
24-
Use when you want to allow specifying an object directly or a path to it.
25-
It saves the end user the additional import statement.
21+
* Returns an imported path or string or the object otherwise.
2622
*
23+
* Use when you want to allow specifying an object directly or a path to it.
24+
* It saves the end user the additional import statement.
2725
*/
2826
maybeImport = obj:
2927
if (builtins.isPath obj || builtins.isString obj)
3028
then import obj
3129
else obj;
3230

3331
/*
32+
* Synopsis: maybeImportDevshellToml <path|string or obj>
3433
*
35-
Synopsis: maybeImportDevshellToml <path|string or obj>
36-
37-
Returns an imported path or string if the filename ends in `toml` or the object or path otherwise.
38-
39-
Use only for devshell modules, as an apply function.
34+
* Returns an imported path or string if the filename ends in `toml` or the object or path otherwise.
4035
*
36+
* Use only for devshell modules, as an apply function.
4137
*/
4238
maybeImportDevshellToml = obj:
4339
if ((builtins.isPath obj || builtins.isString obj) && lib.hasSuffix ".toml" obj)
4440
then devshell.lib.importTOML obj
4541
else obj;
4642

4743
/*
44+
* Synopsis: pathToOr <type>
4845
*
49-
Synopsis: pathToOr <type>
50-
51-
Type resolver: types maybeImport's <obj>.
52-
53-
Use in type declarations.
46+
* Type resolver: types maybeImport's <obj>.
5447
*
48+
* Use in type declarations.
5549
*/
5650
pathToOr = elemType: with types; coercedTo path maybeImport elemType;
5751

5852
/*
53+
* Synopsis: coercedListOf <type>
5954
*
60-
Synopsis: coercedListOf <type>
61-
62-
Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type <type>.
63-
64-
Use in type declarations.
55+
* Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type <type>.
6556
*
57+
* Use in type declarations.
6658
*/
6759
coercedListOf = elemType:
6860
with types;
@@ -439,7 +431,7 @@ with lib;
439431
};
440432
supportedSystems = mkOption {
441433
type = listOf str;
442-
default = flake-utils.lib.defaultSystems;
434+
default = flake-utils-plus.lib.defaultSystems;
443435
description = ''
444436
The systems supported by this flake
445437
'';

0 commit comments

Comments
 (0)