2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-10-19 22:01:24 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, appstream-glib
|
|
|
|
, clutter
|
|
|
|
, gjs
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, meson
|
|
|
|
, mutter
|
|
|
|
, ninja
|
|
|
|
, pango
|
2021-01-17 02:21:50 +00:00
|
|
|
, pkg-config
|
2019-10-19 22:01:24 +01:00
|
|
|
, vala
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-02 15:23:21 +00:00
|
|
|
version = "3.38.3";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gpaste";
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-10-19 22:01:24 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Keruspe";
|
|
|
|
repo = "GPaste";
|
|
|
|
rev = "v${version}";
|
2020-11-02 15:23:21 +00:00
|
|
|
sha256 = "10ag0mrr4r40414nyarghpgjawvf331asxgq47dqjfxr5w7bz6wc";
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
|
|
|
|
2018-07-23 03:11:03 +01: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 19:28:23 +01:00
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
2018-07-23 03:11:03 +01:00
|
|
|
substituteInPlace src/gnome-shell/prefs.js \
|
2018-09-12 19:28:23 +01:00
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
2018-07-23 03:11:03 +01:00
|
|
|
substituteInPlace src/libgpaste/settings/gpaste-settings.c \
|
2019-08-27 19:25:43 +01:00
|
|
|
--subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"}
|
2018-07-23 03:11:03 +01:00
|
|
|
'';
|
|
|
|
|
2018-09-12 19:28:23 +01:00
|
|
|
nativeBuildInputs = [
|
2019-10-19 22:01:24 +01:00
|
|
|
appstream-glib
|
|
|
|
gobject-introspection
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-17 02:21:50 +00:00
|
|
|
pkg-config
|
2019-10-19 22:01:24 +01:00
|
|
|
vala
|
|
|
|
wrapGAppsHook
|
2018-09-12 19:28:23 +01:00
|
|
|
];
|
2019-10-19 22:01:24 +01:00
|
|
|
|
2018-09-12 19:28:23 +01:00
|
|
|
buildInputs = [
|
2019-10-19 22:01:24 +01:00
|
|
|
clutter # required by mutter-clutter
|
|
|
|
gjs
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
mutter
|
|
|
|
pango
|
2018-09-12 19:28:23 +01:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-10-19 22:01:24 +01: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 19:28:23 +01:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-10-19 22:01:24 +01:00
|
|
|
postInstall = ''
|
|
|
|
${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas"
|
|
|
|
'';
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-19 22:01:24 +01:00
|
|
|
homepage = "https://github.com/Keruspe/GPaste";
|
|
|
|
description = "Clipboard management system with GNOME 3 integration";
|
2016-09-18 20:35:23 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-04-01 13:40:51 +01:00
|
|
|
maintainers = teams.gnome.members;
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
|
|
|
}
|