mirror of
https://github.com/divnix/digga.git
synced 2024-12-22 15:41:46 +03:00
🧠 redesign
Use newer flake-utils
This commit is contained in:
parent
7646c7dac4
commit
482d571313
@ -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"]
|
||||
```
|
||||
|
@ -5,7 +5,6 @@ let
|
||||
|
||||
ciSystems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
|
11
flake.lock
11
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",
|
||||
|
@ -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;};
|
||||
|
@ -6,7 +6,6 @@
|
||||
devshell,
|
||||
home-manager,
|
||||
flake-utils-plus,
|
||||
flake-utils,
|
||||
internal-modules,
|
||||
tests,
|
||||
} @ injectedDeps: {
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
lib,
|
||||
devshell,
|
||||
flake-utils,
|
||||
flake-utils-plus,
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
@ -16,14 +16,12 @@ with lib;
|
||||
# #############
|
||||
|
||||
/*
|
||||
* Synopsis: maybeImport <path|string or obj>
|
||||
*
|
||||
Synopsis: maybeImport <path|string or obj>
|
||||
|
||||
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 <path|string or obj>
|
||||
*
|
||||
Synopsis: maybeImportDevshellToml <path|string or obj>
|
||||
|
||||
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 <type>
|
||||
*
|
||||
Synopsis: pathToOr <type>
|
||||
|
||||
Type resolver: types maybeImport's <obj>.
|
||||
|
||||
Use in type declarations.
|
||||
* Type resolver: types maybeImport's <obj>.
|
||||
*
|
||||
* Use in type declarations.
|
||||
*/
|
||||
pathToOr = elemType: with types; coercedTo path maybeImport elemType;
|
||||
|
||||
/*
|
||||
* Synopsis: coercedListOf <type>
|
||||
*
|
||||
Synopsis: coercedListOf <type>
|
||||
|
||||
Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type <type>.
|
||||
|
||||
Use in type declarations.
|
||||
* Type resolver & list flattner: flattens a (evtl. arbitrarily nested) list of type <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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user