From b5956ec17957812025a04882208cbbfe29cbea2a Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 15 Jun 2012 10:19:26 +0200 Subject: [PATCH] chromium: Add an install phase. This tries to put pathes unte the same directory as the previous prebuilt version of Chromium. --- .../networking/browsers/chromium/default.nix | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 3fb29081b5f..af2e23a5407 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchsvn +{ stdenv, fetchurl, fetchsvn, makeWrapper , python, perl, pkgconfig , nspr, nss, udev, bzip2 , utillinux, alsaLib @@ -33,6 +33,7 @@ in stdenv.mkDerivation rec { }; buildInputs = [ + makeWrapper python perl pkgconfig nspr nss udev bzip2 utillinux alsaLib @@ -84,6 +85,28 @@ in stdenv.mkDerivation rec { make CC=${gcc}/bin/gcc BUILDTYPE=Release library=shared_library chrome chrome_sandbox ''; + 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/" + + cp -v "out/${buildType}/chrome" "$out/libexec/chrome/chrome" + + mkdir -vp "$out/bin" + makeWrapper "$out/libexec/chrome/chrome" "$out/bin/chrome" + + mkdir -vp "$out/share/man/man1" + cp -v "out/${buildType}/chrome.1" "$out/share/man/man1/chrome.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" + done + ''; + meta = with stdenv.lib; { description = "Chromium, an open source web browser"; homepage = http://www.chromium.org/;