about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/X11
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/tools/X11
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/tools/X11')
-rw-r--r--nixpkgs/pkgs/tools/X11/ckbcomp/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/X11/ffcast/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/X11/wpgtk/default.nix3
-rw-r--r--nixpkgs/pkgs/tools/X11/xdg-utils/default.nix268
-rw-r--r--nixpkgs/pkgs/tools/X11/xmousepasteblock/default.nix4
5 files changed, 230 insertions, 53 deletions
diff --git a/nixpkgs/pkgs/tools/X11/ckbcomp/default.nix b/nixpkgs/pkgs/tools/X11/ckbcomp/default.nix
index 1b50b2456d0a..89bc5939299b 100644
--- a/nixpkgs/pkgs/tools/X11/ckbcomp/default.nix
+++ b/nixpkgs/pkgs/tools/X11/ckbcomp/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "ckbcomp";
-  version = "1.223";
+  version = "1.224";
 
   src = fetchFromGitLab {
     domain = "salsa.debian.org";
     owner = "installer-team";
     repo = "console-setup";
     rev = version;
-    sha256 = "sha256-B0wUMyYNpPddrE4feUaHoeTtoJdE+IS7nY8gOvPBYSU=";
+    sha256 = "sha256-oqpETbMc0J8AKqt251kmxYyA2wgXxI1V2t6oJC14MfM=";
   };
 
   buildInputs = [ perl ];
diff --git a/nixpkgs/pkgs/tools/X11/ffcast/default.nix b/nixpkgs/pkgs/tools/X11/ffcast/default.nix
index 9b2611dde210..c70ef9da2e3c 100644
--- a/nixpkgs/pkgs/tools/X11/ffcast/default.nix
+++ b/nixpkgs/pkgs/tools/X11/ffcast/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "ffcast";
-  version = "2.5.0";
+  version = "2.5.1";
 
   src = fetchFromGitHub {
     owner = "ropery";
     repo = "FFcast";
     rev = version;
-    sha256 = "047y32bixhc8ksr98vwpgd0k1xxgsv2vs0n3kc2xdac4krc9454h";
+    sha256 = "sha256-kxqwDGEguFTFHkQzXctXqxslt0+bYnfUdQ8C/8+eTXo=";
   };
 
   nativeBuildInputs = [ autoreconfHook makeWrapper perl /*for pod2man*/ ];
diff --git a/nixpkgs/pkgs/tools/X11/wpgtk/default.nix b/nixpkgs/pkgs/tools/X11/wpgtk/default.nix
index f5489aa8b82f..371642cbfa7e 100644
--- a/nixpkgs/pkgs/tools/X11/wpgtk/default.nix
+++ b/nixpkgs/pkgs/tools/X11/wpgtk/default.nix
@@ -49,6 +49,7 @@ python3Packages.buildPythonApplication rec {
     homepage = "https://github.com/deviantfero/wpgtk";
     license = licenses.gpl2Only;
     platforms = platforms.linux;
-    maintainers = [ maintainers.melkor333 maintainers.cafkafk ];
+    maintainers = with maintainers; [ melkor333 cafkafk ];
+    mainProgram = "wpg";
   };
 }
diff --git a/nixpkgs/pkgs/tools/X11/xdg-utils/default.nix b/nixpkgs/pkgs/tools/X11/xdg-utils/default.nix
index 3be7b2fd0ee6..3db16f067148 100644
--- a/nixpkgs/pkgs/tools/X11/xdg-utils/default.nix
+++ b/nixpkgs/pkgs/tools/X11/xdg-utils/default.nix
@@ -1,9 +1,10 @@
-{ lib, stdenv, fetchFromGitLab, fetchFromGitHub, fetchpatch
-, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
-, w3m, gnugrep, gnused, coreutils, xset, perlPackages
-, mimiSupport ? false, gawk
-, bash
-, glib
+{ lib, stdenv, fetchFromGitLab, fetchFromGitHub, fetchpatch, writeText
+# docs deps
+, libxslt, docbook_xml_dtd_412, docbook_xml_dtd_43, docbook_xsl, xmlto
+# runtime deps
+, resholve, bash, coreutils, dbus, file, gawk, glib, gnugrep, gnused, jq, lockfileProgs, nettools, procmail, procps, xdg-user-dirs
+, perl, perlPackages
+, mimiSupport ? false
 , withXdgOpenUsePortalPatch ? true }:
 
 let
@@ -15,73 +16,248 @@ let
     sha256 = "15gw2nyrqmdsdin8gzxihpn77grhk9l97jp7s7pr7sl4n9ya2rpj";
   };
 
-  perlPath = with perlPackages; makePerlPath [
-    NetDBus XMLTwig XMLParser X11Protocol
+  # Required by the common desktop detection code
+  commonDeps = [ dbus coreutils gnugrep gnused ];
+  # These are all faked because the current desktop is detected
+  # based on their presence, so we want them to be missing by default.
+  commonFakes = [
+    "explorer.exe"
+    "gnome-default-applications-properties"
+    "kde-config"
+    "xprop"
   ];
 
+  # This is still required to work around the eval trickery some scripts do
+  commonPrologue = "${writeText "xdg-utils-prologue" ''
+    export PATH=$PATH:${coreutils}/bin
+  ''}";
+
+  solutions = [
+    {
+      scripts = [ "bin/xdg-desktop-icon" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ xdg-user-dirs ];
+      execer = [
+        "cannot:${xdg-user-dirs}/bin/xdg-user-dir"
+      ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "gconftool-2"   # GNOME2
+      ];
+      keep."$KDE_SESSION_VERSION" = true;
+      prologue = commonPrologue;
+    }
+
+    {
+      scripts = [ "bin/xdg-desktop-menu" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ gawk ];
+      fake.external = commonFakes;
+      keep."$KDE_SESSION_VERSION" = true;
+      prologue = commonPrologue;
+    }
+
+    {
+      scripts = [ "bin/xdg-email" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ gawk glib.bin "${placeholder "out"}/bin" ];
+      execer = [
+        "cannot:${placeholder "out"}/bin/xdg-mime"
+        "cannot:${placeholder "out"}/bin/xdg-open"
+      ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "exo-open"           # XFCE
+        "gconftool-2"        # GNOME
+        "gio"                # GNOME (new)
+        "gnome-open"         # GNOME (very old)
+        "gvfs-open"          # GNOME (old)
+        "qtxdg-mat"          # LXQT
+        "xdg-email-hook.sh"  # user-defined hook that may be available ambiently
+      ];
+      fix."/bin/echo" = true;
+      keep = {
+        "$command" = true;
+        "$kreadconfig" = true;
+        "$THUNDERBIRD" = true;
+        "$utf8" = true;
+      };
+    }
+
+    {
+      scripts = [ "bin/xdg-icon-resource" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps;
+      fake.external = commonFakes;
+      keep."$KDE_SESSION_VERSION" = true;
+      prologue = commonPrologue;
+    }
+
+    {
+      scripts = [ "bin/xdg-mime" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ file gawk ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "gio"                # GNOME (new)
+        "gnomevfs-info"      # GNOME (very old)
+        "gvfs-info"          # GNOME (old)
+        "kde4-config"        # Plasma 4
+        "kfile"              # KDE 3
+        "kmimetypefinder"    # Plasma (generic)
+        "kmimetypefinder5"   # Plasma 5
+        "ktraderclient"      # KDE 3
+        "ktradertest"        # KDE 3
+        "mimetype"           # alternative tool for file, pulls in perl, avoid
+        "qtpaths"            # Plasma
+        "qtxdg-mat"          # LXQT
+      ];
+      fix."/usr/bin/file" = true;
+      keep = {
+        "$KDE_SESSION_VERSION" = true;
+        "$KTRADER" = true;
+      };
+      prologue = commonPrologue;
+    }
+
+    {
+      scripts = [ "bin/xdg-open" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ nettools glib.bin "${placeholder "out"}/bin" ];
+      execer = [
+        "cannot:${placeholder "out"}/bin/xdg-mime"
+      ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "cygstart"            # Cygwin
+        "dde-open"            # Deepin
+        "enlightenment_open"  # Enlightenment
+        "exo-open"            # XFCE
+        "gio"                 # GNOME (new)
+        "gnome-open"          # GNOME (very old)
+        "gvfs-open"           # GNOME (old)
+        "kde-open"            # Plasma
+        "kfmclient"           # KDE3
+        "mate-open"           # MATE
+        "mimeopen"            # alternative tool for file, pulls in perl, avoid
+        "open"                # macOS
+        "pcmanfm"             # LXDE
+        "qtxdg-mat"           # LXQT
+        "run-mailcap"         # generic
+        "rundll32.exe"        # WSL
+        "wslpath"             # WSL
+      ];
+      fix."$printf" = [ "printf" ];
+      keep = {
+        "env:$command" = true;
+        "$browser" = true;
+        "$KDE_SESSION_VERSION" = true;
+      };
+    }
+
+    {
+      scripts = [ "bin/xdg-screensaver" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ lockfileProgs nettools perl procmail procps ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "dcop"                      # KDE3
+        "mate-screensaver-command"  # MATE
+        "xautolock"                 # Xautolock
+        "xscreensaver-command"      # Xscreensaver
+        "xset"                      # generic-ish X
+      ];
+      fix."$lockfile_command" = [ "lockfile" ];
+      keep = {
+        "$MV" = true;
+        "$XPROP" = true;
+      };
+      prologue = "${writeText "xdg-screensaver-prologue" ''
+        export PERL5LIB=${with perlPackages; makePerlPath [ NetDBus XMLTwig XMLParser X11Protocol ]}
+        export PATH=$PATH:${coreutils}/bin
+      ''}";
+    }
+
+    {
+      scripts = [ "bin/xdg-settings" ];
+      interpreter = "${bash}/bin/bash";
+      inputs = commonDeps ++ [ jq "${placeholder "out"}/bin" ];
+      execer = [
+        "cannot:${placeholder "out"}/bin/xdg-mime"
+      ];
+      # These are desktop-specific, so we don't want xdg-utils to be able to
+      # call them when in a different setup.
+      fake.external = commonFakes ++ [
+        "gconftool-2"    # GNOME
+        "kreadconfig"    # Plasma (generic)
+        "kreadconfig5"   # Plasma 5
+        "kreadconfig6"   # Plasma 6
+        "ktradertest"    # KDE3
+        "kwriteconfig"   # Plasma (generic)
+        "kwriteconfig5"  # Plasma 5
+        "kwriteconfig6"  # Plasma 6
+        "qtxdg-mat"      # LXQT
+      ];
+      keep = {
+        "$KDE_SESSION_VERSION" = true;
+        # get_browser_$handler
+        "$handler" = true;
+      };
+    }
+  ];
 in
 
 stdenv.mkDerivation rec {
   pname = "xdg-utils";
-  version = "unstable-2022-11-06";
+  version = "1.2.0";
 
   src = fetchFromGitLab {
     domain = "gitlab.freedesktop.org";
     owner = "xdg";
     repo = "xdg-utils";
-    rev = "8ae02631a9806da11b34cd6b274af02d28aee5da";
-    sha256 = "sha256-WdnnAiPYbREny633FnBi5tD9hDuF8NCVVbUaAVIKTxM=";
+    rev = "v${version}";
+    hash = "sha256-rjNIO4B9jHsBmPaugWTMqTGNpjiw0MTEmf9/ds2Mud4=";
   };
 
-  patches = lib.optionals withXdgOpenUsePortalPatch [
+  patches = [
+    # Backport typo fix
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/af2fe0d1dcbcd982d84ddf2bbd174afe90976ed9.patch";
+      hash = "sha256-HhQk06wWkyWjSxjXet+sADKf1irswKxDA8WuOknZKRs=";
+    })
+    # Backport docs rendering fixes
+    # See: https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/106
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/403a720ad18920030418a7c3d1f2caba9ce3892d.patch";
+      hash = "sha256-XxFUeyXENHCy+wplIJ5OzoU5oyA4v1bz/9qMXp1ZwsE=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/a137f2ba87620402aca21b14fb1d79517782dd29.patch";
+      hash = "sha256-XFUAWn4uOyzgLdvupBxsO7wm6VDSzYj1SGZEM+9ouec=";
+    })
+  ] ++ lib.optionals withXdgOpenUsePortalPatch [
     # Allow forcing the use of XDG portals using NIXOS_XDG_OPEN_USE_PORTAL environment variable.
     # Upstream PR: https://github.com/freedesktop/xdg-utils/pull/12
     ./allow-forcing-portal-use.patch
-    # Allow opening files when using portal with xdg-open.
-    # Upstream PR: https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/65
-    (fetchpatch {
-      name = "support-openfile-with-portal.patch";
-      url = "https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/5cd8c38f58d9db03240f4bc67267fe3853b66ec7.diff";
-      hash = "sha256-snkhxwGF9hpqEh5NGG8xixTi/ydAk5apXRtgYrVgNY8=";
-    })
   ];
 
   # just needed when built from git
-  nativeBuildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ];
+  nativeBuildInputs = [ libxslt docbook_xml_dtd_412 docbook_xml_dtd_43 docbook_xsl xmlto ];
 
   # explicitly provide a runtime shell so patchShebangs is consistent across build platforms
   buildInputs = [ bash ];
 
   postInstall = lib.optionalString mimiSupport ''
     cp ${mimisrc}/xdg-open $out/bin/xdg-open
-  '' + ''
-    sed  '2s#.#\
-    sed()   { ${gnused}/bin/sed     "$@"; }\
-    grep()  { ${gnugrep}/bin/grep   "$@"; }\
-    egrep() { ${gnugrep}/bin/egrep  "$@"; }\
-    file()  { ${file}/bin/file      "$@"; }\
-    awk()   { ${gawk}/bin/awk       "$@"; }\
-    xset()  { ${xset}/bin/xset      "$@"; }\
-    perl()  { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\
-    mimetype() { ${perlPackages.FileMimeInfo}/bin/mimetype "$@"; }\
-    PATH=$PATH:'$out'/bin:${coreutils}/bin\
-    &#' -i "$out"/bin/*
-
-    substituteInPlace $out/bin/xdg-open \
-      --replace "/usr/bin/printf" "${coreutils}/bin/printf" \
-      --replace "gdbus" "${glib}/bin/gdbus" \
-      --replace "mimeopen" "${perlPackages.FileMimeInfo}/bin/mimeopen"
-
-    substituteInPlace $out/bin/xdg-mime \
-      --replace "/usr/bin/file" "${file}/bin/file"
-
-    substituteInPlace $out/bin/xdg-email \
-      --replace "/bin/echo" "${coreutils}/bin/echo" \
-      --replace "gdbus" "${glib}/bin/gdbus"
-
-    sed 's|\bwhich\b|type -P|g' -i "$out"/bin/*
   '';
 
+  preFixup = lib.concatStringsSep "\n" (map (resholve.phraseSolution "xdg-utils-resholved") solutions);
+
   meta = with lib; {
     homepage = "https://www.freedesktop.org/wiki/Software/xdg-utils/";
     description = "A set of command line tools that assist applications with a variety of desktop integration tasks";
diff --git a/nixpkgs/pkgs/tools/X11/xmousepasteblock/default.nix b/nixpkgs/pkgs/tools/X11/xmousepasteblock/default.nix
index 121ec93b2242..47140093be25 100644
--- a/nixpkgs/pkgs/tools/X11/xmousepasteblock/default.nix
+++ b/nixpkgs/pkgs/tools/X11/xmousepasteblock/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "xmousepasteblock";
-  version = "1.3";
+  version = "1.4";
   src = fetchFromGitHub {
     owner = "milaq";
     repo = "XMousePasteBlock";
-    hash = "sha256-0rpAbYUU0SoeQaVNStmIEuYyiWbRAdTN7Mvm0ySDnhU=";
+    hash = "sha256-uHlHGVnIro6X4kRp79ibtqMmiv2XQT+zgbQagUxdB0c=";
     rev = version;
   };
   makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];