1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-07 22:36:53 +03:00

Merge pull request #29 from nlewo/restricted-eval

Support restricted evaluation mode
This commit is contained in:
Nicolas Mattia 2019-03-05 19:26:57 +01:00 committed by GitHub
commit 82bd4999de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -611,6 +611,8 @@ initNixSourcesNixContent = [s|
# A record, from name to path, of the third-party packages
with rec
{
pkgs = import <nixpkgs> {};
sources = builtins.fromJSON (builtins.readFile ./sources.json);
# fetchTarball version that is compatible between all the sources of Nix
@ -630,8 +632,8 @@ with rec
then builtins.getAttr "type" spec
else "tarball";
in builtins.getAttr fetcherName {
"tarball" = builtins.fetchTarball;
"file" = builtins.fetchurl;
"tarball" = pkgs.fetchzip;
"file" = pkgs.fetchurl;
};
};
# NOTE: spec must _not_ have an "outPath" attribute