about summary refs log tree commit diff
path: root/pkgs/by-name/gp
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/gp')
-rw-r--r--pkgs/by-name/gp/gpaste/fix-paths.patch16
-rw-r--r--pkgs/by-name/gp/gpaste/package.nix88
-rw-r--r--pkgs/by-name/gp/gpaste/wrapper.js5
-rw-r--r--pkgs/by-name/gp/gpscorrelate/package.nix1
-rw-r--r--pkgs/by-name/gp/gpsprune/package.nix1
-rw-r--r--pkgs/by-name/gp/gpt4all/package.nix9
-rw-r--r--pkgs/by-name/gp/gptscript/package.nix6
7 files changed, 117 insertions, 9 deletions
diff --git a/pkgs/by-name/gp/gpaste/fix-paths.patch b/pkgs/by-name/gp/gpaste/fix-paths.patch
new file mode 100644
index 0000000000000..ebebc8a20bd66
--- /dev/null
+++ b/pkgs/by-name/gp/gpaste/fix-paths.patch
@@ -0,0 +1,16 @@
+diff --git a/src/libgpaste/gpaste/gpaste-settings.c b/src/libgpaste/gpaste/gpaste-settings.c
+index 830f5e0b..c8df0e11 100644
+--- a/src/libgpaste/gpaste/gpaste-settings.c
++++ b/src/libgpaste/gpaste/gpaste-settings.c
+@@ -1039,7 +1039,10 @@ create_g_settings (void)
+     }
+     else
+     {
+-        return g_settings_new (G_PASTE_SETTINGS_NAME);
++        // library used by introspection requires schemas but we cannot set XDG_DATA_DIRS for the library
++        g_autoptr (GSettingsSchemaSource) schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL);
++        g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (schema_source, G_PASTE_SETTINGS_NAME, FALSE);
++        return g_settings_new_full (schema, NULL, NULL);
+     }
+ }
+ 
diff --git a/pkgs/by-name/gp/gpaste/package.nix b/pkgs/by-name/gp/gpaste/package.nix
new file mode 100644
index 0000000000000..16da276b64b55
--- /dev/null
+++ b/pkgs/by-name/gp/gpaste/package.nix
@@ -0,0 +1,88 @@
+{ stdenv
+, lib
+, fetchurl
+, gjs
+, glib
+, gobject-introspection
+, gtk3
+, gtk4
+, gcr_4
+, libadwaita
+, meson
+, ninja
+, pango
+, pkg-config
+, vala
+, desktop-file-utils
+, wrapGAppsHook3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "45.1";
+  pname = "gpaste";
+
+  src = fetchurl {
+    url = "https://www.imagination-land.org/files/gpaste/GPaste-${finalAttrs.version}.tar.xz";
+    hash = "sha256-yYLoHn3/2xlefBeErnydNfkvtJva8/9f9JHhfschBpQ=";
+  };
+
+  patches = [
+    ./fix-paths.patch
+  ];
+
+  # TODO: switch to substituteAll with placeholder
+  # https://github.com/NixOS/nix/issues/1846
+  postPatch = ''
+    substituteInPlace src/libgpaste/gpaste/gpaste-settings.c \
+      --subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${finalAttrs.pname}-${finalAttrs.version}"}
+  '';
+
+  nativeBuildInputs = [
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+    desktop-file-utils
+    wrapGAppsHook3
+  ];
+
+  buildInputs = [
+    gjs
+    glib
+    gtk3
+    gtk4
+    gcr_4
+    libadwaita
+    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"
+  ];
+
+  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"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Keruspe/GPaste";
+    description = "Clipboard management system with GNOME integration";
+    mainProgram = "gpaste-client";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = teams.gnome.members;
+  };
+})
diff --git a/pkgs/by-name/gp/gpaste/wrapper.js b/pkgs/by-name/gp/gpaste/wrapper.js
new file mode 100644
index 0000000000000..ea6a9cba6f6fb
--- /dev/null
+++ b/pkgs/by-name/gp/gpaste/wrapper.js
@@ -0,0 +1,5 @@
+import GIRepository from 'gi://GIRepository';
+
+GIRepository.Repository.prepend_search_path('@typelibDir@');
+
+export default (await import('./.@originalName@-wrapped.js')).default;
diff --git a/pkgs/by-name/gp/gpscorrelate/package.nix b/pkgs/by-name/gp/gpscorrelate/package.nix
index 2bbd2a9850e49..130ca82d7bc59 100644
--- a/pkgs/by-name/gp/gpscorrelate/package.nix
+++ b/pkgs/by-name/gp/gpscorrelate/package.nix
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
 
     license = licenses.gpl2Plus;
     homepage = "https://dfandrich.github.io/gpscorrelate/";
+    changelog = "https://github.com/dfandrich/gpscorrelate/releases/tag/${src.rev}";
     platforms = platforms.unix;
     maintainers = with maintainers; [ sikmir ];
   };
diff --git a/pkgs/by-name/gp/gpsprune/package.nix b/pkgs/by-name/gp/gpsprune/package.nix
index 20b5dc15d6ce4..90cb23f7740c3 100644
--- a/pkgs/by-name/gp/gpsprune/package.nix
+++ b/pkgs/by-name/gp/gpsprune/package.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Application for viewing, editing and converting GPS coordinate data";
     homepage = "https://activityworkshop.net/software/gpsprune/";
+    changelog = "https://activityworkshop.net/software/gpsprune/whats_new.html";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ rycee ];
diff --git a/pkgs/by-name/gp/gpt4all/package.nix b/pkgs/by-name/gp/gpt4all/package.nix
index fbf652297a25e..60a6e05de211b 100644
--- a/pkgs/by-name/gp/gpt4all/package.nix
+++ b/pkgs/by-name/gp/gpt4all/package.nix
@@ -47,12 +47,9 @@ stdenv.mkDerivation (finalAttrs: {
   ] ++ lib.optionals cudaSupport (
       with cudaPackages;
       [
-        cuda_cccl.dev
-        cuda_cudart.dev
-        cuda_cudart.lib
-        cuda_cudart.static
-        libcublas.dev
-        libcublas.lib
+        cuda_cccl
+        cuda_cudart
+        libcublas
       ]);
 
   cmakeFlags = [
diff --git a/pkgs/by-name/gp/gptscript/package.nix b/pkgs/by-name/gp/gptscript/package.nix
index 8d4928891b370..71a2446556c2e 100644
--- a/pkgs/by-name/gp/gptscript/package.nix
+++ b/pkgs/by-name/gp/gptscript/package.nix
@@ -1,11 +1,11 @@
 {
   lib,
-  buildGo122Module,
+  buildGoModule,
   fetchFromGitHub,
   darwin,
   stdenv,
 }:
-buildGo122Module rec {
+buildGoModule rec {
   pname = "gptscript";
   version = "0.8.2";
 
@@ -32,7 +32,7 @@ buildGo122Module rec {
 
   meta = with lib; {
     homepage = "https://github.com/gptscript-ai/gptscript";
-    changelog = "https://github.com/gptscript-ai/gptscript/releases/tag/v{version}";
+    changelog = "https://github.com/gptscript-ai/gptscript/releases/tag/v${version}";
     description = "Build AI assistants that interact with your systems";
     license = with licenses; [ asl20 ];
     maintainers = with maintainers; [ jamiemagee ];