From d6b11ed722ae4ba60e5b67fba03b2be7bef3093d Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 16:44:34 +0100 Subject: [PATCH 01/12] chromium/source: Move patches into its own subdir We're going to reference the patches in the Chromium main build rather than applying it to the sources. So as a first step, this should keep the patches away from the "source" subdirectory so we can make it flat. Signed-off-by: aszlig --- .../chromium/{source => patches}/build_fixes_46.patch | 0 .../{source => patches}/nix_plugin_paths_46.patch | 0 .../{source => patches}/nix_plugin_paths_50.patch | 0 .../browsers/chromium/{source => patches}/widevine.patch | 0 .../networking/browsers/chromium/source/default.nix | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename pkgs/applications/networking/browsers/chromium/{source => patches}/build_fixes_46.patch (100%) rename pkgs/applications/networking/browsers/chromium/{source => patches}/nix_plugin_paths_46.patch (100%) rename pkgs/applications/networking/browsers/chromium/{source => patches}/nix_plugin_paths_50.patch (100%) rename pkgs/applications/networking/browsers/chromium/{source => patches}/widevine.patch (100%) diff --git a/pkgs/applications/networking/browsers/chromium/source/build_fixes_46.patch b/pkgs/applications/networking/browsers/chromium/patches/build_fixes_46.patch similarity index 100% rename from pkgs/applications/networking/browsers/chromium/source/build_fixes_46.patch rename to pkgs/applications/networking/browsers/chromium/patches/build_fixes_46.patch diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_46.patch b/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_46.patch similarity index 100% rename from pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_46.patch rename to pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_46.patch diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch b/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_50.patch similarity index 100% rename from pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch rename to pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_50.patch diff --git a/pkgs/applications/networking/browsers/chromium/source/widevine.patch b/pkgs/applications/networking/browsers/chromium/patches/widevine.patch similarity index 100% rename from pkgs/applications/networking/browsers/chromium/source/widevine.patch rename to pkgs/applications/networking/browsers/chromium/patches/widevine.patch diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index a566c4bb1c87..bc646f6b252c 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -42,11 +42,11 @@ in stdenv.mkDerivation { ''; patches = [ - ./build_fixes_46.patch - ./widevine.patch + ../patches/build_fixes_46.patch + ../patches/widevine.patch (if versionOlder version "50.0.0.0" - then ./nix_plugin_paths_46.patch - else ./nix_plugin_paths_50.patch) + then ../patches/nix_plugin_paths_46.patch + else ../patches/nix_plugin_paths_50.patch) ]; patchPhase = let From 2d9a604907432bce60345545f57b3cdeffc31dac Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 16:48:54 +0100 Subject: [PATCH 02/12] chromium: Rename sources.nix to upstream-info.nix The "sources.nix" also contains information about where to get binary packages, so calling it "upstream-info.nix" fits better in terms of naming. Also, we're moving it away from the sources dir, because the latter will soon vanish. Signed-off-by: aszlig --- .../networking/browsers/chromium/source/update.nix | 8 ++++---- pkgs/applications/networking/browsers/chromium/update.sh | 2 +- .../chromium/{source/sources.nix => upstream-info.nix} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename pkgs/applications/networking/browsers/chromium/{source/sources.nix => upstream-info.nix} (100%) diff --git a/pkgs/applications/networking/browsers/chromium/source/update.nix b/pkgs/applications/networking/browsers/chromium/source/update.nix index d4dc3b59cbc7..41fac2d781d1 100644 --- a/pkgs/applications/networking/browsers/chromium/source/update.nix +++ b/pkgs/applications/networking/browsers/chromium/source/update.nix @@ -5,8 +5,8 @@ let inherit system; }) lib runCommand writeText stdenv curl cacert nix; - sources = if builtins.pathExists ./sources.nix - then import ./sources.nix + sources = if builtins.pathExists ../upstream-info.nix + then import ../upstream-info.nix else {}; bucketURL = "https://commondatastorage.googleapis.com/" @@ -224,8 +224,8 @@ in rec { mkAttr = key: val: "${mkIndent (indent + 1)}${key} = ${mkVal val};\n"; attrLines = lib.mapAttrsToList mkAttr attrs; in "{\n" + (lib.concatStrings attrLines) + (mkIndent indent) + "}"; - in writeText "chromium-new-sources.nix" '' - # This file is autogenerated from update.sh in the parent directory. + in writeText "chromium-new-upstream-info.nix" '' + # This file is autogenerated from update.sh in the same directory. ${dumpAttrs 0 newChannels} ''; } diff --git a/pkgs/applications/networking/browsers/chromium/update.sh b/pkgs/applications/networking/browsers/chromium/update.sh index 14f3dc6bd9d3..461d8b7dd400 100755 --- a/pkgs/applications/networking/browsers/chromium/update.sh +++ b/pkgs/applications/networking/browsers/chromium/update.sh @@ -1,4 +1,4 @@ #!/bin/sh -e cd "$(dirname "$0")" sp="$(nix-build -Q --no-out-link source/update.nix -A update)" -cat "$sp" > source/sources.nix +cat "$sp" > upstream-info.nix diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix similarity index 100% rename from pkgs/applications/networking/browsers/chromium/source/sources.nix rename to pkgs/applications/networking/browsers/chromium/upstream-info.nix From 6041cfe2af8968ffaa0cb80384572beae81d0d5b Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 16:53:08 +0100 Subject: [PATCH 03/12] chromium/source: Move update.nix to parent dir We now should have only the default.nix left in the source directory and we can start to factor out the pieces into the Chromium main derivation attributes. Signed-off-by: aszlig --- .../networking/browsers/chromium/source/default.nix | 2 +- .../networking/browsers/chromium/{source => }/update.nix | 6 +++--- pkgs/applications/networking/browsers/chromium/update.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename pkgs/applications/networking/browsers/chromium/{source => }/update.nix (98%) diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index bc646f6b252c..394dd81cc2f2 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -4,7 +4,7 @@ with stdenv.lib; -with (import ./update.nix { +with (import ../update.nix { inherit (stdenv) system; }).getChannel channel; diff --git a/pkgs/applications/networking/browsers/chromium/source/update.nix b/pkgs/applications/networking/browsers/chromium/update.nix similarity index 98% rename from pkgs/applications/networking/browsers/chromium/source/update.nix rename to pkgs/applications/networking/browsers/chromium/update.nix index 41fac2d781d1..d9c4e6a56e40 100644 --- a/pkgs/applications/networking/browsers/chromium/source/update.nix +++ b/pkgs/applications/networking/browsers/chromium/update.nix @@ -1,12 +1,12 @@ { system ? builtins.currentSystem }: let - inherit (import ../../../../../../. { + inherit (import ../../../../../. { inherit system; }) lib runCommand writeText stdenv curl cacert nix; - sources = if builtins.pathExists ../upstream-info.nix - then import ../upstream-info.nix + sources = if builtins.pathExists ./upstream-info.nix + then import ./upstream-info.nix else {}; bucketURL = "https://commondatastorage.googleapis.com/" diff --git a/pkgs/applications/networking/browsers/chromium/update.sh b/pkgs/applications/networking/browsers/chromium/update.sh index 461d8b7dd400..df53068713de 100755 --- a/pkgs/applications/networking/browsers/chromium/update.sh +++ b/pkgs/applications/networking/browsers/chromium/update.sh @@ -1,4 +1,4 @@ #!/bin/sh -e cd "$(dirname "$0")" -sp="$(nix-build -Q --no-out-link source/update.nix -A update)" +sp="$(nix-build -Q --no-out-link update.nix -A update)" cat "$sp" > upstream-info.nix From 985df3900d43268d77db7713a374e959490deb22 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 16:57:53 +0100 Subject: [PATCH 04/12] chromium/common.nix: Remove unreferenced attrs We're going to refactor things anyway, so let's first get rid of everything that's not used anymore. Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/common.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index c63f57f934d4..8c2703e76ce7 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ninja, which +{ stdenv, ninja, which # default dependencies , bzip2, flac, speex, libopus @@ -30,7 +30,6 @@ , hiDPISupport ? false , source -, plugins }: buildFun: From 4984a2bf76c93b5a32e92b7585f4650b751d8b4f Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 17:07:28 +0100 Subject: [PATCH 05/12] chromium/plugins: Break long line Yes, I know I'm a bit nitpicky, but lines >80 chars are very ugly if you have two windows side-by-side. Thus no feature changes here. Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/plugins.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index c3b294876c87..b2e777c6faf3 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -84,7 +84,9 @@ let wvModule = "@widevine@/lib/libwidevinecdmadapter.so"; wvInfo = "#${wvName}#${wvDescription};${wvMimeTypes}"; in '' - flashVersion="$(${jshon}/bin/jshon -F PepperFlash/manifest.json -e version -u)" + flashVersion="$( + "${jshon}/bin/jshon" -F PepperFlash/manifest.json -e version -u + )" install -vD PepperFlash/libpepflashplayer.so \ "$flash/lib/libpepflashplayer.so" From 37dbd62a83874cccb766a11e4e28ba88f226614e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 17:13:12 +0100 Subject: [PATCH 06/12] chromium: Move fetchurl calls to getChannel We always do something like "fetchurl channelProduct", so let's move it to getChannel directly so we can avoid those fetchurl calls all over the place. Also, we can still access subattributes from the fetchurl call if we need to, so there really is no need to expose the product's attributes directly. Signed-off-by: aszlig --- .../networking/browsers/chromium/source/default.nix | 6 +++--- pkgs/applications/networking/browsers/chromium/update.nix | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index 394dd81cc2f2..6e0decbca25d 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, patchutils, python +{ stdenv, fetchpatch, patchutils, python , channel ? "stable" }: @@ -19,7 +19,7 @@ let in stdenv.mkDerivation { name = "chromium-source-${version}"; - src = fetchurl main; + src = main; buildInputs = [ python ]; # cannot patch shebangs otherwise @@ -73,6 +73,6 @@ in stdenv.mkDerivation { passthru = { inherit version channel; - plugins = fetchurl binary; + plugins = binary; }; } diff --git a/pkgs/applications/networking/browsers/chromium/update.nix b/pkgs/applications/networking/browsers/chromium/update.nix index d9c4e6a56e40..150031ab7889 100644 --- a/pkgs/applications/networking/browsers/chromium/update.nix +++ b/pkgs/applications/networking/browsers/chromium/update.nix @@ -3,7 +3,7 @@ let inherit (import ../../../../../. { inherit system; - }) lib runCommand writeText stdenv curl cacert nix; + }) lib runCommand fetchurl writeText stdenv curl cacert nix; sources = if builtins.pathExists ./upstream-info.nix then import ./upstream-info.nix @@ -34,12 +34,12 @@ in rec { in { inherit (chanAttrs) version; - main = { + main = fetchurl { url = mkVerURL chanAttrs.version; inherit (chanAttrs) sha256; }; - binary = let + binary = fetchurl (let mkUrls = arch: let mkURLForMirror = getDebURL channel chanAttrs.version arch; in map mkURLForMirror ([ debURL ] ++ debMirrors); @@ -49,7 +49,7 @@ in rec { } else if !stdenv.is64bit && chanAttrs ? sha256bin32 then { urls = mkUrls "i386"; sha256 = chanAttrs.sha256bin32; - } else throw "No Chrome plugins are available for your architecture."; + } else throw "No Chrome plugins are available for your architecture."); }; update = let From 4f981b4f84707a63904410bb3e2b88621db03e8e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 17:50:17 +0100 Subject: [PATCH 07/12] chromium: Move source/default.nix into common.nix This addresses #12794 so that we now have only a single tarball where we base our build on instead of splitting the source into different outputs first and then reference the outputs. The reason I did this in the first place is that we previously built the sandbox as a different derivation and unpacking the whole source tree just for building the sandbox was a bit too much. As we now have namespaces sandbox built in by default we no longer have that derivation anymore. It still might come up however if we want to build NaCl as a separate derivation (see #8560), but splitting the source code into things only NaCl might require is already too much work and doesn't weight out the benefits. Another issue with the source splitup is that Hydra now has an output limit for non-fixed-output derivations which we're already hitting. Tested the build against the stable channel and it went well, but I haven't tested running the browser. Signed-off-by: aszlig --- .../networking/browsers/chromium/common.nix | 35 ++++++--- .../networking/browsers/chromium/default.nix | 7 +- .../networking/browsers/chromium/plugins.nix | 11 ++- .../browsers/chromium/source/default.nix | 78 ------------------- .../networking/browsers/chromium/update.nix | 1 + 5 files changed, 33 insertions(+), 99 deletions(-) delete mode 100644 pkgs/applications/networking/browsers/chromium/source/default.nix diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 8c2703e76ce7..d77fd1048159 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -29,7 +29,7 @@ , pulseSupport ? false, libpulseaudio ? null , hiDPISupport ? false -, source +, upstream-info }: buildFun: @@ -97,9 +97,17 @@ let base = rec { name = "${packageName}-${version}"; - inherit (source) version; + inherit (upstream-info) version; inherit packageName buildType buildPath; - src = source; + + src = upstream-info.main; + + unpackCmd = '' + tar xf "$src" \ + --anchored \ + --no-wildcards-match-slash \ + --exclude='*/tools/gyp' + ''; buildInputs = defaultDependencies ++ [ which @@ -117,16 +125,21 @@ let ++ optionals cupsSupport [ libgcrypt cups ] ++ optional pulseSupport libpulseaudio; - # XXX: Wait for https://crbug.com/239107 and https://crbug.com/239181 to - # be fixed, then try again to unbundle everything into separate - # derivations. - prePatch = '' - cp -dr --no-preserve=mode "${source.main}"/* . - cp -dr "${source.bundled}" third_party - chmod -R u+w third_party - ''; + patches = [ + ./patches/build_fixes_46.patch + ./patches/widevine.patch + (if versionOlder version "50.0.0.0" + then ./patches/nix_plugin_paths_46.patch + else ./patches/nix_plugin_paths_50.patch) + ]; postPatch = '' + sed -i -r \ + -e 's/-f(stack-protector)(-all)?/-fno-\1/' \ + -e 's|/bin/echo|echo|' \ + -e "/python_arch/s/: *'[^']*'/: '""'/" \ + build/common.gypi chrome/chrome_tests.gypi + sed -i -e '/module_path *=.*libexif.so/ { s|= [^;]*|= base::FilePath().AppendASCII("${libexif}/lib/libexif.so")| }' chrome/utility/media_galleries/image_metadata_extractor.cc diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index f9ed1f31e540..79e5e2dfec34 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -19,10 +19,9 @@ let callPackage = newScope chromium; chromium = { - source = callPackage ./source { - inherit channel; - # XXX: common config - }; + upstream-info = (import ./update.nix { + inherit (stdenv) system; + }).getChannel channel; mkChromiumDerivation = callPackage ./common.nix { inherit enableSELinux enableNaCl enableHotwording gnomeSupport diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index b2e777c6faf3..a0b354f0327c 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -3,7 +3,7 @@ , enablePepperFlash ? false , enableWideVine ? false -, source +, upstream-info }: with stdenv.lib; @@ -40,16 +40,15 @@ let plugins = stdenv.mkDerivation { name = "chromium-binary-plugins"; - # XXX: Only temporary and has to be version-specific - src = source.plugins; + src = upstream-info.binary; phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ]; outputs = [ "flash" "widevine" ]; unpackCmd = let - chan = if source.channel == "dev" then "chrome-unstable" - else if source.channel == "stable" then "chrome" - else "chrome-${source.channel}"; + chan = if upstream-info.channel == "dev" then "chrome-unstable" + else if upstream-info.channel == "stable" then "chrome" + else "chrome-${upstream-info.channel}"; in '' mkdir -p plugins ar p "$src" data.tar.xz | tar xJ -C plugins --strip-components=4 \ diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix deleted file mode 100644 index 6e0decbca25d..000000000000 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ stdenv, fetchpatch, patchutils, python -, channel ? "stable" -}: - -with stdenv.lib; - -with (import ../update.nix { - inherit (stdenv) system; -}).getChannel channel; - -let - transform = flags: concatStringsSep ";" (map (subst: subst + flags) [ - "s,^[^/]+(.*)$,$main\\1," - "s,$main/(build|tools)(/.*)?$,$out/\\1\\2," - "s,$main/third_party(/.*)?$,$bundled\\1," - "s,^/,," - ]); - -in stdenv.mkDerivation { - name = "chromium-source-${version}"; - - src = main; - - buildInputs = [ python ]; # cannot patch shebangs otherwise - - phases = [ "unpackPhase" "patchPhase" ]; - outputs = [ "out" "bundled" "main" ]; - - unpackPhase = '' - tar xf "$src" -C / \ - --transform="${transform "xS"}" \ - --anchored \ - --no-wildcards-match-slash \ - --exclude='*/tools/gyp' \ - --exclude='*/.*' - ''; - - prePatch = '' - for i in $outputs; do - eval patchShebangs "\$$i" - done - ''; - - patches = [ - ../patches/build_fixes_46.patch - ../patches/widevine.patch - (if versionOlder version "50.0.0.0" - then ../patches/nix_plugin_paths_46.patch - else ../patches/nix_plugin_paths_50.patch) - ]; - - patchPhase = let - diffmod = sym: "/^${sym} /{s/^${sym} //;${transform ""};s/^/${sym} /}"; - allmods = "${diffmod "---"};${diffmod "\\+\\+\\+"}"; - sedexpr = "/^(---|\\+\\+\\+) *\\/dev\\/null/b;${allmods}"; - in '' - runHook prePatch - for i in $patches; do - header "applying patch $i" 3 - sed -r -e "${sedexpr}" "$i" | patch -d / -p0 - stopNest - done - runHook postPatch - ''; - - postPatch = '' - sed -i -r \ - -e 's/-f(stack-protector)(-all)?/-fno-\1/' \ - -e 's|/bin/echo|echo|' \ - -e "/python_arch/s/: *'[^']*'/: '""'/" \ - "$out/build/common.gypi" "$main/chrome/chrome_tests.gypi" - ''; - - passthru = { - inherit version channel; - plugins = binary; - }; -} diff --git a/pkgs/applications/networking/browsers/chromium/update.nix b/pkgs/applications/networking/browsers/chromium/update.nix index 150031ab7889..cff841995624 100644 --- a/pkgs/applications/networking/browsers/chromium/update.nix +++ b/pkgs/applications/networking/browsers/chromium/update.nix @@ -32,6 +32,7 @@ in rec { getChannel = channel: let chanAttrs = builtins.getAttr channel sources; in { + inherit channel; inherit (chanAttrs) version; main = fetchurl { From 1f497204f721993b4e121d6bb15e64db97dc39f8 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 18:23:09 +0100 Subject: [PATCH 08/12] chromium: Show status about precompiling .py files Only a aesthetics thingy, but also corrects the comment, because we're essentially precompiling .py files, NOT the .pyc files (the latter are the results). Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index d77fd1048159..247156a94701 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -194,7 +194,7 @@ let } // (extraAttrs.gypFlags or {})); configurePhase = '' - # Precompile .pyc files to prevent race conditions during build + echo "Precompiling .py files to prevent race conditions..." >&2 python -m compileall -q -f . > /dev/null 2>&1 || : # ignore errors # This is to ensure expansion of $out. From fb65a0048a941653572596cd4e2a8c11ce026be4 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 21:04:02 +0100 Subject: [PATCH 09/12] chromium: Revert working around --sysroot filter This reverts commit 5979946c41e9b5fd9527eda1724761452d054b42. I have tested this by building against the stable version of Chromium and it seems to compile just fine, so it doesn't seem to be needed anymore. Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/browser.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index 2fb33fda6105..982c6d659ee6 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -29,8 +29,6 @@ mkChromiumDerivation (base: rec { done ''; - preHook = "unset NIX_ENFORCE_PURITY"; - meta = { description = "An open source web browser from Google"; homepage = http://www.chromium.org/; From 3bd71b135bb6f3379b3e1cfba148224b14123464 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 22:20:39 +0100 Subject: [PATCH 10/12] nixos/tests/chromium: Allow overriding channel map This has been the case before e45c211, but it turns out that it's very useful to override the channel packages so we can run tests with different Chromium build options. Signed-off-by: aszlig --- nixos/tests/chromium.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix index 974af6888b69..dfa65ab73912 100644 --- a/nixos/tests/chromium.nix +++ b/nixos/tests/chromium.nix @@ -1,4 +1,11 @@ -{ system ? builtins.currentSystem }: +{ system ? builtins.currentSystem +, pkgs ? import ../.. {} +, channelMap ? { + stable = pkgs.chromium; + beta = pkgs.chromiumBeta; + dev = pkgs.chromiumDev; + } +}: with import ../lib/testing.nix { inherit system; }; with pkgs.lib; @@ -160,8 +167,4 @@ mapAttrs (channel: chromiumPkg: makeTest rec { $machine->shutdown; ''; -}) { - stable = pkgs.chromium; - beta = pkgs.chromiumBeta; - dev = pkgs.chromiumDev; -} +}) channelMap From 5ebd629c6ff6ed00bcc3fff056dc9c2ed3dc848e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 20 Mar 2016 23:10:13 +0100 Subject: [PATCH 11/12] chromium: Fix comment of upstream-info.nix As of 6041cfe, the upstream-info.nix (back then it was called sources.nix) is no longer in the source/ subdirectory, so we need to fix that comment to say that the file is autogenerated from update.sh in the *same* directory. Signed-off-by: aszlig --- .../applications/networking/browsers/chromium/upstream-info.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index c42488e9e1e4..bcb5c3f2311a 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -1,4 +1,4 @@ -# This file is autogenerated from update.sh in the parent directory. +# This file is autogenerated from update.sh in the same directory. { beta = { sha256 = "1lgpjnjhy3idha5b6wp31kdk6knic96dmajyrgn1701q3mq81g1i"; From e047d792796165c369ea2640e997e641b4908146 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 21 Mar 2016 03:50:38 +0100 Subject: [PATCH 12/12] nixos/tests/chromium: Propagate "system" to pkgs Assigning the channelMap by the function attrset argument at the top-level of the test expression file may reference a different architecture than we need for the tests. So if we get the pkgs attribute by auto-calling, this will lead to test failure because we have a different architecture for the test than for the browser. Signed-off-by: aszlig --- nixos/tests/chromium.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix index dfa65ab73912..9a6414f81c39 100644 --- a/nixos/tests/chromium.nix +++ b/nixos/tests/chromium.nix @@ -1,5 +1,5 @@ { system ? builtins.currentSystem -, pkgs ? import ../.. {} +, pkgs ? import ../.. { inherit system; } , channelMap ? { stable = pkgs.chromium; beta = pkgs.chromiumBeta;