2022-03-20 05:12:03 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
2024-04-24 07:21:10 +00:00
|
|
|
|
, fetchurl
|
2019-10-19 21:01:24 +00:00
|
|
|
|
, gjs
|
|
|
|
|
, glib
|
|
|
|
|
, gobject-introspection
|
|
|
|
|
, gtk3
|
2022-03-20 05:12:03 +00:00
|
|
|
|
, gtk4
|
2022-09-08 13:21:56 +00:00
|
|
|
|
, gcr_4
|
2022-03-20 05:12:03 +00:00
|
|
|
|
, libadwaita
|
2019-10-19 21:01:24 +00:00
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, pango
|
2021-01-17 02:21:50 +00:00
|
|
|
|
, pkg-config
|
2019-10-19 21:01:24 +00:00
|
|
|
|
, vala
|
2022-09-08 13:21:56 +00:00
|
|
|
|
, desktop-file-utils
|
2024-04-26 20:24:03 +00:00
|
|
|
|
, wrapGAppsHook3
|
2019-10-19 21:01:24 +00:00
|
|
|
|
}:
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
2024-04-24 07:21:10 +00:00
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
|
version = "45.1";
|
2019-08-15 12:41:18 +00:00
|
|
|
|
pname = "gpaste";
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
2024-04-24 07:21:10 +00:00
|
|
|
|
src = fetchurl {
|
|
|
|
|
url = "https://www.imagination-land.org/files/gpaste/GPaste-${finalAttrs.version}.tar.xz";
|
|
|
|
|
hash = "sha256-yYLoHn3/2xlefBeErnydNfkvtJva8/9f9JHhfschBpQ=";
|
2016-09-18 19:35:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
2018-07-23 02:11:03 +00:00
|
|
|
|
patches = [
|
|
|
|
|
./fix-paths.patch
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# TODO: switch to substituteAll with placeholder
|
|
|
|
|
# https://github.com/NixOS/nix/issues/1846
|
|
|
|
|
postPatch = ''
|
2022-03-20 05:12:03 +00:00
|
|
|
|
substituteInPlace src/libgpaste/gpaste/gpaste-settings.c \
|
2024-04-24 07:21:10 +00:00
|
|
|
|
--subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${finalAttrs.pname}-${finalAttrs.version}"}
|
2018-07-23 02:11:03 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2018-09-12 18:28:23 +00:00
|
|
|
|
nativeBuildInputs = [
|
2019-10-19 21:01:24 +00:00
|
|
|
|
gobject-introspection
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2021-01-17 02:21:50 +00:00
|
|
|
|
pkg-config
|
2019-10-19 21:01:24 +00:00
|
|
|
|
vala
|
2022-09-08 13:21:56 +00:00
|
|
|
|
desktop-file-utils
|
2024-04-26 20:24:03 +00:00
|
|
|
|
wrapGAppsHook3
|
2018-09-12 18:28:23 +00:00
|
|
|
|
];
|
2019-10-19 21:01:24 +00:00
|
|
|
|
|
2018-09-12 18:28:23 +00:00
|
|
|
|
buildInputs = [
|
2019-10-19 21:01:24 +00:00
|
|
|
|
gjs
|
|
|
|
|
glib
|
|
|
|
|
gtk3
|
2022-03-20 05:12:03 +00:00
|
|
|
|
gtk4
|
2022-09-08 13:21:56 +00:00
|
|
|
|
gcr_4
|
2022-03-20 05:12:03 +00:00
|
|
|
|
libadwaita
|
2019-10-19 21:01:24 +00:00
|
|
|
|
pango
|
2018-09-12 18:28:23 +00:00
|
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
2019-10-19 21:01:24 +00: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 18:28:23 +00:00
|
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
2023-12-08 21:58:29 +00:00
|
|
|
|
postInstall = ''
|
|
|
|
|
# We do not have central location to install typelibs to,
|
|
|
|
|
# let’s ensure GNOME Shell can still find them.
|
|
|
|
|
extensionDir="$out/share/gnome-shell/extensions/GPaste@gnome-shell-extensions.gnome.org"
|
|
|
|
|
mv "$extensionDir/"{extension,.extension-wrapped}.js
|
|
|
|
|
mv "$extensionDir/"{prefs,.prefs-wrapped}.js
|
|
|
|
|
substitute "${./wrapper.js}" "$extensionDir/extension.js" \
|
|
|
|
|
--subst-var-by originalName "extension" \
|
|
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
|
|
|
|
substitute "${./wrapper.js}" "$extensionDir/prefs.js" \
|
|
|
|
|
--subst-var-by originalName "prefs" \
|
|
|
|
|
--subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0"
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2019-10-19 21:01:24 +00:00
|
|
|
|
homepage = "https://github.com/Keruspe/GPaste";
|
2024-10-04 19:35:12 +00:00
|
|
|
|
changelog = "https://github.com/Keruspe/GPaste/blob/v${finalAttrs.version}/NEWS";
|
2024-04-24 07:21:10 +00:00
|
|
|
|
description = "Clipboard management system with GNOME integration";
|
2024-03-19 02:14:51 +00:00
|
|
|
|
mainProgram = "gpaste-client";
|
2024-04-24 07:21:10 +00:00
|
|
|
|
license = licenses.bsd2;
|
2016-09-18 19:35:23 +00:00
|
|
|
|
platforms = platforms.linux;
|
2020-04-01 12:40:51 +00:00
|
|
|
|
maintainers = teams.gnome.members;
|
2016-09-18 19:35:23 +00:00
|
|
|
|
};
|
2024-04-24 07:21:10 +00:00
|
|
|
|
})
|