2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-10-19 23:01:24 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, appstream-glib
|
|
|
|
, clutter
|
|
|
|
, gjs
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, meson
|
|
|
|
, mutter
|
|
|
|
, ninja
|
|
|
|
, pango
|
2021-01-17 03:21:50 +01:00
|
|
|
, pkg-config
|
2019-10-19 23:01:24 +02:00
|
|
|
, vala
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2016-09-18 21:35:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-06 21:01:39 +02:00
|
|
|
version = "3.40.2";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gpaste";
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2019-10-19 23:01:24 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Keruspe";
|
|
|
|
repo = "GPaste";
|
|
|
|
rev = "v${version}";
|
2021-05-06 21:01:39 +02:00
|
|
|
sha256 = "sha256-DUikcnkDBRkCwPLrl8lkNr+SeNpc3bPwPTWRn91nOo4=";
|
2016-09-18 21:35:23 +02:00
|
|
|
};
|
|
|
|
|
2018-07-23 04:11:03 +02:00
|
|
|
patches = [
|
|
|
|
./fix-paths.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: switch to substituteAll with placeholder
|
|
|
|
# https://github.com/NixOS/nix/issues/1846
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/gnome-shell/extension.js \
|
2018-09-12 20:28:23 +02:00
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
2018-07-23 04:11:03 +02:00
|
|
|
substituteInPlace src/gnome-shell/prefs.js \
|
2018-09-12 20:28:23 +02:00
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
2018-07-23 04:11:03 +02:00
|
|
|
substituteInPlace src/libgpaste/settings/gpaste-settings.c \
|
2019-08-27 20:25:43 +02:00
|
|
|
--subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"}
|
2018-07-23 04:11:03 +02:00
|
|
|
'';
|
|
|
|
|
2018-09-12 20:28:23 +02:00
|
|
|
nativeBuildInputs = [
|
2019-10-19 23:01:24 +02:00
|
|
|
appstream-glib
|
|
|
|
gobject-introspection
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-17 03:21:50 +01:00
|
|
|
pkg-config
|
2019-10-19 23:01:24 +02:00
|
|
|
vala
|
|
|
|
wrapGAppsHook
|
2018-09-12 20:28:23 +02:00
|
|
|
];
|
2019-10-19 23:01:24 +02:00
|
|
|
|
2018-09-12 20:28:23 +02:00
|
|
|
buildInputs = [
|
2019-10-19 23:01:24 +02:00
|
|
|
clutter # required by mutter-clutter
|
|
|
|
gjs
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
mutter
|
|
|
|
pango
|
2018-09-12 20:28:23 +02:00
|
|
|
];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2019-10-19 23:01:24 +02:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dcontrol-center-keybindings-dir=${placeholder "out"}/share/gnome-control-center/keybindings"
|
|
|
|
"-Ddbus-services-dir=${placeholder "out"}/share/dbus-1/services"
|
|
|
|
"-Dsystemd-user-unit-dir=${placeholder "out"}/etc/systemd/user"
|
2018-09-12 20:28:23 +02:00
|
|
|
];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2019-10-19 23:01:24 +02:00
|
|
|
postInstall = ''
|
|
|
|
${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas"
|
|
|
|
'';
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-10-19 23:01:24 +02:00
|
|
|
homepage = "https://github.com/Keruspe/GPaste";
|
|
|
|
description = "Clipboard management system with GNOME 3 integration";
|
2016-09-18 21:35:23 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-04-01 14:40:51 +02:00
|
|
|
maintainers = teams.gnome.members;
|
2016-09-18 21:35:23 +02:00
|
|
|
};
|
|
|
|
}
|