1
1
mirror of https://github.com/nmattia/niv.git synced 2024-10-06 12:27:35 +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 {
filter =
path: type:
let
relPath = pkgs.lib.removePrefix (toString src + "/") (toString path);
accept = pkgs.lib.any (re: builtins.match re relPath != null) regexes;
in
accept
let
relPath = pkgs.lib.removePrefix (toString src + "/") (toString path);
accept = pkgs.lib.any (re: builtins.match re relPath != null) regexes;
in
accept
;
inherit name;
path = src;

View File

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