break: change how nixpkgs is passed to the project

Evaluating nixpkgs is quite expensive and should be done only once if
possible. This allows to pass a correctly-configured instance of nixpkgs
(with allowUnfree = true).

Unfortunately this requires to break the current interface.
This commit is contained in:
zimbatm 2020-04-28 11:37:37 +02:00
parent 3db9b5d12a
commit d0379a8673
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7

View File

@ -8,12 +8,12 @@
# This is one by default, you can switch it to off if you want to reduce a # This is one by default, you can switch it to off if you want to reduce a
# bit the size of nixGL closure. # bit the size of nixGL closure.
enable32bits ? true, enable32bits ? true,
pkgs ? import <nixpkgs> # Make sure to enable config.allowUnfree to the instance of nixpkgs to be
}: # able to access the nvidia drivers.
pkgs ? import <nixpkgs> {
let config = { allowUnfree = true; };
nixpkgs = pkgs {config = {allowUnfree = true;};};
in
nixpkgs.callPackage ./nixGL.nix {
inherit nvidiaVersion nvidiaHash enable32bits;
} }
}:
pkgs.callPackage ./nixGL.nix {
inherit nvidiaVersion nvidiaHash enable32bits;
}