2014-04-25 02:58:33 +01:00
|
|
|
{ stdenv, mkChromiumDerivation, arch }:
|
2014-03-19 11:21:10 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2014-04-01 06:36:26 +01:00
|
|
|
mkChromiumDerivation (base: rec {
|
|
|
|
name = "chromium-browser";
|
2014-04-20 07:39:40 +01:00
|
|
|
packageName = "chromium";
|
2014-04-25 02:58:33 +01:00
|
|
|
buildTargets = [ "mksnapshot.${arch}" "chrome" ];
|
2014-03-19 11:21:10 +00:00
|
|
|
|
2014-03-19 11:57:49 +00:00
|
|
|
installPhase = ''
|
2014-04-01 06:36:26 +01:00
|
|
|
ensureDir "$libExecPath"
|
|
|
|
cp -v "$buildPath/"*.pak "$libExecPath/"
|
|
|
|
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
|
|
|
|
cp -vR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
|
|
|
cp -v $buildPath/libffmpegsumo.so "$libExecPath/"
|
2014-03-19 11:21:10 +00:00
|
|
|
|
2014-04-01 06:36:26 +01:00
|
|
|
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
2014-03-19 11:21:10 +00:00
|
|
|
|
|
|
|
mkdir -vp "$out/share/man/man1"
|
2014-04-01 06:36:26 +01:00
|
|
|
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
|
2014-03-19 11:21:10 +00:00
|
|
|
|
|
|
|
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%.*}"
|
|
|
|
expr "$icon_size" : "^[0-9][0-9]*$" || continue
|
|
|
|
logo_output_prefix="$out/share/icons/hicolor"
|
|
|
|
logo_output_path="$logo_output_prefix/''${icon_size}x''${icon_size}/apps"
|
|
|
|
mkdir -vp "$logo_output_path"
|
2014-04-01 06:36:26 +01:00
|
|
|
cp -v "$icon_file" "$logo_output_path/$packageName.png"
|
2014-03-19 11:21:10 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An open source web browser from Google";
|
|
|
|
homepage = http://www.chromium.org/;
|
|
|
|
maintainers = with maintainers; [ goibhniu chaoflow aszlig wizeman ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2014-04-01 06:36:26 +01:00
|
|
|
})
|