mirror of
https://github.com/NiklasGollenstede/nixos-installer.git
synced 2024-11-22 16:03:29 +01:00
8b0e200c73
add config.wip.fs.temproot.remote.type == none, add config.wip.base.includeInputs, add pkgs.uboot-with-mmc-env, rename config.preface to config.wip.preface
9 lines
750 B
Nix
9 lines
750 B
Nix
# Returns an attrset where the values are the paths to all ».patch« files in this directory, and the names the respective »basename -s .patch«s.
|
|
dirname: inputs: let
|
|
getNamedPatchFiles = dir: builtins.removeAttrs (builtins.listToAttrs (map (name: let
|
|
match = builtins.match ''^(.*)[.]patch$'' name;
|
|
in if (match != null) then {
|
|
name = builtins.head match; value = builtins.path { path = "${dir}/${name}"; inherit name; }; # »builtins.path« puts the file in a separate, content-addressed store path, ensuring it's path only changes when the content changes, thus avoiding unnecessary rebuilds.
|
|
} else { name = ""; value = null; }) (builtins.attrNames (builtins.readDir dir)))) [ "" ];
|
|
in (getNamedPatchFiles dirname)
|