From b1fdecc4600ce95067bc552a491e5262ba0d6ab6 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 19 Jun 2012 17:56:44 +0200 Subject: [PATCH] chromium: Rename "chrome" binary to "chromium". This is to make it more consistent with the naming of the package file and also consistent with the build, as we're not using the Google branded version. In addition the derivation attribute set now has a packageName value which can be used to easily switch the binary names and paths, just in case we want to switch to using "chrome" (or something entirely different) again. --- .../networking/browsers/chromium/default.nix | 17 +++++++++-------- pkgs/top-level/all-packages.nix | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 872c2230acd..fe7f62d157b 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -64,7 +64,8 @@ let ]; in stdenv.mkDerivation rec { - name = "chromium-${version}"; + name = "${packageName}-${version}"; + packageName = "chromium"; version = sourceInfo.version; @@ -119,24 +120,24 @@ in stdenv.mkDerivation rec { ''; installPhase = '' - mkdir -vp "$out/libexec/chrome" - cp -v "out/${buildType}/"*.pak "$out/libexec/chrome/" - cp -vR "out/${buildType}/locales" "out/${buildType}/resources" "$out/libexec/chrome/" + mkdir -vp "$out/libexec/${packageName}" + cp -v "out/${buildType}/"*.pak "$out/libexec/${packageName}/" + cp -vR "out/${buildType}/locales" "out/${buildType}/resources" "$out/libexec/${packageName}/" - cp -v "out/${buildType}/chrome" "$out/libexec/chrome/chrome" + cp -v "out/${buildType}/chrome" "$out/libexec/${packageName}/${packageName}" mkdir -vp "$out/bin" - makeWrapper "$out/libexec/chrome/chrome" "$out/bin/chrome" + makeWrapper "$out/libexec/${packageName}/${packageName}" "$out/bin/${packageName}" mkdir -vp "$out/share/man/man1" - cp -v "out/${buildType}/chrome.1" "$out/share/man/man1/chrome.1" + cp -v "out/${buildType}/chrome.1" "$out/share/man/man1/${packageName}.1" for icon_file in chrome/app/theme/chromium/product_logo_*[0-9].png; do num_and_suffix="''${icon_file##*logo_}" icon_size="''${num_and_suffix%.*}" logo_output_path="$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps" mkdir -vp "$logo_output_path" - cp -v "$icon_file" "$logo_output_path/chrome.png" + cp -v "$icon_file" "$logo_output_path/${packageName}.png" done ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71702c0bea3..7bfe8f2b3a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6340,13 +6340,13 @@ let xulrunner = firefox36Pkgs.xulrunner; }; - chrome = lowPrio (callPackage ../applications/networking/browsers/chromium { + chromium = lowPrio (callPackage ../applications/networking/browsers/chromium { gconf = gnome.GConf; }); chromeWrapper = wrapFirefox - { browser = chrome; browserName = "chrome"; desktopName = "Chrome"; - icon = "${chrome}/libexec/chrome/product_logo_48.png"; + { browser = chromium; browserName = chromium.packageName; desktopName = "Chromium"; + icon = "${chromium}/share/icons/hicolor/48x48/apps/${chromium.packageName}.png"; }; cinelerra = callPackage ../applications/video/cinelerra { };