From 6f325037fb7f21c170cd4d37dd60a26ba1492aad Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Thu, 21 Apr 2022 16:36:47 +0200 Subject: [PATCH] Fix failing test due to formatting issues --- nix/sources.nix | 37 ++++++++++++++++++++++--------------- src/Niv/Sources.hs | 2 +- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/nix/sources.nix b/nix/sources.nix index f4feac5..6963775 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -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; @@ -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 = diff --git a/src/Niv/Sources.hs b/src/Niv/Sources.hs index 0f8c903..fcb6d3c 100644 --- a/src/Niv/Sources.hs +++ b/src/Niv/Sources.hs @@ -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