Skip to content
Permalink
Browse files

Merge pull request #124 from nmattia/nm-fix-log

Fix log and failure on `type = file` with recent nixpkgs
  • Loading branch information...
nmattia committed Sep 23, 2019
2 parents 489bc38 + a014fb3 commit 30022dce335b4857b2219b2a108eb930671ffb72
Showing with 6 additions and 2 deletions.
  1. +5 −1 nix/sources.nix
  2. +1 −1 src/Niv/Cli.hs
@@ -47,6 +47,10 @@ with rec
# annoyingly this means we have to specify them
fetchzip = { url, sha256 }@attrs: pkgs.fetchzip attrs;

# A wrapper around pkgs.fetchurl that has inspectable arguments,
# annoyingly this means we have to specify them
fetchurl = { url, sha256 }@attrs: pkgs.fetchurl attrs;

hasNixpkgsPath = (builtins.tryEval <nixpkgs>).success;
hasThisAsNixpkgsPath =
(builtins.tryEval <nixpkgs>).success && <nixpkgs> == ./.;
@@ -71,7 +75,7 @@ with rec
in builtins.getAttr fetcherName {
"tarball" = fetchzip;
"builtin-tarball" = builtins_fetchTarball;
"file" = pkgs.fetchurl;
"file" = fetchurl;
"builtin-url" = builtins_fetchurl;
};
};
@@ -306,7 +306,7 @@ cmdShow = \case
sources <- unSources <$> getSources

forWithKeyM_ sources $ \key (PackageSpec spec) -> do
tsay $ "Updating " <> tbold (unPackageName key)
tsay $ "Showing " <> tbold (unPackageName key)
forM_ (HMS.toList spec) $ \(attrName, attrValValue) -> do
let attrValue = case attrValValue of
Aeson.String str -> str

0 comments on commit 30022dc

Please sign in to comment.
You can’t perform that action at this time.