From f0122bd423489a61f794bb1c766ed62fca005c23 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Oct 2016 17:47:05 +0200 Subject: Wrap chrome instead of chromium --- users/gkleen@hel.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'users/gkleen@hel.nix') diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix index 28548a84..bd96a9fd 100644 --- a/users/gkleen@hel.nix +++ b/users/gkleen@hel.nix @@ -1,7 +1,7 @@ { packageOverrides = pkgs: rec { chromium-wrapper = pkgs.symlinkJoin { - name = "chromium-wrapper"; + name = ''${pkgs.chromium.name}-wrapped''; paths = [ pkgs.chromium ]; buildInputs = [ pkgs.makeWrapper ]; postBuild = '' @@ -9,6 +9,19 @@ --add-flags --force-device-scale-factor=1.6 ''; }; + chrome-wrapper = pkgs.symlinkJoin { + name = ''${pkgs.google-chrome.name}-wrapped''; + paths = [ pkgs.google-chrome ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/google-chrome-stable \ + --add-flags --force-device-scale-factor=1.6 + ln -s $out/bin/google-chrome-stable $out/bin/chrome + + rm $out/share/applications/google-chrome.desktop + substitute ${pkgs.google-chrome}/share/applications/google-chrome.desktop $out/share/applications/google-chrome.desktop --replace "${pkgs.google-chrome}" "$out" + ''; + }; gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: { postInstall = '' ln -s $out/bin/gpg2 $out/bin/gpg -- cgit v1.2.3