diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-03-20 17:13:12 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-03-20 17:13:44 +0100 |
commit | 37dbd62a83874cccb766a11e4e28ba88f226614e (patch) | |
tree | a585ed4d43fde9484d28f290ae21eff16d29fe5c /pkgs/applications/networking/browsers/chromium/update.nix | |
parent | 4984a2bf76c93b5a32e92b7585f4650b751d8b4f (diff) | |
download | nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar.gz nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar.bz2 nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar.lz nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar.xz nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.tar.zst nixlib-37dbd62a83874cccb766a11e4e28ba88f226614e.zip |
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>
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/update.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/update.nix | 8 |
1 files changed, 4 insertions, 4 deletions
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 |