niv 0.2.20 → 0.2.21
raw patch · 4 files changed
+26/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Niv.Sources: V27 :: SourcesNixVersion
Files
- README.md +1/−1
- niv.cabal +1/−1
- nix/sources.nix +20/−2
- src/Niv/Sources.hs +4/−0
README.md view
@@ -210,7 +210,7 @@ ``` niv - dependency manager for Nix projects -version: 0.2.20+version: 0.2.21 Usage: niv [-s|--sources-file FILE] [--no-colors] COMMAND
niv.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: niv-version: 0.2.20+version: 0.2.21 synopsis: Easy dependency management for Nix projects description: Easy dependency management for Nix projects. category: Development
nix/sources.nix view
@@ -32,9 +32,27 @@ if spec ? tag then "refs/tags/${spec.tag}" else abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"; submodules = if spec ? submodules then spec.submodules else false;+ submoduleArg =+ let+ nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;+ emptyArgWithWarning =+ if submodules == true+ then+ builtins.trace+ (+ "The niv input \"${name}\" uses submodules "+ + "but your nix's (${builtins.nixVersion}) builtins.fetchGit "+ + "does not support them"+ )+ {}+ else {};+ in+ if nixSupportsSubmodules+ then { inherit submodules; }+ else emptyArgWithWarning; in- builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; }- // (if builtins.compareVersions builtins.nixVersion "2.4" >= 0 then { inherit submodules; } else {});+ builtins.fetchGit+ ({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg); fetch_local = spec: spec.path;
src/Niv/Sources.hs view
@@ -176,6 +176,8 @@ V25 | -- formatting fix V26+ | -- Support submodules for git repos+ V27 deriving stock (Bounded, Enum, Eq) -- | A user friendly version@@ -207,6 +209,7 @@ V24 -> "24" V25 -> "25" V26 -> "26"+ V27 -> "27" latestVersionMD5 :: T.Text latestVersionMD5 = sourcesVersionToMD5 maxBound@@ -245,6 +248,7 @@ V24 -> "116c2d936f1847112fef0013771dab28" V25 -> "6612caee5814670e5e4d9dd1b71b5f70" V26 -> "937bff93370a064c9000f13cec5867f9"+ V27 -> "8031ba9d8fbbc7401c800d0b84278ec8" -- | The MD5 sum of ./nix/sources.nix sourcesNixMD5 :: IO T.Text