2022-03-30 09:31:56 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
2024-05-15 15:35:15 +00:00
|
|
|
|
, fetchurl
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, gjs
|
|
|
|
|
, glib
|
|
|
|
|
, gobject-introspection
|
|
|
|
|
, gtk3
|
2022-03-30 09:31:56 +00:00
|
|
|
|
, gtk4
|
2022-10-21 18:38:19 +00:00
|
|
|
|
, gcr_4
|
2022-03-30 09:31:56 +00:00
|
|
|
|
, libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, pango
|
2021-02-05 17:12:51 +00:00
|
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, vala
|
2022-10-21 18:38:19 +00:00
|
|
|
|
, desktop-file-utils
|
2024-05-15 15:35:15 +00:00
|
|
|
|
, wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
|
version = "45.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
pname = "gpaste";
|
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
|
src = fetchurl {
|
|
|
|
|
url = "https://www.imagination-land.org/files/gpaste/GPaste-${finalAttrs.version}.tar.xz";
|
|
|
|
|
hash = "sha256-yYLoHn3/2xlefBeErnydNfkvtJva8/9f9JHhfschBpQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
|
./fix-paths.patch
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# TODO: switch to substituteAll with placeholder
|
|
|
|
|
# https://github.com/NixOS/nix/issues/1846
|
|
|
|
|
postPatch = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
|
substituteInPlace src/libgpaste/gpaste/gpaste-settings.c \
|
2024-05-15 15:35:15 +00:00
|
|
|
|
--subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${finalAttrs.pname}-${finalAttrs.version}"}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
gobject-introspection
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
vala
|
2022-10-21 18:38:19 +00:00
|
|
|
|
desktop-file-utils
|
2024-05-15 15:35:15 +00:00
|
|
|
|
wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
gjs
|
|
|
|
|
glib
|
|
|
|
|
gtk3
|
2022-03-30 09:31:56 +00:00
|
|
|
|
gtk4
|
2022-10-21 18:38:19 +00:00
|
|
|
|
gcr_4
|
2022-03-30 09:31:56 +00:00
|
|
|
|
libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
|
pango
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
];
|
|
|
|
|
|
2024-01-02 11:29:13 +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-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
homepage = "https://github.com/Keruspe/GPaste";
|
2024-10-04 16:56:33 +00:00
|
|
|
|
changelog = "https://github.com/Keruspe/GPaste/blob/v${finalAttrs.version}/NEWS";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
description = "Clipboard management system with GNOME integration";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
mainProgram = "gpaste-client";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
license = licenses.bsd2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
})
|