summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-09-03 16:27:30 +0100
committerGitHub <noreply@github.com>2017-09-03 16:27:30 +0100
commit4391330033f6e4c3a840ed463a82c0ad9bbdc380 (patch)
tree63cd6fc7681131b59232a779adbc33a5d106fa4e
parent49cda48b8390c44f9b63435ddd8572d48c85f3d3 (diff)
parentc2881983fb52c50d8ddb1187458b519a058cc2ab (diff)
downloadnixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar.gz
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar.bz2
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar.lz
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar.xz
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.tar.zst
nixlib-4391330033f6e4c3a840ed463a82c0ad9bbdc380.zip
Merge pull request #28893 from jtojnar/gpaste-service
gnome3.gpaste: Add GPaste service
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/desktops/gnome3/gpaste.nix30
-rw-r--r--pkgs/desktops/gnome-3/3.24/misc/gpaste/default.nix22
3 files changed, 36 insertions, 17 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index cc7aa519478e..918bd18e6afb 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -204,6 +204,7 @@
   ./services/desktops/gnome3/gnome-online-miners.nix
   ./services/desktops/gnome3/gnome-terminal-server.nix
   ./services/desktops/gnome3/gnome-user-share.nix
+  ./services/desktops/gnome3/gpaste.nix
   ./services/desktops/gnome3/gvfs.nix
   ./services/desktops/gnome3/seahorse.nix
   ./services/desktops/gnome3/sushi.nix
diff --git a/nixos/modules/services/desktops/gnome3/gpaste.nix b/nixos/modules/services/desktops/gnome3/gpaste.nix
new file mode 100644
index 000000000000..0954cd2713aa
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/gpaste.nix
@@ -0,0 +1,30 @@
+# GPaste daemon.
+{ config, lib, ... }:
+
+with lib;
+
+let
+  gnome3 = config.environment.gnome3.packageSet;
+in
+{
+  ###### interface
+  options = {
+    services.gnome3.gpaste = {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Whether to enable GPaste, a clipboard manager.
+        '';
+      };
+    };
+  };
+
+  ###### implementation
+  config = mkIf config.services.gnome3.gpaste.enable {
+    environment.systemPackages = [ gnome3.gpaste ];
+    services.dbus.packages = [ gnome3.gpaste ];
+    services.xserver.desktopManager.gnome3.sessionPath = [ gnome3.gpaste ];
+    systemd.packages = [ gnome3.gpaste ];
+  };
+}
diff --git a/pkgs/desktops/gnome-3/3.24/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/3.24/misc/gpaste/default.nix
index 2bfc6c73eb40..a43f9206cdd6 100644
--- a/pkgs/desktops/gnome-3/3.24/misc/gpaste/default.nix
+++ b/pkgs/desktops/gnome-3/3.24/misc/gpaste/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, autoreconfHook, pkgconfig, vala_0_32, glib, gjs, mutter
-, pango, gtk3, gnome3, dbus, clutter, appstream-glib, makeWrapper, systemd, gobjectIntrospection }:
+{ stdenv, fetchurl, autoreconfHook, pkgconfig, vala, glib, gjs, mutter
+, pango, gtk3, gnome3, dbus, clutter, appstream-glib, wrapGAppsHook, systemd, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
   version = "3.24.2";
@@ -10,9 +10,10 @@ stdenv.mkDerivation rec {
     sha256 = "16142jfpkz8qfs7zp9k3c5l9pnvxbr5yygj8jdpx6by1142s6340";
   };
 
-  buildInputs = [ autoreconfHook pkgconfig vala_0_32 glib gjs mutter
+  nativeBuildInputs = [ autoreconfHook pkgconfig vala wrapGAppsHook ];
+  buildInputs = [ glib gjs mutter gnome3.adwaita-icon-theme
                   gtk3 gnome3.gnome_control_center dbus
-                  clutter pango appstream-glib makeWrapper systemd gobjectIntrospection ];
+                  clutter pango appstream-glib systemd gobjectIntrospection ];
 
   configureFlags = [ "--with-controlcenterdir=$(out)/gnome-control-center/keybindings"
                      "--with-dbusservicesdir=$(out)/share/dbus-1/services"
@@ -20,19 +21,6 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  preFixup =
-    let
-      libPath = stdenv.lib.makeLibraryPath
-        [ glib gtk3 clutter pango ];
-    in
-    ''
-      for i in $out/libexec/gpaste/*; do
-        wrapProgram $i \
-          --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
-          --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
-      done
-    '';
-
   meta = with stdenv.lib; {
     homepage = https://github.com/Keruspe/GPaste;
     description = "Clipboard management system with GNOME3 integration";