1
1
mirror of https://github.com/nmattia/niv.git synced 2024-10-06 20:39:12 +03:00

Format nix files

This commit is contained in:
Nicolas Mattia 2023-03-11 22:36:01 +01:00
parent 13d2baf9ab
commit 68eb9f0bcf
2 changed files with 9 additions and 8 deletions

View File

@ -9,11 +9,11 @@ let
builtins.path { builtins.path {
filter = filter =
path: type: path: type:
let let
relPath = pkgs.lib.removePrefix (toString src + "/") (toString path); relPath = pkgs.lib.removePrefix (toString src + "/") (toString path);
accept = pkgs.lib.any (re: builtins.match re relPath != null) regexes; accept = pkgs.lib.any (re: builtins.match re relPath != null) regexes;
in in
accept accept
; ;
inherit name; inherit name;
path = src; path = src;

View File

@ -28,9 +28,10 @@ let
let let
ref = ref =
spec.ref or ( spec.ref or (
if spec ? branch then "refs/heads/${spec.branch}" else if spec ? branch then "refs/heads/${spec.branch}" else
if spec ? tag then "refs/tags/${spec.tag}" else if spec ? tag then "refs/tags/${spec.tag}" else
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"); abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"
);
submodules = spec.submodules or false; submodules = spec.submodules or false;
submoduleArg = submoduleArg =
let let