From f1ec6b99c9935528edf19b46abdbbc6cd8cac51e Mon Sep 17 00:00:00 2001 From: dyrnade Date: Fri, 24 Mar 2017 12:49:25 +0300 Subject: [PATCH] native host connector for gnome extensions --- .../extensions/chrome-gnome-shell/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 32 insertions(+) create mode 100644 pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix diff --git a/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix new file mode 100644 index 000000000000..8a99932e8307 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix @@ -0,0 +1,31 @@ +{stdenv, lib, python, dbus, fetchgit, cmake, coreutils, jq, gobjectIntrospection, python27Packages, makeWrapper, gnome3, wrapGAppsHook}: + +stdenv.mkDerivation rec { +name="chrome-gnome-shell"; + src = fetchgit { + url = "git://git.gnome.org/chrome-gnome-shell"; + rev = "7d99523e90805cb65027cc2f5f1191a957dcf276"; + sha256 = "0qc34dbhsz5yf4z5bx6py08h561rcxw9928drgk9256g3vnygnbc"; + }; + + buildInputs = [ gnome3.gnome_shell makeWrapper jq dbus gobjectIntrospection + python python27Packages.requests python27Packages.pygobject3 wrapGAppsHook]; + + preConfigure = '' + mkdir build usr etc + cd build + ${cmake}/bin/cmake -DCMAKE_INSTALL_PREFIX=$out/usr -DBUILD_EXTENSION=OFF ../ + substituteInPlace cmake_install.cmake --replace "/etc" "$out/etc" + ''; + + postInstall = '' + rm $out/etc/opt/chrome/policies/managed/chrome-gnome-shell.json + rm $out/etc/chromium/policies/managed/chrome-gnome-shell.json + wrapProgram $out/usr/bin/chrome-gnome-shell \ + --prefix PATH '"${dbus}/bin/dbus:$PATH"' \ + --prefix PATH '"${gnome3.gnome_shell}:$PATH"' \ + --prefix PYTHONPATH : "$PYTHONPATH" + + ''; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c9b87a3afe7..3fc72d252a09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18404,5 +18404,6 @@ with pkgs; ghc-standalone-archive = callPackage ../os-specific/darwin/ghc-standalone-archive { inherit (darwin) cctools; }; + chrome-gnome-shell = callPackage ../desktops/gnome-3/extensions/chrome-gnome-shell {}; messenger-for-desktop = callPackage ../applications/networking/instant-messengers/messenger-for-desktop {}; }