mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-18 03:04:32 +03:00
chromium/updater: Don't import <nixpkgs> again
This effectively resets the attributes given at the point the main <nixpkgs> is imported and thus for example is also reading in stuff like ~/.nixpkgs/config.nix again, which might lead to unexpected results. We now only import <nixpkgs> now if the updater is auto-called (like in update.sh), otherwise the required attributes are passed by callPackage within the Chromium scope. I remember noting about this a while ago either on IRC or on GitHub, but I can't find it right now, so thanks to @obadz for reminding me about this in #15225. Tested this by running the updater and also using: NIXPKGS_CONFIG=$(pwd)/broken.nix nix-instantiate --arg config {} -A chromium The contents of broken.nix were: EVALERR{ Signed-off-by: aszlig <aszlig@redmoonstudios.org> Fixes: #15225
This commit is contained in:
parent
0bc713f817
commit
f28b71023c
@ -19,9 +19,7 @@ let
|
|||||||
callPackage = newScope chromium;
|
callPackage = newScope chromium;
|
||||||
|
|
||||||
chromium = {
|
chromium = {
|
||||||
upstream-info = (import ./update.nix {
|
upstream-info = (callPackage ./update.nix {}).getChannel channel;
|
||||||
inherit (stdenv) system;
|
|
||||||
}).getChannel channel;
|
|
||||||
|
|
||||||
mkChromiumDerivation = callPackage ./common.nix {
|
mkChromiumDerivation = callPackage ./common.nix {
|
||||||
inherit enableSELinux enableNaCl enableHotwording gnomeSupport
|
inherit enableSELinux enableNaCl enableHotwording gnomeSupport
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
{ system ? builtins.currentSystem }:
|
let maybePkgs = import ../../../../../. {}; in
|
||||||
|
|
||||||
|
{ stdenv ? maybePkgs.stdenv
|
||||||
|
, runCommand ? maybePkgs.runCommand
|
||||||
|
, fetchurl ? maybePkgs.fetchurl
|
||||||
|
, writeText ? maybePkgs.writeText
|
||||||
|
, curl ? maybePkgs.curl
|
||||||
|
, cacert ? maybePkgs.cacert
|
||||||
|
, nix ? maybePkgs.nix
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (import ../../../../../. {
|
inherit (stdenv) lib;
|
||||||
inherit system;
|
|
||||||
}) lib runCommand fetchurl writeText stdenv curl cacert nix;
|
|
||||||
|
|
||||||
sources = if builtins.pathExists ./upstream-info.nix
|
sources = if builtins.pathExists ./upstream-info.nix
|
||||||
then import ./upstream-info.nix
|
then import ./upstream-info.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user