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:
commit
82bd4999de
6
Main.hs
6
Main.hs
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user