mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
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 <aszlig@redmoonstudios.org>
This commit is contained in:
parent
4984a2bf76
commit
37dbd62a83
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user