Skip to content

Commit

Permalink
Fix failing test due to formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tfc committed Apr 21, 2022
1 parent 352b660 commit 6f32503
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
37 changes: 22 additions & 15 deletions nix/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ let
if submodules == true
then
builtins.trace
("The niv input \"${name}\" uses submodules "
(
"The niv input \"${name}\" uses submodules "
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
+ "does not support them")
{ }
else { };
+ "does not support them"
)
{}
else {};
in
if nixSupportsSubmodules then { inherit submodules; } else emptyArgWithWarning;
if nixSupportsSubmodules
then { inherit submodules; }
else emptyArgWithWarning;
in
builtins.fetchGit
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
builtins.fetchGit
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);

fetch_local = spec: spec.path;

Expand Down Expand Up @@ -163,14 +167,17 @@ let

# Create the final "sources" from the config
mkSources = config:
mapAttrs (
name: spec:
if builtins.hasAttr "outPath" spec
then abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = replace name (fetch config.pkgs name spec); }
) config.sources;
mapAttrs
(
name: spec:
if builtins.hasAttr "outPath" spec
then
abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = replace name (fetch config.pkgs name spec); }
)
config.sources;

# The "config" used by the fetchers
mkConfig =
Expand Down
2 changes: 1 addition & 1 deletion src/Niv/Sources.hs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ sourcesVersionToMD5 = \case
V24 -> "116c2d936f1847112fef0013771dab28"
V25 -> "6612caee5814670e5e4d9dd1b71b5f70"
V26 -> "937bff93370a064c9000f13cec5867f9"
V27 -> "d18bcf549896edd810c6b7fd6239bcf7"
V27 -> "8eb15aa505d1971b1593c3ba3a9e8646"

-- | The MD5 sum of ./nix/sources.nix
sourcesNixMD5 :: IO T.Text
Expand Down

0 comments on commit 6f32503

Please sign in to comment.