From 0b4d1d8d4ae7de68877b24e0fe544e5208008d3b Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 26 Mar 2025 09:41:49 -0700 Subject: [PATCH 01/75] minecraft-server: 1.21.4 -> 1.21.5 Change log: https://feedback.minecraft.net/hc/en-us/articles/35298208390797 --- pkgs/games/minecraft-servers/versions.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/minecraft-servers/versions.json b/pkgs/games/minecraft-servers/versions.json index 0f5a3398401e..86239afe8579 100644 --- a/pkgs/games/minecraft-servers/versions.json +++ b/pkgs/games/minecraft-servers/versions.json @@ -1,8 +1,8 @@ { "1.21": { - "sha1": "4707d00eb834b446575d89a61a11b5d548d8c001", - "url": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", - "version": "1.21.4", + "sha1": "e6ec2f64e6080b9b5d9b471b291c33cc7f509733", + "url": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", + "version": "1.21.5", "javaVersion": 21 }, "1.20": { From 1437bdb47f6db9736ad19423ec212bfad0b6c4cf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 29 Mar 2025 11:27:31 +0100 Subject: [PATCH 02/75] python313Packages.azure-mgmt-compute: 34.0.0 -> 34.1.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_34.1.0/sdk/compute/azure-mgmt-compute/CHANGELOG.md --- .../development/python-modules/azure-mgmt-compute/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-compute/default.nix b/pkgs/development/python-modules/azure-mgmt-compute/default.nix index 5ede46c1c1d4..bfd54eee341f 100644 --- a/pkgs/development/python-modules/azure-mgmt-compute/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-compute/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "azure-mgmt-compute"; - version = "34.0.0"; + version = "34.1.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "azure_mgmt_compute"; inherit version; - hash = "sha256-WM0B0CXvoChwuE2/tpg0o7I1AaE1ZYwDhU0kNOjf7h4="; + hash = "sha256-zZ010cwbjLC9JBrVXJG3fRTgSuc8YyraEUATX5whf+E="; }; build-system = [ setuptools ]; From 577417344339acac020744052a86f4d112c83e2f Mon Sep 17 00:00:00 2001 From: Ross MacLeod Date: Mon, 7 Apr 2025 23:27:48 -0400 Subject: [PATCH 03/75] Fix #396993 by tracking the new minified name of the `ServerTransferFailed` status code --- .../vscode/extensions/ms-vscode-remote.remote-ssh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix b/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix index 024c4e5237ed..d907354e073f 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix @@ -61,7 +61,7 @@ let if ! nodeVersion=$($serverNode -v); then echo "Unable to fix Node binary, quitting" - fail_with_exitcode ''${o.InstallExitCode.ServerTransferFailed} + fail_with_exitcode ''${f.UnifiedStatusCode.ServerTransferFailed} fi ${lib.optionalString useLocalExtensions '' From ace099220780e4968b74641c24b85c0ae880e670 Mon Sep 17 00:00:00 2001 From: GGG Date: Sat, 11 Jan 2025 21:04:04 -0300 Subject: [PATCH 04/75] patchcil: init at 0.2.2 --- pkgs/by-name/pa/patchcil/deps.json | 32 ++++++++++++ pkgs/by-name/pa/patchcil/package.nix | 76 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 pkgs/by-name/pa/patchcil/deps.json create mode 100644 pkgs/by-name/pa/patchcil/package.nix diff --git a/pkgs/by-name/pa/patchcil/deps.json b/pkgs/by-name/pa/patchcil/deps.json new file mode 100644 index 000000000000..175fd1c3cb4d --- /dev/null +++ b/pkgs/by-name/pa/patchcil/deps.json @@ -0,0 +1,32 @@ +[ + { + "pname": "AsmResolver", + "version": "6.0.0-beta.1", + "hash": "sha256-ZW61z6Qmztdy2NaiqxvNcP5RWBIiIO6CWNnqYq0MwoA=" + }, + { + "pname": "AsmResolver.DotNet", + "version": "6.0.0-beta.1", + "hash": "sha256-VoTiIr2/r2my6sg2AOEeiqz9vZhWtq5mGaW2Hx90Uo4=" + }, + { + "pname": "AsmResolver.PE", + "version": "6.0.0-beta.1", + "hash": "sha256-tTU/flTxRJaC4gkmI/gctqIriGIMntkgTs51TqzcQlg=" + }, + { + "pname": "AsmResolver.PE.File", + "version": "6.0.0-beta.1", + "hash": "sha256-hPuFrpcm2VMiYEirsL4kYmAhOzjwjNXUklIfYJEonLo=" + }, + { + "pname": "DotNet.Glob", + "version": "3.1.3", + "hash": "sha256-5uGSaGY1IqDjq4RCDLPJm0Lg9oyWmyR96OiNeGqSj84=" + }, + { + "pname": "System.CommandLine", + "version": "2.0.0-beta4.22272.1", + "hash": "sha256-zSO+CYnMH8deBHDI9DHhCPj79Ce3GOzHCyH1/TiHxcc=" + } +] diff --git a/pkgs/by-name/pa/patchcil/package.nix b/pkgs/by-name/pa/patchcil/package.nix new file mode 100644 index 000000000000..d0bdfb97c7b2 --- /dev/null +++ b/pkgs/by-name/pa/patchcil/package.nix @@ -0,0 +1,76 @@ +{ + lib, + fetchFromGitHub, + buildDotnetModule, + dotnetCorePackages, + stdenv, + nix-update-script, + aot ? dotnetCorePackages.sdk_9_0.hasILCompiler && !stdenv.hostPlatform.isDarwin, +}: + +buildDotnetModule rec { + pname = "patchcil"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "GGG-KILLER"; + repo = "patchcil"; + tag = "v${version}"; + hash = "sha256-jqVXKp5ShWkIMAgmcwu9/QHy+Ey9d1Piv62wsO0Xm44="; + }; + + nativeBuildInputs = lib.optional aot stdenv.cc; + + projectFile = "src/PatchCil.csproj"; + nugetDeps = ./deps.json; + + dotnet-sdk = dotnetCorePackages.sdk_9_0; + dotnet-runtime = if aot then null else dotnetCorePackages.runtime_9_0; + + selfContainedBuild = aot; + dotnetFlags = lib.optionals (!aot) [ + # Disable AOT + "-p:PublishAot=false" + "-p:InvariantGlobalization=false" + "-p:EventSourceSupport=true" + "-p:HttpActivityPropagationSupport=true" + "-p:MetadataUpdaterSupport=true" + "-p:MetricsSupport=true" + "-p:UseNativeHttpHandler=false" + "-p:XmlResolverIsNetworkingEnabledByDefault=true" + "-p:EnableGeneratedComInterfaceComImportInterop=true" + "-p:_ComObjectDescriptorSupport=true" + "-p:_DataSetXmlSerializationSupport=true" + "-p:_DefaultValueAttributeSupport=true" + "-p:_DesignerHostSupport=true" + "-p:_EnableConsumingManagedCodeFromNativeHosting=true" + "-p:_UseManagedNtlm=true" + ]; + + preFixup = lib.optionalString aot '' + # Remove debug symbols as they shouldn't have anything in them. + rm $out/lib/patchcil/patchcil.dbg + ''; + + executables = [ "patchcil" ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "A small utility to modify the library paths from PInvoke in .NET assemblies."; + homepage = "https://github.com/GGG-KILLER/patchcil"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ggg ]; + mainProgram = "patchcil"; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + "x86_64-windows" + "i686-windows" + ]; + }; +} From 84aa2c4d8e51ce0e3d5080702cc3d538fb72930e Mon Sep 17 00:00:00 2001 From: GGG Date: Sat, 11 Jan 2025 21:34:44 -0300 Subject: [PATCH 05/75] dotnetCorePackages.autoPatchcilHook: init --- .../auto-patchcil-hook/auto-patchcil.sh | 118 ++++++++++++++++++ .../dotnet/auto-patchcil-hook/default.nix | 14 +++ pkgs/development/compilers/dotnet/default.nix | 1 + pkgs/top-level/all-packages.nix | 1 + 4 files changed, 134 insertions(+) create mode 100644 pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh create mode 100644 pkgs/build-support/dotnet/auto-patchcil-hook/default.nix diff --git a/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh b/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh new file mode 100644 index 000000000000..898ad68cb969 --- /dev/null +++ b/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh @@ -0,0 +1,118 @@ +#!@shell@ +# shellcheck shell=bash + +declare -a autoPatchcilLibs +declare -a extraAutoPatchcilLibs + +gatherLibraries() { + if [ -d "$1/lib" ]; then + autoPatchcilLibs+=("$1/lib") + fi +} + +addEnvHooks "${targetOffset:?}" gatherLibraries + +# Can be used to manually add additional directories with shared object files +# to be included for the next autoPatchcil invocation. +addAutoPatchcilSearchPath() { + local -a findOpts=() + + while [ $# -gt 0 ]; do + case "$1" in + --) + shift + break + ;; + --no-recurse) + shift + findOpts+=("-maxdepth" 1) + ;; + --*) + echo "addAutoPatchcilSearchPath: ERROR: Invalid command line" \ + "argument: $1" >&2 + return 1 + ;; + *) break ;; + esac + done + + local dir= + while IFS= read -r -d '' dir; do + extraAutoPatchcilLibs+=("$dir") + done < <( + find "$@" "${findOpts[@]}" \! -type d \ + \( -name '*.so' -o -name '*.so.*' \) -print0 | + sed -z 's#/[^/]*$##' | + uniq -z + ) +} + +autoPatchcil() { + local rid= + local norecurse= + while [ $# -gt 0 ]; do + case "$1" in + --) + shift + break + ;; + --rid) + rid="$2" + shift 2 + ;; + --no-recurse) + shift + norecurse=1 + ;; + --*) + echo "autoPatchcil: ERROR: Invalid command line" \ + "argument: $1" >&2 + return 1 + ;; + *) break ;; + esac + done + + if [ -z "$rid" ]; then + echo "autoPatchcil: ERROR: No RID (Runtime ID) provided." >&2 + return 1 + fi + + local ignoreMissingDepsArray=("--ignore-missing") + concatTo ignoreMissingDepsArray autoPatchcilIgnoreMissingDeps + + if [ ${#ignoreMissingDepsArray[@]} -lt 2 ]; then + ignoreMissingDepsArray=() + fi + + local autoPatchcilFlags=( + ${norecurse:+--no-recurse} + --rid "$rid" + "${ignoreMissingDepsArray[@]}" + --paths "$@" + --libs "${autoPatchcilLibs[@]}" + ) + + # shellcheck disable=SC2016 + echoCmd 'patchcil auto flags' "${autoPatchcilFlags[@]}" + @patchcil@ auto "${autoPatchcilFlags[@]}" +} + +autoPatchcilFixupOutput() { + if [[ -z "${dontAutoPatchcil-}" ]]; then + if [ -n "${dotnetRuntimeIds+x}" ]; then + if [[ -n $__structuredAttrs ]]; then + local dotnetRuntimeIdsArray=("${dotnetRuntimeIds[@]}") + else + # shellcheck disable=SC2206 # Intentionally expanding it to preserve old behavior + local dotnetRuntimeIdsArray=($dotnetRuntimeIds) + fi + else + local dotnetRuntimeIdsArray=("") + fi + + autoPatchcil --rid "${autoPatchcilRuntimeId:-${dotnetRuntimeIdsArray[0]}}" -- "${prefix:?}" + fi +} + +fixupOutputHooks+=(autoPatchcilFixupOutput) diff --git a/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix b/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix new file mode 100644 index 000000000000..cbe9105e6115 --- /dev/null +++ b/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix @@ -0,0 +1,14 @@ +{ + lib, + bash, + patchcil, + makeSetupHook, +}: + +makeSetupHook { + name = "auto-patchcil-hook"; + substitutions = { + shell = lib.getExe bash; + patchcil = lib.getExe patchcil; + }; +} ./auto-patchcil.sh diff --git a/pkgs/development/compilers/dotnet/default.nix b/pkgs/development/compilers/dotnet/default.nix index 923c31a7fcec..b40a3e9be4f2 100644 --- a/pkgs/development/compilers/dotnet/default.nix +++ b/pkgs/development/compilers/dotnet/default.nix @@ -78,6 +78,7 @@ let patchNupkgs = callPackage ./patch-nupkgs.nix { }; nugetPackageHook = callPackage ./nuget-package-hook.nix { }; + autoPatchcilHook = callPackage ../../../build-support/dotnet/auto-patchcil-hook { }; buildDotnetModule = callPackage ../../../build-support/dotnet/build-dotnet-module { }; buildDotnetGlobalTool = callPackage ../../../build-support/dotnet/build-dotnet-global-tool { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 598fee2bfcba..4035436e05a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -495,6 +495,7 @@ with pkgs; buildDotnetGlobalTool mkNugetSource mkNugetDeps + autoPatchcilHook ; dotnetenv = callPackage ../build-support/dotnet/dotnetenv { From e2d963b9f681f6068704c28ac8babb1ae8276427 Mon Sep 17 00:00:00 2001 From: GGG Date: Sat, 11 Jan 2025 21:58:48 -0300 Subject: [PATCH 06/75] docs/autoPatchcilHook: init --- doc/hooks/autopatchcil.section.md | 17 +++++++++++++++++ doc/hooks/index.md | 1 + doc/redirects.json | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 doc/hooks/autopatchcil.section.md diff --git a/doc/hooks/autopatchcil.section.md b/doc/hooks/autopatchcil.section.md new file mode 100644 index 000000000000..f7ed8cb6835f --- /dev/null +++ b/doc/hooks/autopatchcil.section.md @@ -0,0 +1,17 @@ +# autoPatchcilHook {#setup-hook-autopatchcilhook} + +This is a special setup hook which helps in packaging .NET assemblies/programs in that it automatically tries to find missing shared library dependencies of .NET assemblies based on the given `buildInputs` and `nativeBuildInputs`. + +As the hook needs information for the host where the package will be run on, there's a required environment variable called `autoPatchcilRuntimeId` which should be filled in with the RID (Runtime Identifier) of the machine where the output will be run on. If you're using `buildDotnetModule`, it will fall back to `dotnetRuntimeIds` (which is set to `lib.singleton (if runtimeId != null then runtimeId else systemToDotnetRid stdenvNoCC.hostPlatform.system)`) for you if not provided. + +In certain situations you may want to run the main command (`autoPatchcil`) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the `dontAutoPatchcil` environment variable to a non-empty value. + +By default, `autoPatchcil` will fail as soon as any .NET assembly requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the `autoPatchcilIgnoreMissingDeps` environment variable to a non-empty value. `autoPatchcilIgnoreMissingDeps` can be set to a list like `autoPatchcilIgnoreMissingDeps = [ "libcuda.so.1" "libcudart.so.1" ];` or to `[ "*" ]` to ignore all missing dependencies. + +The `autoPatchcil` command requires the `--rid` command line flag, informing the RID (Runtime Identifier) it should assume the assemblies will be executed on, and also recognizes a `--no-recurse` command line flag, which prevents it from recursing into subdirectories. + +::: {.note} +Since, unlike most native binaries, .NET assemblies are compiled once to run on any platform, many assemblies may have PInvoke stubs for libraries that might not be available on the platform that the package will effectively run on. A few examples are assemblies that call native Windows APIs through PInvoke targeting `kernel32`, `gdi32`, `user32`, `shell32` or `ntdll`. + +`autoPatchcil` does its best to ignore dependencies from other platforms by checking the requested file extensions, however not all PInvoke stubs provide an extension so in those cases it will be necessary to list those in `autoPatchcilIgnoreMissingDeps` manually. +::: diff --git a/doc/hooks/index.md b/doc/hooks/index.md index e4b744056c5e..574b7eea8de3 100644 --- a/doc/hooks/index.md +++ b/doc/hooks/index.md @@ -7,6 +7,7 @@ The stdenv built-in hooks are documented in [](#ssec-setup-hooks). ```{=include=} sections autoconf.section.md automake.section.md +autopatchcil.section.md autopatchelf.section.md aws-c-common.section.md bmake.section.md diff --git a/doc/redirects.json b/doc/redirects.json index 2a8069a490bb..611d3974f46b 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -2064,6 +2064,9 @@ "setup-hook-automake": [ "index.html#setup-hook-automake" ], + "setup-hook-autopatchcilhook": [ + "index.html#setup-hook-autopatchcilhook" + ], "setup-hook-autopatchelfhook": [ "index.html#setup-hook-autopatchelfhook" ], From 98799331b258634013d0a69797e9a2cec523bdaa Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 14 Apr 2025 15:49:19 +0200 Subject: [PATCH 07/75] pnpm_10: 10.8.0 -> 10.8.1 Signed-off-by: Sefa Eyeoglu --- pkgs/development/tools/pnpm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/pnpm/default.nix b/pkgs/development/tools/pnpm/default.nix index b7dc82ca8cf1..cc1e1ce06109 100644 --- a/pkgs/development/tools/pnpm/default.nix +++ b/pkgs/development/tools/pnpm/default.nix @@ -16,8 +16,8 @@ let hash = "sha256-z4anrXZEBjldQoam0J1zBxFyCsxtk+nc6ax6xNxKKKc="; }; "10" = { - version = "10.8.0"; - hash = "sha256-Kb8sXOrqeZHugu7BX+cWLg+tgW0MSms1oWwB05J0v2k="; + version = "10.8.1"; + hash = "sha256-2LLrvGXPAsNJ7Ka0XJZAuRDxa2revbe5JunbRA5Hysc="; }; }; From e84975934b30a37bc917f92501c089fd903983ad Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 14 Apr 2025 17:33:31 +0200 Subject: [PATCH 08/75] keepassxc: move to by-name --- .../ke}/keepassxc/darwin.patch | 0 .../firefox-native-messaging-host.json | 0 .../ke/keepassxc/package.nix} | 30 ++++++++----------- pkgs/top-level/all-packages.nix | 4 --- 4 files changed, 13 insertions(+), 21 deletions(-) rename pkgs/{applications/misc => by-name/ke}/keepassxc/darwin.patch (100%) rename pkgs/{applications/misc => by-name/ke}/keepassxc/firefox-native-messaging-host.json (100%) rename pkgs/{applications/misc/keepassxc/default.nix => by-name/ke/keepassxc/package.nix} (91%) diff --git a/pkgs/applications/misc/keepassxc/darwin.patch b/pkgs/by-name/ke/keepassxc/darwin.patch similarity index 100% rename from pkgs/applications/misc/keepassxc/darwin.patch rename to pkgs/by-name/ke/keepassxc/darwin.patch diff --git a/pkgs/applications/misc/keepassxc/firefox-native-messaging-host.json b/pkgs/by-name/ke/keepassxc/firefox-native-messaging-host.json similarity index 100% rename from pkgs/applications/misc/keepassxc/firefox-native-messaging-host.json rename to pkgs/by-name/ke/keepassxc/firefox-native-messaging-host.json diff --git a/pkgs/applications/misc/keepassxc/default.nix b/pkgs/by-name/ke/keepassxc/package.nix similarity index 91% rename from pkgs/applications/misc/keepassxc/default.nix rename to pkgs/by-name/ke/keepassxc/package.nix index 42d69a6f863c..41c9cefb8e80 100644 --- a/pkgs/applications/misc/keepassxc/default.nix +++ b/pkgs/by-name/ke/keepassxc/package.nix @@ -3,14 +3,13 @@ stdenv, fetchFromGitHub, cmake, - qttools, + libsForQt5, apple-sdk_15, asciidoctor, botan3, curl, darwinMinVersionHook, - kio, libXi, libXtst, libargon2, @@ -19,16 +18,11 @@ pcsclite, pkg-config, qrencode, - qtbase, - qtmacextras, - qtsvg, - qtx11extras, readline, wrapGAppsHook3, - wrapQtAppsHook, zlib, - LocalAuthentication, + darwin, withKeePassBrowser ? true, withKeePassBrowserPasskeys ? true, @@ -85,7 +79,7 @@ stdenv.mkDerivation rec { export LC_ALL="en_US.UTF-8" export QT_QPA_PLATFORM=offscreen - export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}" + export QT_PLUGIN_PATH="${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix}" # testcli, testgui and testkdbx4 are flaky - skip them all # testautotype on darwin throws "QWidget: Cannot create a QWidget without QApplication" make test ARGS+="-E 'testcli|testgui${lib.optionalString stdenv.hostPlatform.isDarwin "|testautotype|testkdbx4"}' --output-on-failure" @@ -96,8 +90,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ asciidoctor cmake - wrapQtAppsHook - qttools + libsForQt5.wrapQtAppsHook + libsForQt5.qttools pkg-config ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) wrapGAppsHook3; @@ -129,21 +123,23 @@ stdenv.mkDerivation rec { [ curl botan3 - kio + libsForQt5.kio libXi libXtst libargon2 minizip pcsclite qrencode - qtbase - qtsvg + libsForQt5.qtbase + libsForQt5.qtsvg readline zlib ] - ++ lib.optional (stdenv.hostPlatform.isDarwin && withKeePassTouchID) LocalAuthentication + ++ lib.optional ( + stdenv.hostPlatform.isDarwin && withKeePassTouchID + ) darwin.apple_sdk_11_0.frameworks.LocalAuthentication ++ lib.optionals stdenv.hostPlatform.isDarwin [ - qtmacextras + libsForQt5.qtmacextras apple-sdk_15 # ScreenCaptureKit, required by livekit, is only available on 12.3 and up: @@ -151,7 +147,7 @@ stdenv.mkDerivation rec { (darwinMinVersionHook "12.3") ] ++ lib.optional stdenv.hostPlatform.isLinux libusb1 - ++ lib.optional withKeePassX11 qtx11extras; + ++ lib.optional withKeePassX11 libsForQt5.qtx11extras; passthru.tests = nixosTests.keepassxc; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1fb79a10b39..dd685aa63674 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14201,10 +14201,6 @@ with pkgs; avahi = avahi.override { withLibdnssdCompat = true; }; }; - keepassxc = libsForQt5.callPackage ../applications/misc/keepassxc { - inherit (darwin.apple_sdk_11_0.frameworks) LocalAuthentication; - }; - evolution-data-server-gtk4 = evolution-data-server.override { withGtk3 = false; withGtk4 = true; From 76283b0def7307df3a90200806f8ca1b1aa3f6d3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 14 Apr 2025 17:39:02 +0200 Subject: [PATCH 09/75] keepassxc: modernize --- pkgs/by-name/ke/keepassxc/package.nix | 83 ++++++++++++++++++--------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/pkgs/by-name/ke/keepassxc/package.nix b/pkgs/by-name/ke/keepassxc/package.nix index 41c9cefb8e80..26867e9ed779 100644 --- a/pkgs/by-name/ke/keepassxc/package.nix +++ b/pkgs/by-name/ke/keepassxc/package.nix @@ -15,6 +15,7 @@ libargon2, libusb1, minizip, + nix-update-script, pcsclite, pkg-config, qrencode, @@ -37,14 +38,14 @@ nixosTests, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "keepassxc"; version = "2.7.10"; src = fetchFromGitHub { owner = "keepassxreboot"; repo = "keepassxc"; - rev = version; + tag = finalAttrs.version; hash = "sha256-FBoqCYNM/leN+w4aV0AJMx/G0bjHbI9KVWrnmq3NfaI="; }; @@ -60,18 +61,34 @@ stdenv.mkDerivation rec { cmakeFlags = [ - "-DKEEPASSXC_BUILD_TYPE=Release" - "-DWITH_GUI_TESTS=ON" - "-DWITH_XC_UPDATECHECK=OFF" + (lib.cmakeFeature "KEEPASSXC_BUILD_TYPE" "Release") + (lib.cmakeBool "WITH_GUI_TESTS" true) + (lib.cmakeBool "WITH_XC_UPDATECHECK" false) ] - ++ (lib.optional (!withKeePassX11) "-DWITH_XC_X11=OFF") - ++ (lib.optional (withKeePassFDOSecrets && stdenv.hostPlatform.isLinux) "-DWITH_XC_FDOSECRETS=ON") - ++ (lib.optional (withKeePassYubiKey && stdenv.hostPlatform.isLinux) "-DWITH_XC_YUBIKEY=ON") - ++ (lib.optional withKeePassBrowser "-DWITH_XC_BROWSER=ON") - ++ (lib.optional withKeePassBrowserPasskeys "-DWITH_XC_BROWSER_PASSKEYS=ON") - ++ (lib.optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON") - ++ (lib.optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON") - ++ (lib.optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON"); + ++ lib.optionals (!withKeePassX11) [ + (lib.cmakeBool "WITH_XC_X11" false) + ] + ++ lib.optionals (withKeePassFDOSecrets && stdenv.hostPlatform.isLinux) [ + (lib.cmakeBool "WITH_XC_FDOSECRETS" true) + ] + ++ lib.optionals (withKeePassYubiKey && stdenv.hostPlatform.isLinux) [ + (lib.cmakeBool "WITH_XC_YUBIKEY" true) + ] + ++ lib.optionals withKeePassBrowser [ + (lib.cmakeBool "WITH_XC_BROWSER" true) + ] + ++ lib.optionals withKeePassBrowserPasskeys [ + (lib.cmakeBool "WITH_XC_BROWSER_PASSKEYS" true) + ] + ++ lib.optionals withKeePassKeeShare [ + (lib.cmakeBool "WITH_XC_KEESHARE" true) + ] + ++ lib.optionals withKeePassNetworking [ + (lib.cmakeBool "WITH_XC_NETWORKING" true) + ] + ++ lib.optionals withKeePassSSHAgent [ + (lib.cmakeBool "WITH_XC_SSHAGENT" true) + ]; doCheck = true; checkPhase = '' @@ -121,23 +138,23 @@ stdenv.mkDerivation rec { buildInputs = [ - curl botan3 - libsForQt5.kio + curl libXi libXtst libargon2 + libsForQt5.kio + libsForQt5.qtbase + libsForQt5.qtsvg minizip pcsclite qrencode - libsForQt5.qtbase - libsForQt5.qtsvg readline zlib ] - ++ lib.optional ( - stdenv.hostPlatform.isDarwin && withKeePassTouchID - ) darwin.apple_sdk_11_0.frameworks.LocalAuthentication + ++ lib.optionals (stdenv.hostPlatform.isDarwin && withKeePassTouchID) [ + darwin.apple_sdk_11_0.frameworks.LocalAuthentication + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libsForQt5.qtmacextras @@ -146,12 +163,21 @@ stdenv.mkDerivation rec { # https://developer.apple.com/documentation/screencapturekit (darwinMinVersionHook "12.3") ] - ++ lib.optional stdenv.hostPlatform.isLinux libusb1 - ++ lib.optional withKeePassX11 libsForQt5.qtx11extras; + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libusb1 + ] + ++ lib.optionals withKeePassX11 [ + libsForQt5.qtx11extras + ]; - passthru.tests = nixosTests.keepassxc; + passthru = { + tests = { + inherit (nixosTests) keepassxc; + }; + updateScript = nix-update-script { }; + }; - meta = with lib; { + meta = { description = "Offline password manager with many features"; longDescription = '' A community fork of KeePassX, which is itself a port of KeePass Password Safe. @@ -161,12 +187,13 @@ stdenv.mkDerivation rec { using the KeePassXC Browser Extension (https://github.com/keepassxreboot/keepassxc-browser) ''; homepage = "https://keepassxc.org/"; - license = licenses.gpl2Plus; + changelog = "https://github.com/keepassxreboot/keepassxc/blob/${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.gpl2Plus; mainProgram = "keepassxc"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ blankparticle sigmasquadron ]; - platforms = platforms.linux ++ platforms.darwin; + platforms = lib.platforms.linux ++ lib.platforms.darwin; }; -} +}) From c6ade62fdbfee3b1f537ea564923a0da77fd4272 Mon Sep 17 00:00:00 2001 From: Craig Furman Date: Sat, 15 Mar 2025 10:30:42 +0000 Subject: [PATCH 10/75] autokbisw: init at 2.0.1 And add self as maintainer. --- maintainers/maintainer-list.nix | 6 +++ pkgs/by-name/au/autokbisw/nix/default.nix | 7 +++ .../au/autokbisw/nix/workspace-state.json | 25 +++++++++++ pkgs/by-name/au/autokbisw/package.nix | 45 +++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 pkgs/by-name/au/autokbisw/nix/default.nix create mode 100644 pkgs/by-name/au/autokbisw/nix/workspace-state.json create mode 100644 pkgs/by-name/au/autokbisw/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e6b577276734..b6b94bd1ddb1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5020,6 +5020,12 @@ githubId = 6470493; name = "Craige McWhirter"; }; + craigf = { + email = "craig@craigfurman.dev"; + github = "craigfurman"; + githubId = 4772216; + name = "Craig Furman"; + }; cransom = { email = "cransom@hubns.net"; github = "cransom"; diff --git a/pkgs/by-name/au/autokbisw/nix/default.nix b/pkgs/by-name/au/autokbisw/nix/default.nix new file mode 100644 index 000000000000..ef16085c27f5 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/nix/default.nix @@ -0,0 +1,7 @@ +# This file was generated by swiftpm2nix. +{ + workspaceStateFile = ./workspace-state.json; + hashes = { + "swift-argument-parser" = "sha256-FSIi4jDX7R35jDHkKzQFJLl4K0Hdx9UWgwxJbHVpsYU="; + }; +} diff --git a/pkgs/by-name/au/autokbisw/nix/workspace-state.json b/pkgs/by-name/au/autokbisw/nix/workspace-state.json new file mode 100644 index 000000000000..67db53fa95f3 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/nix/workspace-state.json @@ -0,0 +1,25 @@ +{ + "object": { + "artifacts": [], + "dependencies": [ + { + "basedOn": null, + "packageRef": { + "identity": "swift-argument-parser", + "kind": "remoteSourceControl", + "location": "https://github.com/apple/swift-argument-parser", + "name": "swift-argument-parser" + }, + "state": { + "checkoutState": { + "revision": "e1465042f195f374b94f915ba8ca49de24300a0d", + "version": "1.0.2" + }, + "name": "sourceControlCheckout" + }, + "subpath": "swift-argument-parser" + } + ] + }, + "version": 6 +} diff --git a/pkgs/by-name/au/autokbisw/package.nix b/pkgs/by-name/au/autokbisw/package.nix new file mode 100644 index 000000000000..76b601b2ae24 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/package.nix @@ -0,0 +1,45 @@ +{ + fetchFromGitHub, + lib, + swift, + swiftPackages, + swiftpm, + swiftpm2nix, +}: +let + # Nix dir generated by running `swiftpm2nix` in the upstream project + generated = swiftpm2nix.helpers ./nix; +in +swiftPackages.stdenv.mkDerivation rec { + pname = "autokbisw"; + version = "2.0.1"; + src = fetchFromGitHub { + owner = "ohueter"; + repo = "autokbisw"; + tag = version; + hash = "sha256-xNXXgDLWW8pdik3STmhpZATf9REd+8IGeoX/oxGg4vc="; + }; + nativeBuildInputs = [ + swift + swiftpm + ]; + configurePhase = generated.configure; + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp $(swiftpmBinPath)/autokbisw $out/bin/ + + runHook postInstall + ''; + + meta = { + description = "Automatic keyboard input language switching for macOS"; + homepage = "https://github.com/ohueter/autokbisw"; + changelog = "https://github.com/ohueter/autokbisw/releases/tag/${version}"; + license = lib.licenses.asl20; + mainProgram = "autokbisw"; + maintainers = with lib.maintainers; [ craigf ]; + platforms = lib.platforms.darwin; + }; +} From ba886c5525325a38a5362d83fcfa81b33f6a422a Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Tue, 18 Mar 2025 10:11:13 +0100 Subject: [PATCH 11/75] =?UTF-8?q?babl:=200.1.110=20=E2=86=92=200.1.112?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/GNOME/babl/compare/BABL_0_1_110...BABL_0_1_112 --- pkgs/by-name/ba/babl/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ba/babl/package.nix b/pkgs/by-name/ba/babl/package.nix index bfccb384280f..e99f319fb7e5 100644 --- a/pkgs/by-name/ba/babl/package.nix +++ b/pkgs/by-name/ba/babl/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "babl"; - version = "0.1.110"; + version = "0.1.112"; outputs = [ "out" @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz"; - hash = "sha256-v0e+dUDWJ1OJ9mQx7wMGTfU3YxXiQ9C6tEjGqnE/V0M="; + hash = "sha256-+2lmgkIXh8j+zIPoqrSBId7I7jjRGbZSkc/L4xUCink="; }; patches = [ From c5c61fb5f1b14c6f5943e7c94f9a48df938521b1 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Tue, 18 Mar 2025 10:11:13 +0100 Subject: [PATCH 12/75] =?UTF-8?q?gegl:=200.4.54=20=E2=86=92=200.4.58?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/gegl/-/compare/GEGL_0_4_54...GEGL_0_4_58 --- pkgs/development/libraries/gegl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gegl/default.nix b/pkgs/development/libraries/gegl/default.nix index ab80a9424c23..9c429091908c 100644 --- a/pkgs/development/libraries/gegl/default.nix +++ b/pkgs/development/libraries/gegl/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gegl"; - version = "0.4.54"; + version = "0.4.58"; outputs = [ "out" @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://download.gimp.org/pub/gegl/${lib.versions.majorMinor finalAttrs.version}/gegl-${finalAttrs.version}.tar.xz"; - hash = "sha256-NaNC8IxrQ3mt7iy1dI/E4wfP3PJBfAuxfWymVD8jix4="; + hash = "sha256-1WeLvV/lNZQbgvlluX/Mk4XOk29wyYK9VlpT1VGdG/8="; }; nativeBuildInputs = [ From bf0702f01b66a2c3ce427bb438f0bb2a5f86e534 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 25 Feb 2022 21:47:34 +0100 Subject: [PATCH 13/75] gimp-with-plugins: prepare for GIMP 3 The `gimpPlugins` should now support both versions. --- .../graphics/gimp/plugins/default.nix | 38 ++++++++++++++++--- pkgs/applications/graphics/gimp/wrapper.nix | 19 ++++++---- pkgs/by-name/gm/gmic-qt/package.nix | 9 ++++- 3 files changed, 53 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index b237c5f1bcf1..20d57d50941a 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -2,7 +2,11 @@ # If you just want a subset of plug-ins, you can specify them explicitly: # `gimp-with-plugins.override { plugins = with gimpPlugins; [ gap ]; }`. -{ lib, pkgs }: +{ + lib, + pkgs, + gimp, +}: let inherit (pkgs) @@ -16,6 +20,10 @@ let fetchFromGitHub fetchFromGitLab ; + + # We cannot use gimp from the arguments directly, or it would be shadowed by the one + # from scope when initializing the scope with it, leading to infinite recursion. + gimpArg = gimp; in lib.makeScope pkgs.newScope ( @@ -29,6 +37,7 @@ lib.makeScope pkgs.newScope ( attrs: let name = attrs.name or "${attrs.pname}-${attrs.version}"; + pkgConfigMajorVersion = if gimp.majorVersion == "2.0" then "2" else "3"; in stdenv.mkDerivation ( { @@ -63,8 +72,10 @@ lib.makeScope pkgs.newScope ( # Override installation paths. env = { - PKG_CONFIG_GIMP_2_0_GIMPLIBDIR = "${placeholder "out"}/${gimp.targetLibDir}"; - PKG_CONFIG_GIMP_2_0_GIMPDATADIR = "${placeholder "out"}/${gimp.targetDataDir}"; + "PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPLIBDIR" = + "${placeholder "out"}/${gimp.targetLibDir}"; + "PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPDATADIR" = + "${placeholder "out"}/${gimp.targetDataDir}"; } // attrs.env or { }; } ); @@ -86,7 +97,7 @@ lib.makeScope pkgs.newScope ( in { # Allow overriding GIMP package in the scope. - inherit (pkgs) gimp; + gimp = gimpArg; bimp = pluginDerivation rec { /* @@ -130,6 +141,7 @@ lib.makeScope pkgs.newScope ( installTargets = [ "install-admin" ]; meta = with lib; { + broken = gimp.majorVersion != "2.0"; description = "Batch Image Manipulation Plugin for GIMP"; homepage = "https://github.com/alessandrofrancesconi/gimp-plugin-bimp"; license = licenses.gpl2Plus; @@ -153,6 +165,7 @@ lib.makeScope pkgs.newScope ( ''; meta = { + broken = gimp.majorVersion != "2.0"; description = "Gimp plug-in for the farbfeld image format"; homepage = "https://github.com/ids1024/gimp-farbfeld"; license = lib.licenses.mit; @@ -192,6 +205,7 @@ lib.makeScope pkgs.newScope ( ''; meta = with lib; { + broken = gimp.majorVersion != "2.0"; description = "GIMP plug-in to do the fourier transform"; homepage = "https://people.via.ecp.fr/~remi/soft/gimp/gimp_plugin_en.php3#fourier"; license = with licenses; [ gpl3Plus ]; @@ -222,7 +236,7 @@ lib.makeScope pkgs.newScope ( }; meta = { - broken = !gimp.python2Support; + broken = gimp.majorVersion != "2.0"; }; }; @@ -240,6 +254,10 @@ lib.makeScope pkgs.newScope ( ninja gettext ]; + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; waveletSharpen = pluginDerivation { @@ -264,6 +282,10 @@ lib.makeScope pkgs.newScope ( }; installPhase = "installPlugin src/wavelet-sharpen"; # TODO translations are not copied .. How to do this on nix? + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; lqrPlugin = pluginDerivation rec { @@ -289,10 +311,15 @@ lib.makeScope pkgs.newScope ( sha256 = "EdjZWM6U1bhUmsOnLA8iJ4SFKuAXHIfNPzxZqel+JrY="; }) ]; + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; gmic = pkgs.gmic-qt.override { variant = "gimp"; + inherit (self) gimp; }; gimplensfun = pluginDerivation { @@ -320,6 +347,7 @@ lib.makeScope pkgs.newScope ( "; meta = { + broken = gimp.majorVersion != "2.0"; description = "GIMP plugin to correct lens distortion using the lensfun library and database"; homepage = "http://lensfun.sebastiankraft.net/"; diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix index 82ff058ba7dc..2a4e2c3a844b 100644 --- a/pkgs/applications/graphics/gimp/wrapper.nix +++ b/pkgs/applications/graphics/gimp/wrapper.nix @@ -13,8 +13,14 @@ let lib.attrValues gimpPlugins ); selectedPlugins = lib.filter (pkg: pkg != gimp) (if plugins == null then allPlugins else plugins); - extraArgs = map (x: x.wrapArgs or "") selectedPlugins; - versionBranch = lib.versions.majorMinor gimp.version; + extraArgs = + map (x: x.wrapArgs or "") selectedPlugins + ++ lib.optionals (gimp.majorVersion == "2.0") [ + ''--prefix GTK_PATH : "${gnome-themes-extra}/lib/gtk-2.0"'' + ]; + exeVersion = + if gimp.majorVersion == "2.0" then lib.versions.majorMinor gimp.version else gimp.majorVersion; + majorVersion = if gimp.majorVersion == "2.0" then "2" else "3"; in symlinkJoin { @@ -25,16 +31,15 @@ symlinkJoin { nativeBuildInputs = [ makeWrapper ]; postBuild = '' - for each in gimp-${versionBranch} gimp-console-${versionBranch}; do + for each in gimp-${exeVersion} gimp-console-${exeVersion}; do wrapProgram $out/bin/$each \ - --set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \ - --set GIMP2_DATADIR "$out/share/gimp/2.0" \ - --prefix GTK_PATH : "${gnome-themes-extra}/lib/gtk-2.0" \ + --set GIMP${majorVersion}_PLUGINDIR "$out/${gimp.targetLibDir}" \ + --set GIMP${majorVersion}_DATADIR "$out/${gimp.targetDataDir}" \ ${toString extraArgs} done set +x for each in gimp gimp-console; do - ln -sf "$each-${versionBranch}" $out/bin/$each + ln -sf "$each-${exeVersion}" $out/bin/$each done ''; diff --git a/pkgs/by-name/gm/gmic-qt/package.nix b/pkgs/by-name/gm/gmic-qt/package.nix index 4a07ba02bcef..8e93a53a11e0 100644 --- a/pkgs/by-name/gm/gmic-qt/package.nix +++ b/pkgs/by-name/gm/gmic-qt/package.nix @@ -100,7 +100,14 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "ENABLE_DYNAMIC_LINKING" true) (lib.cmakeBool "ENABLE_SYSTEM_GMIC" true) - (lib.cmakeFeature "GMIC_QT_HOST" (if variant == "standalone" then "none" else variant)) + (lib.cmakeFeature "GMIC_QT_HOST" ( + if variant == "standalone" then + "none" + else if variant == "gimp" && gimp.majorVersion == "2.99" then + "gimp3" + else + variant + )) ]; postFixup = lib.optionalString (variant == "gimp") '' From 2eb19e227bfc3aa09f9690ffc1bd78daaf4604b2 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 17 Aug 2020 20:13:43 +0200 Subject: [PATCH 14/75] =?UTF-8?q?gimp:=202.10.38=20=E2=86=92=202.99.10-uns?= =?UTF-8?q?table-2022-06-28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2020/11/06/gimp-2-99-2-released/ https://www.gimp.org/news/2020/12/25/gimp-2-99-4-released/ https://www.gimp.org/news/2021/05/08/gimp-2-99-6-released/ https://www.gimp.org/news/2021/10/20/gimp-2-99-8-released/ https://www.gimp.org/news/2022/02/25/gimp-2-99-10-released/ Ported to GTK 3 and Meson. Co-Authored-By: Linus Heckemann Co-authored-by: Sandro --- pkgs/applications/graphics/gimp/default.nix | 215 +++++++++++++----- .../graphics/gimp/fix-isocodes-paths.patch | 15 ++ .../graphics/gimp/force-enable-libheif.patch | 22 -- .../gimp/hardcode-plugin-interpreters.patch | 19 +- .../graphics/gimp/remove-cc-reference.patch | 4 +- .../applications/graphics/gimp/skip-win.patch | 10 + .../graphics/gimp/tests-dbus-conf.patch | 13 ++ pkgs/top-level/all-packages.nix | 1 - 8 files changed, 207 insertions(+), 92 deletions(-) create mode 100644 pkgs/applications/graphics/gimp/fix-isocodes-paths.patch delete mode 100644 pkgs/applications/graphics/gimp/force-enable-libheif.patch create mode 100644 pkgs/applications/graphics/gimp/skip-win.patch create mode 100644 pkgs/applications/graphics/gimp/tests-dbus-conf.patch diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index e5e552f299f9..18ace779c905 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -1,19 +1,23 @@ { stdenv, lib, - fetchurl, + fetchFromGitLab, + fetchpatch, replaceVars, - autoreconfHook, + meson, + ninja, pkg-config, - intltool, babl, gegl, - gtk2, + gtk3, glib, gdk-pixbuf, + graphviz, isocodes, pango, cairo, + libarchive, + luajit, freetype, fontconfig, lcms, @@ -31,44 +35,65 @@ ghostscript, aalib, shared-mime-info, + python3, libexif, gettext, - makeWrapper, - gtk-doc, + wrapGAppsHook3, + libxslt, + gobject-introspection, + vala, + perl, + appstream-glib, + desktop-file-utils, xorg, glib-networking, + json-glib, libmypaint, gexiv2, harfbuzz, mypaint-brushes1, libwebp, libheif, - libxslt, + gjs, libgudev, openexr, + xvfb-run, + dbus, + adwaita-icon-theme, + alsa-lib, desktopToDarwinBundle, AppKit, Cocoa, - gtk-mac-integration-gtk2, - withPython ? false, - python2, + gtk-mac-integration-gtk3, + unstableGitUpdater, }: let - python = python2.withPackages (pp: [ pp.pygtk ]); + python = python3.withPackages ( + pp: with pp; [ + pygobject3 + ] + ); in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "2.10.38"; + version = "2.99.10-unstable-2022-06-28"; outputs = [ "out" "dev" ]; - src = fetchurl { - url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2"; - sha256 = "sha256-UKhF7sEciDH+hmFweVD1uERuNfMO37ms+Y+FwRM/hW4="; + # We should not use fetchFromGitLab because the build system + # will complain and mark the build as unsupported when it cannot find + # .git directory but downloading the whole repo is jus too much. + src = fetchFromGitLab rec { + name = "gimp-dev-${rev}"; # to make sure the hash is updated + domain = "gitlab.gnome.org"; + owner = "GNOME"; + repo = "gimp"; + rev = "256b2d9615af2ba6dfcfdc32cc34a437aee214b3"; + hash = "sha256-ITL5nb8fka5Xj+6/JthGRTVVvTDd7LED49IuhZZNk4U="; }; patches = [ @@ -80,26 +105,59 @@ stdenv.mkDerivation (finalAttrs: { # Use absolute paths instead of relying on PATH # to make sure plug-ins are loaded by the correct interpreter. - ./hardcode-plugin-interpreters.patch + (replaceVars ./hardcode-plugin-interpreters.patch { + python_interpreter = python.interpreter; + PYTHON_PATH = null; + }) - # GIMP queries libheif.pc for builtin encoder/decoder support to determine if AVIF/HEIC files are supported - # (see https://gitlab.gnome.org/GNOME/gimp/-/blob/a8b1173ca441283971ee48f4778e2ffd1cca7284/configure.ac?page=2#L1846-1852) - # These variables have been removed since libheif 1.18.0 - # (see https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a) - # This has already been fixed for the upcoming GIMP 3, but the fix has not been backported to 2.x yet - # (see https://gitlab.gnome.org/GNOME/gimp/-/issues/9080) - ./force-enable-libheif.patch + # D-Bus configuration is not available in the build sandbox + # so we need to pick up the one from the package. + (replaceVars ./tests-dbus-conf.patch { + session_conf = "${dbus.out}/share/dbus-1/session.conf"; + }) + + # Since we pass absolute datadirs to Meson, the path is resolved incorrectly. + # What is more, even the assumption that iso-codes have the same datadir + # subdirectory as GIMP is incorrect. Though, there is not a way to obtain + # the correct directory at the moment. There is a MR against isocodes to fix that: + # https://salsa.debian.org/iso-codes-team/iso-codes/merge_requests/11 + ./fix-isocodes-paths.patch + + # Skip broken dependency in Windows code. + # https://gitlab.gnome.org/GNOME/gimp/-/issues/7907 + ./skip-win.patch + + # Make the babl-0.1 patch apply + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/06b481a3ecf49563050935ad0e965a664648e450.patch"; + hash = "sha256-mlYj29m1Ay9FFOCTAv01ipiK8VTdjh+Es4fnhBR/Vzs="; + }) + + # Fix compatibility with babl-0.1 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/04a78154e1af5e30dcedde6dbaa321be3f0e24b1.patch"; + hash = "sha256-oSfkTPJb4ai8z3o7QHgrNzwJEtJj04R9mKufXxGNWU8="; + }) ]; nativeBuildInputs = [ - autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am + meson + ninja pkg-config - intltool gettext - makeWrapper - gtk-doc - libxslt + wrapGAppsHook3 + libxslt # for xsltproc + gobject-introspection + perl + vala + + # for tests + desktop-file-utils + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + dbus + xvfb-run ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle @@ -107,13 +165,15 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ + appstream-glib # for library babl gegl - gtk2 + gtk3 glib gdk-pixbuf pango cairo + libarchive gexiv2 harfbuzz isocodes @@ -135,51 +195,71 @@ stdenv.mkDerivation (finalAttrs: { ghostscript aalib shared-mime-info + json-glib libwebp libheif + python libexif xorg.libXpm + xorg.libXmu glib-networking libmypaint mypaint-brushes1 + + # New file dialogue crashes with “Icon 'image-missing' not present in theme Symbolic” without an icon theme. + adwaita-icon-theme + + # for Lua plug-ins + (luajit.withPackages (pp: [ + pp.lgi + ])) + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + alsa-lib + + # for JavaScript plug-ins + gjs ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Cocoa - gtk-mac-integration-gtk2 + gtk-mac-integration-gtk3 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libgudev - ] - ++ lib.optionals withPython [ - python - # Duplicated here because python.withPackages does not expose the dev output with pkg-config files - python2.pkgs.pygtk ]; - # needed by gimp-2.0.pc propagatedBuildInputs = [ + # needed by gimp-3.0.pc gegl ]; - configureFlags = + mesonFlags = [ - "--without-webkit" # old version is required - "--disable-check-update" - "--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new" - "--with-icc-directory=/run/current-system/sw/share/color/icc" - # fix libdir in pc files (${exec_prefix} needs to be passed verbatim) - "--libdir=\${exec_prefix}/lib" + "-Dbug-report-url=https://github.com/NixOS/nixpkgs/issues/new" + "-Dicc-directory=/run/current-system/sw/share/color/icc" + "-Dcheck-update=no" + (lib.mesonEnable "gudev" stdenv.hostPlatform.isLinux) + (lib.mesonEnable "headless-tests" stdenv.hostPlatform.isLinux) + (lib.mesonEnable "linux-input" stdenv.hostPlatform.isLinux) + # Not very important to do downstream, save a dependency. + "-Dappdata-test=disabled" + # Incompatible with version in nixpkgs + "-Djpeg-xl=disabled" + # Broken references + "-Dgi-docgen=disabled" ] - ++ lib.optionals (!withPython) [ - "--disable-python" # depends on Python2 which was EOLed on 2020-01-01 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "-Dalsa=disabled" + "-Djavascript=false" ]; - enableParallelBuilding = true; - doCheck = true; env = { + # The check runs before glib-networking is registered + GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules"; + NIX_CFLAGS_COMPILE = toString ( [ ] ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] @@ -190,29 +270,52 @@ stdenv.mkDerivation (finalAttrs: { PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; }; - preConfigure = '' - # The check runs before glib-networking is registered - export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES" + postPatch = '' + patchShebangs \ + app/tests/create_test_env.sh \ + tools/gimp-mkenums + + # Bypass the need for downloading git archive. + substitute app/git-version.h.in git-version.h \ + --subst-var-by GIMP_GIT_VERSION "GIMP_2.99.?-g${builtins.substring 0 10 finalAttrs.src.rev}" \ + --subst-var-by GIMP_GIT_VERSION_ABBREV "${builtins.substring 0 10 finalAttrs.src.rev}" \ + --subst-var-by GIMP_GIT_LAST_COMMIT_YEAR "${builtins.head (builtins.match ".+\-unstable-([0-9]{4})-[0-9]{2}-[0-9]{2}" finalAttrs.version)}" ''; - postFixup = '' - wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \ - --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" + preCheck = '' + # Avoid “Error retrieving accessibility bus address” + export NO_AT_BRIDGE=1 + # Fix storing recent file list in tests + export HOME="$TMPDIR" + export XDG_DATA_DIRS="${glib.getSchemaDataDirPath gtk3}:$XDG_DATA_DIRS" + ''; + + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : "${ + lib.makeBinPath [ + # for dot for gegl:introspect (Debug » Show Image Graph, hidden by default on stable release) + graphviz + ] + }") ''; passthru = { # The declarations for `gimp-with-plugins` wrapper, # used for determining plug-in installation paths - majorVersion = "${lib.versions.major finalAttrs.version}.0"; + majorVersion = "2.99"; targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}"; targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}"; targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins"; targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts"; # probably its a good idea to use the same gtk in plugins ? - gtk = gtk2; + gtk = gtk3; - python2Support = withPython; + updateScript = unstableGitUpdater { + stableVersion = true; + tagPrefix = "GIMP_"; + tagConverter = "sed s/_/./g"; + }; }; meta = with lib; { diff --git a/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch b/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch new file mode 100644 index 000000000000..32ed7babbf6a --- /dev/null +++ b/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch @@ -0,0 +1,15 @@ +diff --git a/meson.build b/meson.build +index a1ec1f67b6..8ce50973f7 100644 +--- a/meson.build ++++ b/meson.build +@@ -864,8 +864,8 @@ + isocodes = dependency('iso-codes', required: false) + if isocodes.found() + isocodes_prefix = isocodes.get_pkgconfig_variable('prefix') +- isocodes_location = isocodes_prefix / get_option('datadir') / 'xml' / 'iso-codes' +- isocodes_localedir= isocodes_prefix / get_option('datadir') / 'locale' ++ isocodes_location = isocodes_prefix / 'share' / 'xml' / 'iso-codes' ++ isocodes_localedir= isocodes_prefix / 'share' / 'locale' + endif + conf.set('HAVE_ISO_CODES', isocodes.found()) + diff --git a/pkgs/applications/graphics/gimp/force-enable-libheif.patch b/pkgs/applications/graphics/gimp/force-enable-libheif.patch deleted file mode 100644 index de3dfb09b95e..000000000000 --- a/pkgs/applications/graphics/gimp/force-enable-libheif.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 48c3c77892..3189781817 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1843,13 +1843,13 @@ can_export_heic=no - can_import_avif=no - can_export_avif=no - if test "x$have_libheif" = xyes; then -- can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif` -- can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif` -+ can_import_heic=yes -+ can_export_heic=yes - if test "x$can_import_heic" = xyes; then - MIME_TYPES="$MIME_TYPES;image/heif;image/heic" - fi -- can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif` -- can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif` -+ can_import_avif=yes -+ can_export_avif=yes - if test "x$can_import_avif" = xyes; then - MIME_TYPES="$MIME_TYPES;image/avif" - fi diff --git a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch index 1528404c31d2..6cb261d84ff0 100644 --- a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch +++ b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch @@ -1,11 +1,8 @@ ---- a/plug-ins/pygimp/Makefile.am -+++ b/plug-ins/pygimp/Makefile.am -@@ -157,7 +157,7 @@ install-interp-file: - echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)' - echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' - echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' -- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)' -+ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)' - - install-data-local: install-env-file install-interp-file - +--- a/plug-ins/python/pygimp.interp.in ++++ b/plug-ins/python/pygimp.interp.in +@@ -2,4 +2,4 @@ python=@PYTHON_PATH@ + python3=@PYTHON_PATH@ + /usr/bin/python=@PYTHON_PATH@ + /usr/bin/python3=@PYTHON_PATH@ +-:Python:E::py::python3: ++:Python:E::py::@python_interpreter@: diff --git a/pkgs/applications/graphics/gimp/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/remove-cc-reference.patch index 20c350bdaea1..335fb4e44bb1 100644 --- a/pkgs/applications/graphics/gimp/remove-cc-reference.patch +++ b/pkgs/applications/graphics/gimp/remove-cc-reference.patch @@ -1,8 +1,8 @@ diff --git a/app/gimp-version.c b/app/gimp-version.c -index 3d1894a036..48bb670b64 100644 +index 6e311c8252..e6fd9d1d78 100644 --- a/app/gimp-version.c +++ b/app/gimp-version.c -@@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose, +@@ -231,7 +231,7 @@ gimp_version (gboolean be_verbose, GIMP_BUILD_ID, gimp_version_get_revision (), GIMP_BUILD_PLATFORM_FAMILY, diff --git a/pkgs/applications/graphics/gimp/skip-win.patch b/pkgs/applications/graphics/gimp/skip-win.patch new file mode 100644 index 000000000000..5689862fe57a --- /dev/null +++ b/pkgs/applications/graphics/gimp/skip-win.patch @@ -0,0 +1,10 @@ +diff --git a/build/windows/meson.build b/build/windows/meson.build +index 8df68256f6..9cd76ad660 100644 +--- a/build/windows/meson.build ++++ b/build/windows/meson.build +@@ -1,4 +1,5 @@ + # Windows specific ++subdir_done() + + configure_file( + input : 'gimp-plug-ins.rc.in', diff --git a/pkgs/applications/graphics/gimp/tests-dbus-conf.patch b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch new file mode 100644 index 000000000000..4553054b72cd --- /dev/null +++ b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch @@ -0,0 +1,13 @@ +diff --git a/build/meson/run_test_env.sh b/build/meson/run_test_env.sh +index a3fda14f00..71fbdcd00d 100644 +--- a/build/meson/run_test_env.sh ++++ b/build/meson/run_test_env.sh +@@ -33,7 +33,7 @@ if [ -n "${UI_TEST}" ]; then + OPT="--auto-servernum" + fi + xvfb-run $OPT --server-args="-screen 0 1280x1024x24" \ +- dbus-run-session -- "$@" ++ dbus-run-session --config-file="@session_conf@" -- "$@" + + else + # Run the executable directly, diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 729df4dba04c..d14129b927c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14544,7 +14544,6 @@ with pkgs; inherit (xorg) xlsfonts; gimp = callPackage ../applications/graphics/gimp { - autoreconfHook = buildPackages.autoreconfHook269; lcms = lcms2; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; }; From 027fa910b0a88c7492d0332b6bc67e5090957b2a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 31 Aug 2022 04:00:48 +0200 Subject: [PATCH 15/75] =?UTF-8?q?gimp:=202.99.10-unstable-2022-06-28=20?= =?UTF-8?q?=E2=86=92=202.99.12-unstable-2022-08-31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2022/08/27/gimp-2-99-12-released/ https://github.com/GNOME/gimp/compare/256b2d9615af2ba6dfcfdc32cc34a437aee214b3...a791151ed05b6e2f7b0ecb71db8be9629d61f5df Introduces `gimp-script-fu-interpreter-3.0` as interpreter invoked by shebang of some plug-ins. Let’s ensure it is on `PATH`. --- pkgs/applications/graphics/gimp/default.nix | 14 +++++++------- .../graphics/gimp/fix-isocodes-paths.patch | 6 +++--- pkgs/applications/graphics/gimp/skip-win.patch | 10 ---------- 3 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 pkgs/applications/graphics/gimp/skip-win.patch diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 18ace779c905..63f9f520e6f0 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -77,7 +77,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "2.99.10-unstable-2022-06-28"; + version = "2.99.12-unstable-2022-08-31"; outputs = [ "out" @@ -92,8 +92,8 @@ stdenv.mkDerivation (finalAttrs: { domain = "gitlab.gnome.org"; owner = "GNOME"; repo = "gimp"; - rev = "256b2d9615af2ba6dfcfdc32cc34a437aee214b3"; - hash = "sha256-ITL5nb8fka5Xj+6/JthGRTVVvTDd7LED49IuhZZNk4U="; + rev = "a791151ed05b6e2f7b0ecb71db8be9629d61f5df"; + hash = "sha256-0IIQwJW/HwkvKmjrs2xOhbpyLvvqJ0PR3q75PF+b/Ac="; }; patches = [ @@ -123,10 +123,6 @@ stdenv.mkDerivation (finalAttrs: { # https://salsa.debian.org/iso-codes-team/iso-codes/merge_requests/11 ./fix-isocodes-paths.patch - # Skip broken dependency in Windows code. - # https://gitlab.gnome.org/GNOME/gimp/-/issues/7907 - ./skip-win.patch - # Make the babl-0.1 patch apply (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/06b481a3ecf49563050935ad0e965a664648e450.patch"; @@ -248,6 +244,8 @@ stdenv.mkDerivation (finalAttrs: { "-Djpeg-xl=disabled" # Broken references "-Dgi-docgen=disabled" + # Removed pkg-config variable + "-Dheif=disabled" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Dalsa=disabled" @@ -295,6 +293,8 @@ stdenv.mkDerivation (finalAttrs: { lib.makeBinPath [ # for dot for gegl:introspect (Debug » Show Image Graph, hidden by default on stable release) graphviz + # for gimp-script-fu-interpreter-3.0 invoked by shebang of some plug-ins + "$out" ] }") ''; diff --git a/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch b/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch index 32ed7babbf6a..cb10776d4802 100644 --- a/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch +++ b/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch @@ -1,11 +1,11 @@ diff --git a/meson.build b/meson.build -index a1ec1f67b6..8ce50973f7 100644 +index 6a19df48a1..3fd77077c1 100644 --- a/meson.build +++ b/meson.build -@@ -864,8 +864,8 @@ +@@ -924,8 +924,8 @@ endif isocodes = dependency('iso-codes', required: false) if isocodes.found() - isocodes_prefix = isocodes.get_pkgconfig_variable('prefix') + isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix') - isocodes_location = isocodes_prefix / get_option('datadir') / 'xml' / 'iso-codes' - isocodes_localedir= isocodes_prefix / get_option('datadir') / 'locale' + isocodes_location = isocodes_prefix / 'share' / 'xml' / 'iso-codes' diff --git a/pkgs/applications/graphics/gimp/skip-win.patch b/pkgs/applications/graphics/gimp/skip-win.patch deleted file mode 100644 index 5689862fe57a..000000000000 --- a/pkgs/applications/graphics/gimp/skip-win.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/build/windows/meson.build b/build/windows/meson.build -index 8df68256f6..9cd76ad660 100644 ---- a/build/windows/meson.build -+++ b/build/windows/meson.build -@@ -1,4 +1,5 @@ - # Windows specific -+subdir_done() - - configure_file( - input : 'gimp-plug-ins.rc.in', From d65529fcdffb7175cde20f11f0c8bf4325bc8b6d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 17 Mar 2023 17:29:04 +0000 Subject: [PATCH 16/75] =?UTF-8?q?gimp:=202.99.12-unstable-2022-08-31=20?= =?UTF-8?q?=E2=86=92=202.99.14-unstable-2023-03-17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2022/11/18/gimp-2-99-14-released/ https://github.com/GNOME/gimp/compare/a791151ed05b6e2f7b0ecb71db8be9629d61f5df...ad7a2e53eb72ef471566fa2d0ce9faeec929fbcf - Adds OpenMP support. - Fixes libheif detection. - Fixes babl discovery. --- pkgs/applications/graphics/gimp/default.nix | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 63f9f520e6f0..899ff62fc827 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchFromGitLab, - fetchpatch, replaceVars, meson, ninja, @@ -77,7 +76,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "2.99.12-unstable-2022-08-31"; + version = "2.99.14-unstable-2023-03-17"; outputs = [ "out" @@ -92,8 +91,8 @@ stdenv.mkDerivation (finalAttrs: { domain = "gitlab.gnome.org"; owner = "GNOME"; repo = "gimp"; - rev = "a791151ed05b6e2f7b0ecb71db8be9629d61f5df"; - hash = "sha256-0IIQwJW/HwkvKmjrs2xOhbpyLvvqJ0PR3q75PF+b/Ac="; + rev = "ad7a2e53eb72ef471566fa2d0ce9faeec929fbcf"; + hash = "sha256-IJMUJc817EDWIRqqkCuwAcSw7gcgCkXxPan5fEq1AO0="; }; patches = [ @@ -122,18 +121,6 @@ stdenv.mkDerivation (finalAttrs: { # the correct directory at the moment. There is a MR against isocodes to fix that: # https://salsa.debian.org/iso-codes-team/iso-codes/merge_requests/11 ./fix-isocodes-paths.patch - - # Make the babl-0.1 patch apply - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/06b481a3ecf49563050935ad0e965a664648e450.patch"; - hash = "sha256-mlYj29m1Ay9FFOCTAv01ipiK8VTdjh+Es4fnhBR/Vzs="; - }) - - # Fix compatibility with babl-0.1 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/04a78154e1af5e30dcedde6dbaa321be3f0e24b1.patch"; - hash = "sha256-oSfkTPJb4ai8z3o7QHgrNzwJEtJj04R9mKufXxGNWU8="; - }) ]; nativeBuildInputs = @@ -244,8 +231,6 @@ stdenv.mkDerivation (finalAttrs: { "-Djpeg-xl=disabled" # Broken references "-Dgi-docgen=disabled" - # Removed pkg-config variable - "-Dheif=disabled" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Dalsa=disabled" From 328415ccd674ab237b791aba79ced1e05cd1490a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 27 Dec 2024 02:41:29 +0100 Subject: [PATCH 17/75] =?UTF-8?q?gimp:=202.99.14-unstable-2023-03-17=20?= =?UTF-8?q?=E2=86=92=203.0.0-RC1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2023/07/09/gimp-2-99-16-released/ https://www.gimp.org/news/2024/02/21/gimp-2-99-18-released/ https://www.gimp.org/news/2024/11/06/gimp-3-0-RC1-released/ https://github.com/GNOME/gimp/compare/ad7a2e53eb72ef471566fa2d0ce9faeec929fbcf...GIMP_3_0_0_RC1 - gtk-mac-integration dependency removed https://gitlab.gnome.org/GNOME/gimp/-/commit/df4ed9c1ec85117747e41e4540cb75b02284bdbe - Python plug-in mandatory https://gitlab.gnome.org/GNOME/gimp/-/commit/93cc81281cd12c55139f483d65629be9c31e798d - Only Lua 5.1 is supported https://gitlab.gnome.org/GNOME/gimp/-/commit/70372975261f2fc89aa9bbf92fe975a7663ef59f - Fixes gi-docgen and libjxl. Had to add `adwaita-icon-theme` to `XDG_DATA_DIRS` at check time, or tests would fail: Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Default (gtk-icon-theme-error-quark, 0) No longer builds on Darwin. Co-authored-by: Sandro --- pkgs/applications/graphics/gimp/default.nix | 116 +++++++++++------- .../graphics/gimp/fix-isocodes-paths.patch | 15 --- .../gimp/hardcode-plugin-interpreters.patch | 6 +- .../graphics/gimp/plugins/default.nix | 2 +- pkgs/applications/graphics/gimp/wrapper.nix | 2 +- pkgs/by-name/gm/gmic-qt/package.nix | 2 +- 6 files changed, 77 insertions(+), 66 deletions(-) delete mode 100644 pkgs/applications/graphics/gimp/fix-isocodes-paths.patch diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 899ff62fc827..6ff35b3e59df 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -1,12 +1,14 @@ { stdenv, lib, - fetchFromGitLab, + fetchurl, + fetchpatch, replaceVars, meson, ninja, pkg-config, babl, + cfitsio, gegl, gtk3, glib, @@ -21,6 +23,8 @@ fontconfig, lcms, libpng, + libiff, + libilbm, libjpeg, libjxl, poppler, @@ -41,6 +45,7 @@ libxslt, gobject-introspection, vala, + gi-docgen, perl, appstream-glib, desktop-file-utils, @@ -48,6 +53,7 @@ glib-networking, json-glib, libmypaint, + llvmPackages, gexiv2, harfbuzz, mypaint-brushes1, @@ -63,8 +69,6 @@ desktopToDarwinBundle, AppKit, Cocoa, - gtk-mac-integration-gtk3, - unstableGitUpdater, }: let @@ -76,23 +80,17 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "2.99.14-unstable-2023-03-17"; + version = "3.0.0-RC1"; outputs = [ "out" "dev" + "devdoc" ]; - # We should not use fetchFromGitLab because the build system - # will complain and mark the build as unsupported when it cannot find - # .git directory but downloading the whole repo is jus too much. - src = fetchFromGitLab rec { - name = "gimp-dev-${rev}"; # to make sure the hash is updated - domain = "gitlab.gnome.org"; - owner = "GNOME"; - repo = "gimp"; - rev = "ad7a2e53eb72ef471566fa2d0ce9faeec929fbcf"; - hash = "sha256-IJMUJc817EDWIRqqkCuwAcSw7gcgCkXxPan5fEq1AO0="; + src = fetchurl { + url = "https://download.gimp.org/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.xz"; + hash = "sha256-s9CyZMXjjnifqvNBcAM5fzJAAUxZx/QX+co705xf+2Y="; }; patches = [ @@ -104,6 +102,7 @@ stdenv.mkDerivation (finalAttrs: { # Use absolute paths instead of relying on PATH # to make sure plug-ins are loaded by the correct interpreter. + # TODO: This now only appears to be used on Windows. (replaceVars ./hardcode-plugin-interpreters.patch { python_interpreter = python.interpreter; PYTHON_PATH = null; @@ -115,12 +114,12 @@ stdenv.mkDerivation (finalAttrs: { session_conf = "${dbus.out}/share/dbus-1/session.conf"; }) - # Since we pass absolute datadirs to Meson, the path is resolved incorrectly. - # What is more, even the assumption that iso-codes have the same datadir - # subdirectory as GIMP is incorrect. Though, there is not a way to obtain - # the correct directory at the moment. There is a MR against isocodes to fix that: - # https://salsa.debian.org/iso-codes-team/iso-codes/merge_requests/11 - ./fix-isocodes-paths.patch + # Fix pkg-config file. + # https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2037 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/a18e1806dbc9b180aefabb2c0fae43493f1ef14a.patch"; + hash = "sha256-BUrPm9lB/aiybB2Sd3TKlJ+59ITMZlNUBXJP5ZdLQ44="; + }) ]; nativeBuildInputs = @@ -135,6 +134,9 @@ stdenv.mkDerivation (finalAttrs: { perl vala + # for docs + gi-docgen + # for tests desktop-file-utils ] @@ -150,6 +152,7 @@ stdenv.mkDerivation (finalAttrs: { [ appstream-glib # for library babl + cfitsio gegl gtk3 glib @@ -164,6 +167,8 @@ stdenv.mkDerivation (finalAttrs: { fontconfig lcms libpng + libiff + libilbm libjpeg libjxl poppler @@ -204,9 +209,9 @@ stdenv.mkDerivation (finalAttrs: { gjs ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + llvmPackages.openmp AppKit Cocoa - gtk-mac-integration-gtk3 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libgudev @@ -215,6 +220,9 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ # needed by gimp-3.0.pc gegl + cairo + pango + gexiv2 ]; mesonFlags = @@ -227,14 +235,10 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "linux-input" stdenv.hostPlatform.isLinux) # Not very important to do downstream, save a dependency. "-Dappdata-test=disabled" - # Incompatible with version in nixpkgs - "-Djpeg-xl=disabled" - # Broken references - "-Dgi-docgen=disabled" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-Dalsa=disabled" - "-Djavascript=false" + "-Djavascript=disabled" ]; doCheck = true; @@ -243,11 +247,7 @@ stdenv.mkDerivation (finalAttrs: { # The check runs before glib-networking is registered GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules"; - NIX_CFLAGS_COMPILE = toString ( - [ ] - ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ] - ); + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DGDK_OSX_BIG_SUR=16"; # Check if librsvg was built with --disable-pixbuf-loader. PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; @@ -258,19 +258,46 @@ stdenv.mkDerivation (finalAttrs: { app/tests/create_test_env.sh \ tools/gimp-mkenums - # Bypass the need for downloading git archive. - substitute app/git-version.h.in git-version.h \ - --subst-var-by GIMP_GIT_VERSION "GIMP_2.99.?-g${builtins.substring 0 10 finalAttrs.src.rev}" \ - --subst-var-by GIMP_GIT_VERSION_ABBREV "${builtins.substring 0 10 finalAttrs.src.rev}" \ - --subst-var-by GIMP_GIT_LAST_COMMIT_YEAR "${builtins.head (builtins.match ".+\-unstable-([0-9]{4})-[0-9]{2}-[0-9]{2}" finalAttrs.version)}" + # GIMP is executed at build time so we need to fix this. + # TODO: Look into if we can fix the interp thing. + chmod +x plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py + patchShebangs \ + plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py ''; + preBuild = + let + librarySuffix = + if stdenv.hostPlatform.extensions.library == ".so" then + "3.0.so.0" + else if stdenv.hostPlatform.extensions.library == ".dylib" then + "3.0.0.dylib" + else + throw "Unsupported library extension ‘${stdenv.hostPlatform.extensions.library}’"; + in + '' + # Our gobject-introspection patches make the shared library paths absolute + # in the GIR files. When running GIMP in build or check phase, it will try + # to use plug-ins, which import GIMP introspection files which will try + # to load the GIMP libraries which will not be installed yet. + # So we need to replace the absolute path with a local one. + # We are using a symlink that will be overridden during installation. + mkdir -p "$out/lib" + ln -s "$PWD/libgimp/libgimp-${librarySuffix}" \ + "$PWD/libgimpbase/libgimpbase-${librarySuffix}" \ + "$PWD/libgimpcolor/libgimpcolor-${librarySuffix}" \ + "$PWD/libgimpconfig/libgimpconfig-${librarySuffix}" \ + "$PWD/libgimpmath/libgimpmath-${librarySuffix}" \ + "$PWD/libgimpmodule/libgimpmodule-${librarySuffix}" \ + "$out/lib/" + ''; + preCheck = '' # Avoid “Error retrieving accessibility bus address” export NO_AT_BRIDGE=1 # Fix storing recent file list in tests export HOME="$TMPDIR" - export XDG_DATA_DIRS="${glib.getSchemaDataDirPath gtk3}:$XDG_DATA_DIRS" + export XDG_DATA_DIRS="${glib.getSchemaDataDirPath gtk3}:${adwaita-icon-theme}/share:$XDG_DATA_DIRS" ''; preFixup = '' @@ -284,10 +311,15 @@ stdenv.mkDerivation (finalAttrs: { }") ''; + postFixup = '' + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" + ''; + passthru = { # The declarations for `gimp-with-plugins` wrapper, # used for determining plug-in installation paths - majorVersion = "2.99"; + majorVersion = "${lib.versions.major finalAttrs.version}.0"; targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}"; targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}"; targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins"; @@ -295,12 +327,6 @@ stdenv.mkDerivation (finalAttrs: { # probably its a good idea to use the same gtk in plugins ? gtk = gtk3; - - updateScript = unstableGitUpdater { - stableVersion = true; - tagPrefix = "GIMP_"; - tagConverter = "sed s/_/./g"; - }; }; meta = with lib; { @@ -308,7 +334,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://www.gimp.org/"; maintainers = with maintainers; [ jtojnar ]; license = licenses.gpl3Plus; - platforms = platforms.unix; + platforms = platforms.linux; mainProgram = "gimp"; }; }) diff --git a/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch b/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch deleted file mode 100644 index cb10776d4802..000000000000 --- a/pkgs/applications/graphics/gimp/fix-isocodes-paths.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/meson.build b/meson.build -index 6a19df48a1..3fd77077c1 100644 ---- a/meson.build -+++ b/meson.build -@@ -924,8 +924,8 @@ endif - isocodes = dependency('iso-codes', required: false) - if isocodes.found() - isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix') -- isocodes_location = isocodes_prefix / get_option('datadir') / 'xml' / 'iso-codes' -- isocodes_localedir= isocodes_prefix / get_option('datadir') / 'locale' -+ isocodes_location = isocodes_prefix / 'share' / 'xml' / 'iso-codes' -+ isocodes_localedir= isocodes_prefix / 'share' / 'locale' - endif - conf.set('HAVE_ISO_CODES', isocodes.found()) - diff --git a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch index 6cb261d84ff0..13e37da3bd24 100644 --- a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch +++ b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch @@ -1,8 +1,8 @@ --- a/plug-ins/python/pygimp.interp.in +++ b/plug-ins/python/pygimp.interp.in @@ -2,4 +2,4 @@ python=@PYTHON_PATH@ - python3=@PYTHON_PATH@ - /usr/bin/python=@PYTHON_PATH@ - /usr/bin/python3=@PYTHON_PATH@ + python3=@PYTHON_PATH@python.exe + /usr/bin/python=@PYTHON_PATH@python.exe + /usr/bin/python3=@PYTHON_PATH@python.exe -:Python:E::py::python3: +:Python:E::py::@python_interpreter@: diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 20d57d50941a..9c86343599b1 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -37,7 +37,7 @@ lib.makeScope pkgs.newScope ( attrs: let name = attrs.name or "${attrs.pname}-${attrs.version}"; - pkgConfigMajorVersion = if gimp.majorVersion == "2.0" then "2" else "3"; + pkgConfigMajorVersion = lib.versions.major gimp.version; in stdenv.mkDerivation ( { diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix index 2a4e2c3a844b..efac48c2f7e2 100644 --- a/pkgs/applications/graphics/gimp/wrapper.nix +++ b/pkgs/applications/graphics/gimp/wrapper.nix @@ -20,7 +20,7 @@ let ]; exeVersion = if gimp.majorVersion == "2.0" then lib.versions.majorMinor gimp.version else gimp.majorVersion; - majorVersion = if gimp.majorVersion == "2.0" then "2" else "3"; + majorVersion = lib.versions.major gimp.version; in symlinkJoin { diff --git a/pkgs/by-name/gm/gmic-qt/package.nix b/pkgs/by-name/gm/gmic-qt/package.nix index 8e93a53a11e0..629097841c03 100644 --- a/pkgs/by-name/gm/gmic-qt/package.nix +++ b/pkgs/by-name/gm/gmic-qt/package.nix @@ -103,7 +103,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "GMIC_QT_HOST" ( if variant == "standalone" then "none" - else if variant == "gimp" && gimp.majorVersion == "2.99" then + else if variant == "gimp" && gimp.majorVersion == "3.0" then "gimp3" else variant From ffdeaff3de2b682d46d77d3f6f3eb1172452d8d5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 28 Dec 2024 01:50:47 +0100 Subject: [PATCH 18/75] =?UTF-8?q?gimp:=203.0.0-RC1=20=E2=86=92=203.0.0-RC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2024/12/27/gimp-3-0-RC2-released/ https://github.com/GNOME/gimp/compare/GIMP_3_0_0_RC1...GIMP_3_0_0_RC2 --- pkgs/applications/graphics/gimp/default.nix | 6 +++--- .../graphics/gimp/hardcode-plugin-interpreters.patch | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 6ff35b3e59df..114a5ba7ec28 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -80,7 +80,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "3.0.0-RC1"; + version = "3.0.0-RC2"; outputs = [ "out" @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://download.gimp.org/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.xz"; - hash = "sha256-s9CyZMXjjnifqvNBcAM5fzJAAUxZx/QX+co705xf+2Y="; + hash = "sha256-9NL5bfGAzlVD+LKzVwe5vxFFnwD3Jspz2i9AbWhtnbc="; }; patches = [ @@ -105,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { # TODO: This now only appears to be used on Windows. (replaceVars ./hardcode-plugin-interpreters.patch { python_interpreter = python.interpreter; - PYTHON_PATH = null; + PYTHON_EXE = null; }) # D-Bus configuration is not available in the build sandbox diff --git a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch index 13e37da3bd24..6a0ec0af6262 100644 --- a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch +++ b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch @@ -1,8 +1,8 @@ --- a/plug-ins/python/pygimp.interp.in +++ b/plug-ins/python/pygimp.interp.in -@@ -2,4 +2,4 @@ python=@PYTHON_PATH@ - python3=@PYTHON_PATH@python.exe - /usr/bin/python=@PYTHON_PATH@python.exe - /usr/bin/python3=@PYTHON_PATH@python.exe +@@ -2,4 +2,4 @@ python=@PYTHON_EXE@ + python3=@PYTHON_EXE@ + /usr/bin/python=@PYTHON_EXE@ + /usr/bin/python3=@PYTHON_EXE@ -:Python:E::py::python3: +:Python:E::py::@python_interpreter@: From 79e6d159bf967f31c64b67b01f06e2298c105545 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Tue, 18 Mar 2025 10:11:13 +0100 Subject: [PATCH 19/75] =?UTF-8?q?gimp:=203.0.0-RC2=20=E2=86=92=203.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2025/03/16/gimp-3-0-released/ https://github.com/GNOME/gimp/compare/GIMP_3_0_0_RC2...GIMP_3_0_0 https://www.gimp.org/news/2025/03/23/gimp-3-0-2-released/ https://github.com/GNOME/gimp/compare/GIMP_3_0_0...GIMP_3_0_2 --- doc/release-notes/rl-2505.section.md | 2 ++ pkgs/applications/graphics/gimp/default.nix | 12 ++---------- .../graphics/gimp/remove-cc-reference.patch | 2 +- .../applications/graphics/gimp/tests-dbus-conf.patch | 2 -- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/doc/release-notes/rl-2505.section.md b/doc/release-notes/rl-2505.section.md index 8294606c917f..933cf114ec1c 100644 --- a/doc/release-notes/rl-2505.section.md +++ b/doc/release-notes/rl-2505.section.md @@ -62,6 +62,8 @@ - [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided. The `name` argument will become mandatory in a future release. +- `gimp` has been upgraded to [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/). + - `grafana-agent` and `services.grafana-agent` have been removed in favor of Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version and will become EOL during the 25.05 lifecycle. diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 114a5ba7ec28..0b2406c89f8b 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchurl, - fetchpatch, replaceVars, meson, ninja, @@ -80,7 +79,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "3.0.0-RC2"; + version = "3.0.2"; outputs = [ "out" @@ -90,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://download.gimp.org/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.xz"; - hash = "sha256-9NL5bfGAzlVD+LKzVwe5vxFFnwD3Jspz2i9AbWhtnbc="; + hash = "sha256-VG3cMMstDnkSPH/LTXghHh7npqrOkaagrYy8v26lcaI="; }; patches = [ @@ -113,13 +112,6 @@ stdenv.mkDerivation (finalAttrs: { (replaceVars ./tests-dbus-conf.patch { session_conf = "${dbus.out}/share/dbus-1/session.conf"; }) - - # Fix pkg-config file. - # https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2037 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/gimp/-/commit/a18e1806dbc9b180aefabb2c0fae43493f1ef14a.patch"; - hash = "sha256-BUrPm9lB/aiybB2Sd3TKlJ+59ITMZlNUBXJP5ZdLQ44="; - }) ]; nativeBuildInputs = diff --git a/pkgs/applications/graphics/gimp/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/remove-cc-reference.patch index 335fb4e44bb1..8b62b801f02b 100644 --- a/pkgs/applications/graphics/gimp/remove-cc-reference.patch +++ b/pkgs/applications/graphics/gimp/remove-cc-reference.patch @@ -2,7 +2,7 @@ diff --git a/app/gimp-version.c b/app/gimp-version.c index 6e311c8252..e6fd9d1d78 100644 --- a/app/gimp-version.c +++ b/app/gimp-version.c -@@ -231,7 +231,7 @@ gimp_version (gboolean be_verbose, +@@ -90,7 +90,7 @@ gimp_version (gboolean be_verbose, GIMP_BUILD_ID, gimp_version_get_revision (), GIMP_BUILD_PLATFORM_FAMILY, diff --git a/pkgs/applications/graphics/gimp/tests-dbus-conf.patch b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch index 4553054b72cd..da9152eeef01 100644 --- a/pkgs/applications/graphics/gimp/tests-dbus-conf.patch +++ b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch @@ -1,5 +1,3 @@ -diff --git a/build/meson/run_test_env.sh b/build/meson/run_test_env.sh -index a3fda14f00..71fbdcd00d 100644 --- a/build/meson/run_test_env.sh +++ b/build/meson/run_test_env.sh @@ -33,7 +33,7 @@ if [ -n "${UI_TEST}" ]; then From 38a5039f8c9834b98a2c2729cad6793c283e018f Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 27 Mar 2025 23:21:38 +0100 Subject: [PATCH 20/75] gimp2: re-init at 2.10.38 Keep around for a while for legacy plug-in support. Re-introducing it in a separate commit so that `gimp` expression retains continuous git history. --- doc/release-notes/rl-2505.section.md | 2 +- .../graphics/gimp/2.0/default.nix | 226 ++++++++++++++++++ .../gimp/2.0/force-enable-libheif.patch | 22 ++ .../2.0/hardcode-plugin-interpreters.patch | 11 + .../gimp/2.0/remove-cc-reference.patch | 13 + pkgs/top-level/all-packages.nix | 17 ++ 6 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/graphics/gimp/2.0/default.nix create mode 100644 pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch create mode 100644 pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch create mode 100644 pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch diff --git a/doc/release-notes/rl-2505.section.md b/doc/release-notes/rl-2505.section.md index 933cf114ec1c..71689e45fb8c 100644 --- a/doc/release-notes/rl-2505.section.md +++ b/doc/release-notes/rl-2505.section.md @@ -62,7 +62,7 @@ - [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided. The `name` argument will become mandatory in a future release. -- `gimp` has been upgraded to [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/). +- `gimp` has been upgraded to [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/). Most plug-ins are not compatible so the old version has been preserved as `gimp2`, `gimp2Plugins` and `gimp2-with-plugins`. - `grafana-agent` and `services.grafana-agent` have been removed in favor of Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version diff --git a/pkgs/applications/graphics/gimp/2.0/default.nix b/pkgs/applications/graphics/gimp/2.0/default.nix new file mode 100644 index 000000000000..e5e552f299f9 --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/default.nix @@ -0,0 +1,226 @@ +{ + stdenv, + lib, + fetchurl, + replaceVars, + autoreconfHook, + pkg-config, + intltool, + babl, + gegl, + gtk2, + glib, + gdk-pixbuf, + isocodes, + pango, + cairo, + freetype, + fontconfig, + lcms, + libpng, + libjpeg, + libjxl, + poppler, + poppler_data, + libtiff, + libmng, + librsvg, + libwmf, + zlib, + libzip, + ghostscript, + aalib, + shared-mime-info, + libexif, + gettext, + makeWrapper, + gtk-doc, + xorg, + glib-networking, + libmypaint, + gexiv2, + harfbuzz, + mypaint-brushes1, + libwebp, + libheif, + libxslt, + libgudev, + openexr, + desktopToDarwinBundle, + AppKit, + Cocoa, + gtk-mac-integration-gtk2, + withPython ? false, + python2, +}: + +let + python = python2.withPackages (pp: [ pp.pygtk ]); +in +stdenv.mkDerivation (finalAttrs: { + pname = "gimp"; + version = "2.10.38"; + + outputs = [ + "out" + "dev" + ]; + + src = fetchurl { + url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2"; + sha256 = "sha256-UKhF7sEciDH+hmFweVD1uERuNfMO37ms+Y+FwRM/hW4="; + }; + + patches = [ + # to remove compiler from the runtime closure, reference was retained via + # gimp --version --verbose output + (replaceVars ./remove-cc-reference.patch { + cc_version = stdenv.cc.cc.name; + }) + + # Use absolute paths instead of relying on PATH + # to make sure plug-ins are loaded by the correct interpreter. + ./hardcode-plugin-interpreters.patch + + # GIMP queries libheif.pc for builtin encoder/decoder support to determine if AVIF/HEIC files are supported + # (see https://gitlab.gnome.org/GNOME/gimp/-/blob/a8b1173ca441283971ee48f4778e2ffd1cca7284/configure.ac?page=2#L1846-1852) + # These variables have been removed since libheif 1.18.0 + # (see https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a) + # This has already been fixed for the upcoming GIMP 3, but the fix has not been backported to 2.x yet + # (see https://gitlab.gnome.org/GNOME/gimp/-/issues/9080) + ./force-enable-libheif.patch + ]; + + nativeBuildInputs = + [ + autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am + pkg-config + intltool + gettext + makeWrapper + gtk-doc + libxslt + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + desktopToDarwinBundle + ]; + + buildInputs = + [ + babl + gegl + gtk2 + glib + gdk-pixbuf + pango + cairo + gexiv2 + harfbuzz + isocodes + freetype + fontconfig + lcms + libpng + libjpeg + libjxl + poppler + poppler_data + libtiff + openexr + libmng + librsvg + libwmf + zlib + libzip + ghostscript + aalib + shared-mime-info + libwebp + libheif + libexif + xorg.libXpm + glib-networking + libmypaint + mypaint-brushes1 + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + AppKit + Cocoa + gtk-mac-integration-gtk2 + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libgudev + ] + ++ lib.optionals withPython [ + python + # Duplicated here because python.withPackages does not expose the dev output with pkg-config files + python2.pkgs.pygtk + ]; + + # needed by gimp-2.0.pc + propagatedBuildInputs = [ + gegl + ]; + + configureFlags = + [ + "--without-webkit" # old version is required + "--disable-check-update" + "--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new" + "--with-icc-directory=/run/current-system/sw/share/color/icc" + # fix libdir in pc files (${exec_prefix} needs to be passed verbatim) + "--libdir=\${exec_prefix}/lib" + ] + ++ lib.optionals (!withPython) [ + "--disable-python" # depends on Python2 which was EOLed on 2020-01-01 + ]; + + enableParallelBuilding = true; + + doCheck = true; + + env = { + NIX_CFLAGS_COMPILE = toString ( + [ ] + ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ] + ); + + # Check if librsvg was built with --disable-pixbuf-loader. + PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; + }; + + preConfigure = '' + # The check runs before glib-networking is registered + export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES" + ''; + + postFixup = '' + wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" + ''; + + passthru = { + # The declarations for `gimp-with-plugins` wrapper, + # used for determining plug-in installation paths + majorVersion = "${lib.versions.major finalAttrs.version}.0"; + targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}"; + targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}"; + targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins"; + targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts"; + + # probably its a good idea to use the same gtk in plugins ? + gtk = gtk2; + + python2Support = withPython; + }; + + meta = with lib; { + description = "GNU Image Manipulation Program"; + homepage = "https://www.gimp.org/"; + maintainers = with maintainers; [ jtojnar ]; + license = licenses.gpl3Plus; + platforms = platforms.unix; + mainProgram = "gimp"; + }; +}) diff --git a/pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch b/pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch new file mode 100644 index 000000000000..de3dfb09b95e --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 48c3c77892..3189781817 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1843,13 +1843,13 @@ can_export_heic=no + can_import_avif=no + can_export_avif=no + if test "x$have_libheif" = xyes; then +- can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif` +- can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif` ++ can_import_heic=yes ++ can_export_heic=yes + if test "x$can_import_heic" = xyes; then + MIME_TYPES="$MIME_TYPES;image/heif;image/heic" + fi +- can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif` +- can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif` ++ can_import_avif=yes ++ can_export_avif=yes + if test "x$can_import_avif" = xyes; then + MIME_TYPES="$MIME_TYPES;image/avif" + fi diff --git a/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch new file mode 100644 index 000000000000..1528404c31d2 --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch @@ -0,0 +1,11 @@ +--- a/plug-ins/pygimp/Makefile.am ++++ b/plug-ins/pygimp/Makefile.am +@@ -157,7 +157,7 @@ install-interp-file: + echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)' + echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' + echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' +- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)' ++ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)' + + install-data-local: install-env-file install-interp-file + diff --git a/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch new file mode 100644 index 000000000000..20c350bdaea1 --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch @@ -0,0 +1,13 @@ +diff --git a/app/gimp-version.c b/app/gimp-version.c +index 3d1894a036..48bb670b64 100644 +--- a/app/gimp-version.c ++++ b/app/gimp-version.c +@@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose, + GIMP_BUILD_ID, + gimp_version_get_revision (), + GIMP_BUILD_PLATFORM_FAMILY, +- CC_VERSION, ++ "@cc_version@", + lib_versions); + g_free (lib_versions); + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d14129b927c7..9e81417d38f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14554,6 +14554,23 @@ with pkgs; gimpPlugins = recurseIntoAttrs (callPackage ../applications/graphics/gimp/plugins { }); + gimp2 = callPackage ../applications/graphics/gimp/2.0 { + autoreconfHook = buildPackages.autoreconfHook269; + lcms = lcms2; + inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; + }; + + gimp2-with-plugins = callPackage ../applications/graphics/gimp/wrapper.nix { + gimpPlugins = gimp2Plugins; + plugins = null; # All packaged plugins enabled, if not explicit plugin list supplied + }; + + gimp2Plugins = recurseIntoAttrs ( + callPackage ../applications/graphics/gimp/plugins { + gimp = gimp2; + } + ); + girara = callPackage ../applications/misc/girara { gtk = gtk3; }; From 9a6a23bd11ad3c47df085e7564d8edee7b6c3208 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 27 Mar 2025 23:25:57 +0100 Subject: [PATCH 21/75] gimp2: Unmaintain Superseded by GIMP 3 in the `gimp` package. --- pkgs/applications/graphics/gimp/2.0/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/gimp/2.0/default.nix b/pkgs/applications/graphics/gimp/2.0/default.nix index e5e552f299f9..1d64cc10806f 100644 --- a/pkgs/applications/graphics/gimp/2.0/default.nix +++ b/pkgs/applications/graphics/gimp/2.0/default.nix @@ -218,7 +218,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "GNU Image Manipulation Program"; homepage = "https://www.gimp.org/"; - maintainers = with maintainers; [ jtojnar ]; + maintainers = with maintainers; [ ]; license = licenses.gpl3Plus; platforms = platforms.unix; mainProgram = "gimp"; From bc17b33471454e8bce6edf92de8030a121c15dbd Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 2 Apr 2025 01:05:57 +0200 Subject: [PATCH 22/75] gimp: Switch back go GIMP 2 Temporarily, rename `gimp` to `gimp3` and `gimp2` back to `gimp`. Revert once GIMP 3 works on Darwin again and performance regressions are debugged. --- doc/release-notes/rl-2505.section.md | 2 +- pkgs/top-level/all-packages.nix | 36 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/release-notes/rl-2505.section.md b/doc/release-notes/rl-2505.section.md index 71689e45fb8c..10ec2a0a023b 100644 --- a/doc/release-notes/rl-2505.section.md +++ b/doc/release-notes/rl-2505.section.md @@ -62,7 +62,7 @@ - [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided. The `name` argument will become mandatory in a future release. -- `gimp` has been upgraded to [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/). Most plug-ins are not compatible so the old version has been preserved as `gimp2`, `gimp2Plugins` and `gimp2-with-plugins`. +- [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/) available as `gimp3`. - `grafana-agent` and `services.grafana-agent` have been removed in favor of Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e81417d38f8..0c9af914fbf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14543,7 +14543,24 @@ with pkgs; inherit (xorg) xlsfonts; - gimp = callPackage ../applications/graphics/gimp { + gimp3 = callPackage ../applications/graphics/gimp { + lcms = lcms2; + inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; + }; + + gimp3-with-plugins = callPackage ../applications/graphics/gimp/wrapper.nix { + gimpPlugins = gimp3Plugins; + plugins = null; # All packaged plugins enabled, if not explicit plugin list supplied + }; + + gimp3Plugins = recurseIntoAttrs ( + callPackage ../applications/graphics/gimp/plugins { + gimp = gimp3; + } + ); + + gimp = callPackage ../applications/graphics/gimp/2.0 { + autoreconfHook = buildPackages.autoreconfHook269; lcms = lcms2; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; }; @@ -14554,23 +14571,6 @@ with pkgs; gimpPlugins = recurseIntoAttrs (callPackage ../applications/graphics/gimp/plugins { }); - gimp2 = callPackage ../applications/graphics/gimp/2.0 { - autoreconfHook = buildPackages.autoreconfHook269; - lcms = lcms2; - inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; - }; - - gimp2-with-plugins = callPackage ../applications/graphics/gimp/wrapper.nix { - gimpPlugins = gimp2Plugins; - plugins = null; # All packaged plugins enabled, if not explicit plugin list supplied - }; - - gimp2Plugins = recurseIntoAttrs ( - callPackage ../applications/graphics/gimp/plugins { - gimp = gimp2; - } - ); - girara = callPackage ../applications/misc/girara { gtk = gtk3; }; From b98bc466f8c2ee6ee128a1bd3c105a4b924b41aa Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 15 Apr 2025 21:05:19 +0800 Subject: [PATCH 23/75] pantheon.wingpanel-indicator-datetime: Drop unused libsoup2 It used to be there because e-d-s previously did not propagate libsoup2, but now e-d-s propagates libsoup3. --- .../pantheon/desktop/wingpanel-indicators/datetime/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix index dc8d244b1c6a..afbf08cf401a 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix @@ -16,7 +16,6 @@ libgee, libhandy, libxml2, - libsoup_2_4, elementary-calendar, }: @@ -52,7 +51,6 @@ stdenv.mkDerivation rec { libgee libhandy libical - libsoup_2_4 wingpanel ]; From e6195526502d0bee9b4e1c1082a54fd737845699 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 15 Apr 2025 21:33:05 +0800 Subject: [PATCH 24/75] xfce.xfce4-weather-plugin: Backport support for libsoup3 These are the patches backported by Void Linux. --- .../xfce4-weather-plugin/default.nix | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix index 420fd62b68d6..3ae26029e889 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix @@ -2,19 +2,20 @@ lib, stdenv, fetchurl, + fetchpatch, gettext, pkg-config, + xfce4-dev-tools, glib, gtk3, json_c, libxml2, - libsoup_2_4, + libsoup_3, upower, libxfce4ui, libxfce4util, xfce4-panel, xfconf, - hicolor-icon-theme, gitUpdater, }: @@ -31,9 +32,23 @@ stdenv.mkDerivation rec { sha256 = "sha256-AC0f5jkG0vOgEvPLWMzv8d+8xGZ1njbHbTsD3QHA3Fc="; }; + patches = [ + # Port to libsoup-3.0 + # https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/merge_requests/28 + (fetchpatch { + url = "https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/commit/c0653a903c6f2cecdf41ac9eaeba4f4617656ffe.patch"; + hash = "sha256-wAowm4ppBSKvYwOowZbbs5pnTh9EQ9XX05lA81wtsRM="; + }) + (fetchpatch { + url = "https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/commit/279c975dc1f95bd1ce9152eee1d19122e7deb9a8.patch"; + hash = "sha256-gVfyXkE0bjBfvcQU9fDp+Gm59bD3VbAam04Jak8i31k="; + }) + ]; + nativeBuildInputs = [ gettext pkg-config + xfce4-dev-tools ]; buildInputs = [ @@ -41,15 +56,16 @@ stdenv.mkDerivation rec { gtk3 json_c libxml2 - libsoup_2_4 + libsoup_3 upower libxfce4ui libxfce4util xfce4-panel xfconf - hicolor-icon-theme ]; + configureFlags = [ "--enable-maintainer-mode" ]; + enableParallelBuilding = true; passthru.updateScript = gitUpdater { From 775256038d935b0b80400a5c1c7cc2ff53dda995 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Tue, 15 Apr 2025 12:53:22 -0600 Subject: [PATCH 25/75] rns: 0.9.3 -> 0.9.4 --- pkgs/development/python-modules/rns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index 1bc7c63a7837..02403b23e85e 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "rns"; - version = "0.9.3"; + version = "0.9.4"; pyproject = true; src = fetchFromGitHub { owner = "markqvist"; repo = "Reticulum"; tag = version; - hash = "sha256-50L+5WVsYaidz71rkGZny2KlCR3ZfPEQJEPI38MOBWA="; + hash = "sha256-Z6Af/PNQkbo+0xn0kEh2I8T03D/gQpuRNHBhLX3mkms="; }; patches = [ From 182134f6660eb037c86fd143da768008b842d162 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Tue, 15 Apr 2025 12:53:42 -0600 Subject: [PATCH 26/75] python3Packages.nomadnet: 0.6.1 -> 0.6.2 --- pkgs/development/python-modules/nomadnet/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nomadnet/default.nix b/pkgs/development/python-modules/nomadnet/default.nix index 3041b8b0a9e9..8c6bda4b7f17 100644 --- a/pkgs/development/python-modules/nomadnet/default.nix +++ b/pkgs/development/python-modules/nomadnet/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "nomadnet"; - version = "0.6.1"; + version = "0.6.2"; pyproject = true; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "markqvist"; repo = "NomadNet"; tag = version; - hash = "sha256-TKn35rrWsHo/5bGriMcPx+lPvhWzmVXU3EG4KU/ebwI="; + hash = "sha256-HBNZvU4ZCLgEn8ul1iflaY18novZMnn8GIojriX/ej0="; }; build-system = [ setuptools ]; From 4001d9db5de6872f5700b697aa5ff1d6bf9f58de Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Tue, 15 Apr 2025 23:15:21 +0000 Subject: [PATCH 27/75] nixos/ax25/axports: init --- nixos/modules/module-list.nix | 1 + .../services/networking/ax25/axports.nix | 149 ++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 nixos/modules/services/networking/ax25/axports.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 238f42652849..d7dddff46352 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1055,6 +1055,7 @@ ./services/networking/atticd.nix ./services/networking/autossh.nix ./services/networking/avahi-daemon.nix + ./services/networking/ax25/axports.nix ./services/networking/babeld.nix ./services/networking/bee.nix ./services/networking/biboumi.nix diff --git a/nixos/modules/services/networking/ax25/axports.nix b/nixos/modules/services/networking/ax25/axports.nix new file mode 100644 index 000000000000..257d7ee8c1c5 --- /dev/null +++ b/nixos/modules/services/networking/ax25/axports.nix @@ -0,0 +1,149 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + types + ; + + inherit (lib.strings) + concatStringsSep + optionalString + ; + + inherit (lib.attrsets) + filterAttrs + mapAttrsToList + mapAttrs' + ; + + inherit (lib.modules) + mkIf + ; + + inherit (lib.options) + mkEnableOption + mkOption + mkPackageOption + ; + + cfg = config.services.ax25.axports; + + enabledAxports = filterAttrs (ax25Name: cfg: cfg.enable) cfg; + + axportsOpts = { + + options = { + enable = mkEnableOption "Enables the axport interface"; + + package = mkPackageOption pkgs "ax25-tools" { }; + + tty = mkOption { + type = types.str; + example = "/dev/ttyACM0"; + description = '' + Location of hardware kiss tnc for this interface. + ''; + }; + + callsign = mkOption { + type = types.str; + example = "WB6WLV-7"; + description = '' + The callsign of the physical interface to bind to. + ''; + }; + + description = mkOption { + type = types.str; + # This cannot be empty since some ax25 tools cant parse /etc/ax25/axports without it + default = "NixOS managed tnc"; + description = '' + Free format description of this interface. + ''; + }; + + baud = mkOption { + type = types.int; + example = 57600; + description = '' + The serial port speed of this interface. + ''; + }; + + paclen = mkOption { + type = types.int; + default = 255; + description = '' + Default maximum packet size for this interface. + ''; + }; + + window = mkOption { + type = types.int; + default = 7; + description = '' + Default window size for this interface. + ''; + }; + + kissParams = mkOption { + type = types.nullOr types.str; + default = null; + example = "-t 300 -l 10 -s 12 -r 80 -f n"; + description = '' + Kissattach parameters for this interface. + ''; + }; + }; + }; +in +{ + + options = { + + services.ax25.axports = mkOption { + type = types.attrsOf (types.submodule axportsOpts); + default = { }; + description = "Specification of one or more AX.25 ports."; + }; + }; + + config = mkIf (enabledAxports != { }) { + + environment.etc."ax25/axports" = { + text = concatStringsSep "\n" ( + mapAttrsToList ( + portName: portCfg: + "${portName} ${portCfg.callsign} ${toString portCfg.baud} ${toString portCfg.paclen} ${toString portCfg.window} ${portCfg.description}" + ) enabledAxports + ); + mode = "0644"; + }; + + systemd.targets.ax25-axports = { + description = "AX.25 axports group target"; + }; + + systemd.services = mapAttrs' (portName: portCfg: { + name = "ax25-kissattach-${portName}"; + value = { + description = "AX.25 KISS attached interface for ${portName}"; + wantedBy = [ "multi-user.target" ]; + before = [ "ax25-axports.target" ]; + partOf = [ "ax25-axports.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${portCfg.package}/bin/kissattach ${portCfg.tty} ${portName}"; + }; + postStart = optionalString (portCfg.kissParams != null) '' + ${portCfg.package}/bin/kissparms -p ${portName} ${portCfg.kissParams} + ''; + }; + }) enabledAxports; + }; +} From 9b70561e159862257cab6d4822da482486cb2c13 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Tue, 15 Apr 2025 23:15:58 +0000 Subject: [PATCH 28/75] nixos/ax25/axlisten: init --- nixos/modules/module-list.nix | 1 + .../services/networking/ax25/axlisten.nix | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 nixos/modules/services/networking/ax25/axlisten.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index d7dddff46352..1f1317ddcdfe 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1055,6 +1055,7 @@ ./services/networking/atticd.nix ./services/networking/autossh.nix ./services/networking/avahi-daemon.nix + ./services/networking/ax25/axlisten.nix ./services/networking/ax25/axports.nix ./services/networking/babeld.nix ./services/networking/bee.nix diff --git a/nixos/modules/services/networking/ax25/axlisten.nix b/nixos/modules/services/networking/ax25/axlisten.nix new file mode 100644 index 000000000000..ad887885c142 --- /dev/null +++ b/nixos/modules/services/networking/ax25/axlisten.nix @@ -0,0 +1,62 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + types + ; + + inherit (lib.modules) + mkIf + ; + + inherit (lib.options) + mkEnableOption + mkOption + literalExpression + ; + + cfg = config.services.ax25.axlisten; +in +{ + options = { + + services.ax25.axlisten = { + + enable = mkEnableOption "AX.25 axlisten daemon"; + + package = mkOption { + type = types.package; + default = pkgs.ax25-apps; + defaultText = literalExpression "pkgs.ax25-apps"; + description = "The ax25-apps package to use."; + }; + + config = mkOption { + type = types.str; + default = "-art"; + description = '' + Options that will be passed to the axlisten daemon. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + + systemd.services.axlisten = { + description = "AX.25 traffic monitor"; + wantedBy = [ "multi-user.target" ]; + after = [ "ax25-axports.target" ]; + requires = [ "ax25-axports.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${cfg.package}/bin/axlisten ${cfg.config}"; + }; + }; + }; +} From ad963072251a39374410387b74808b43f363f8c3 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Tue, 15 Apr 2025 23:16:23 +0000 Subject: [PATCH 29/75] nixos/tests/ax25: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/ax25.nix | 131 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 nixos/tests/ax25.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9ffc0db8513b..d8179f85771f 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -213,6 +213,7 @@ in atop = import ./atop.nix { inherit pkgs runTest; }; atticd = runTest ./atticd.nix; atuin = runTest ./atuin.nix; + ax25 = handleTest ./ax25.nix { }; audiobookshelf = runTest ./audiobookshelf.nix; auth-mysql = runTest ./auth-mysql.nix; authelia = runTest ./authelia.nix; diff --git a/nixos/tests/ax25.nix b/nixos/tests/ax25.nix new file mode 100644 index 000000000000..f1092d5de101 --- /dev/null +++ b/nixos/tests/ax25.nix @@ -0,0 +1,131 @@ +import ./make-test-python.nix ( + { pkgs, lib, ... }: + let + + baud = 57600; + tty = "/dev/ttyACM0"; + port = "tnc0"; + socatPort = 1234; + + createAX25Node = nodeId: { + + boot.kernelPackages = pkgs.linuxPackages_ham; + boot.kernelModules = [ "ax25" ]; + + networking.firewall.allowedTCPPorts = [ socatPort ]; + + environment.systemPackages = with pkgs; [ + libax25 + ax25-tools + ax25-apps + socat + ]; + + services.ax25.axports."${port}" = { + inherit baud tty; + enable = true; + callsign = "NOCALL-${toString nodeId}"; + description = "mocked tnc"; + }; + + services.ax25.axlisten = { + enable = true; + }; + + # All mocks radios will connect back to socat-broker on node 1 in order to get + # all messages that are "broadcasted over the ether" + systemd.services.ax25-mock-hardware = { + description = "mock AX.25 TNC and Radio"; + wantedBy = [ "default.target" ]; + before = [ + "ax25-kissattach-${port}.service" + "axlisten.service" + ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${pkgs.socat}/bin/socat -d -d tcp:192.168.1.1:${toString socatPort} pty,link=${tty},b${toString baud},raw"; + }; + }; + }; + in + { + name = "ax25Simple"; + nodes = { + node1 = lib.mkMerge [ + (createAX25Node 1) + # mimicking radios on the same frequency + { + systemd.services.ax25-mock-ether = { + description = "mock radio ether"; + wantedBy = [ "default.target" ]; + requires = [ "network.target" ]; + before = [ "ax25-mock-hardware.service" ]; + # broken needs access to "ss" or "netstat" + path = [ pkgs.iproute2 ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${pkgs.socat}/bin/socat-broker.sh tcp4-listen:${toString socatPort}"; + }; + postStart = "${pkgs.coreutils}/bin/sleep 2"; + }; + } + ]; + node2 = createAX25Node 2; + node3 = createAX25Node 3; + }; + testScript = + { ... }: + '' + def wait_for_machine(m): + m.succeed("lsmod | grep ax25") + m.wait_for_unit("ax25-axports.target") + m.wait_for_unit("axlisten.service") + m.fail("journalctl -o cat -u axlisten.service | grep -i \"no AX.25 port data configured\"") + + # start the first node since the socat-broker needs to be running + node1.start() + node1.wait_for_unit("ax25-mock-ether.service") + wait_for_machine(node1) + + node2.start() + node3.start() + wait_for_machine(node2) + wait_for_machine(node3) + + # Node 1 -> Node 2 + node1.succeed("echo hello | ax25_call ${port} NOCALL-1 NOCALL-2") + node2.sleep(1) + node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-1 to NOCALL-2 ctl I00\" | grep hello") + + # Node 1 -> Node 3 + node1.succeed("echo hello | ax25_call ${port} NOCALL-1 NOCALL-3") + node3.sleep(1) + node3.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-1 to NOCALL-3 ctl I00\" | grep hello") + + # Node 2 -> Node 1 + # must sleep due to previous ax25_call lingering + node2.sleep(5) + node2.succeed("echo hello | ax25_call ${port} NOCALL-2 NOCALL-1") + node1.sleep(1) + node1.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-2 to NOCALL-1 ctl I00\" | grep hello") + + # Node 2 -> Node 3 + node2.succeed("echo hello | ax25_call ${port} NOCALL-2 NOCALL-3") + node3.sleep(1) + node3.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-2 to NOCALL-3 ctl I00\" | grep hello") + + # Node 3 -> Node 1 + # must sleep due to previous ax25_call lingering + node3.sleep(5) + node3.succeed("echo hello | ax25_call ${port} NOCALL-3 NOCALL-1") + node1.sleep(1) + node1.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-1 ctl I00\" | grep hello") + + # Node 3 -> Node 2 + node3.succeed("echo hello | ax25_call ${port} NOCALL-3 NOCALL-2") + node2.sleep(1) + node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-2 ctl I00\" | grep hello") + ''; + } +) From ae31ceca9d611c34abdeed34a9c3c8b99e6051d7 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 15 Apr 2025 21:40:04 -0500 Subject: [PATCH 30/75] luaPackages.rustaceanvim: 6.0.1-1 -> 6.0.2-1 --- pkgs/development/lua-modules/generated-packages.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 744f8e3084f8..2aba8982cbb7 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -4649,15 +4649,15 @@ final: prev: { }: buildLuarocksPackage { pname = "rustaceanvim"; - version = "6.0.1-1"; + version = "6.0.2-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rustaceanvim-6.0.1-1.rockspec"; - sha256 = "02qxbrk32fay17nlxs4sf4dpkvsfnj5lkm8wsb2q0a8jaa2v7dxv"; + url = "mirror://luarocks/rustaceanvim-6.0.2-1.rockspec"; + sha256 = "1z2s2f91mnc9fxr5ykffajpj2c92rjgnwipfvi2lhhl2p5hpgf9f"; }).outPath; src = fetchzip { - url = "https://github.com/mrcjkb/rustaceanvim/archive/v6.0.1.zip"; - sha256 = "032barkibbsjjwzq87jbn2sqni3f5bmfvxn2bcq589viwdrziwgf"; + url = "https://github.com/mrcjkb/rustaceanvim/archive/v6.0.2.zip"; + sha256 = "09wrfmzbk81xax5p4wzczsvv1x28nv54mayi12fvzv6c3bmcsbvj"; }; disabled = luaOlder "5.1"; From 06e88515c0868c3120754758971a6057c13b12ce Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 15 Apr 2025 21:11:36 -0400 Subject: [PATCH 31/75] screen-pipe: Remove remaining darwin.apple_sdk_12_3 use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the last use in the tree. (Almost.) Note: gst_all_1.* use is not updated because it was already fixed in staging branch: https://github.com/NixOS/nixpkgs/pull/398010 Note2: the package is broken for a long time, so the change cannot be confirmed to not break it even further. 🤷 Signed-off-by: Ihar Hrachyshka --- pkgs/by-name/sc/screen-pipe/package.nix | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/sc/screen-pipe/package.nix b/pkgs/by-name/sc/screen-pipe/package.nix index 141eca8d82c7..36118fc16fdd 100644 --- a/pkgs/by-name/sc/screen-pipe/package.nix +++ b/pkgs/by-name/sc/screen-pipe/package.nix @@ -9,9 +9,9 @@ openssl, sqlite, stdenv, - darwin, alsa-lib, xorg, + apple-sdk_12, }: rustPlatform.buildRustPackage rec { pname = "screen-pipe"; @@ -49,22 +49,9 @@ rustPlatform.buildRustPackage rec { openssl sqlite ] - ++ lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk_12_3.frameworks; - [ - CoreAudio - AudioUnit - CoreFoundation - CoreGraphics - CoreMedia - IOKit - Metal - MetalPerformanceShaders - Security - ScreenCaptureKit - SystemConfiguration - ] - ) + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_12 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib xorg.libxcb From c14ba6140fdcfb4a9bbe23f46367d553d08991c2 Mon Sep 17 00:00:00 2001 From: MarcFontaine Date: Fri, 11 Apr 2025 17:28:08 +0200 Subject: [PATCH 32/75] grig: fix for hamlib-4.6.x --- .../grig/0001-Fix-grig-for-hamlib-4.6.x.patch | 56 +++++++++++++++++++ pkgs/by-name/gr/grig/package.nix | 5 ++ 2 files changed, 61 insertions(+) create mode 100644 pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch diff --git a/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch new file mode 100644 index 000000000000..2ddbeb767705 --- /dev/null +++ b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch @@ -0,0 +1,56 @@ +diff --git a/src/main.c b/src/main.c +index d16a7f7..2c596e9 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -125,7 +125,7 @@ static gint grig_app_delete (GtkWidget *, GdkEvent *, gpointer); + static void grig_app_destroy (GtkWidget *, gpointer); + static void grig_show_help (void); + static void grig_show_version (void); +-static gint grig_list_add (const struct rig_caps *, void *); ++static gint grig_list_add (struct rig_caps *, void *); + static gint grig_list_compare (gconstpointer, gconstpointer); + static void grig_sig_handler (int sig); + +@@ -729,7 +729,7 @@ grig_list_rigs () + * \sa grig_list_rigs, grig_list_compare + */ + static gint +-grig_list_add (const struct rig_caps *caps, void *array) ++grig_list_add (struct rig_caps *caps, void *array) + { + grig_rig_info_t *info; + +diff --git a/src/rig-selector.c b/src/rig-selector.c +index 425d41a..e040c0e 100644 +--- a/src/rig-selector.c ++++ b/src/rig-selector.c +@@ -46,7 +46,7 @@ static void add (GtkWidget *, gpointer); + static void delete (GtkWidget *, gpointer); + static void edit (GtkWidget *, gpointer); + static void cancel (GtkWidget *, gpointer); +-static void connect (GtkWidget *, gpointer); ++static void connectrig (GtkWidget *, gpointer); + static void selection_changed (GtkTreeSelection *sel, gpointer data); + + static void render_civ (GtkTreeViewColumn *col, +@@ -191,7 +191,7 @@ rig_selector_execute () + g_signal_connect (G_OBJECT (cancbut), "clicked", + G_CALLBACK (cancel), window); + g_signal_connect (G_OBJECT (conbut), "clicked", +- G_CALLBACK (connect), window); ++ G_CALLBACK (connectrig), window); + g_signal_connect (G_OBJECT (delbut), "clicked", + G_CALLBACK (delete), NULL); + g_signal_connect (G_OBJECT (newbut), "clicked", +@@ -439,7 +439,7 @@ static void cancel (GtkWidget *button, gpointer window) + * simply destroys the rig selector window and whereby control is returned + * to the main() function. + */ +-static void connect (GtkWidget *button, gpointer window) ++static void connectrig (GtkWidget *button, gpointer window) + { + + +-- +2.47.0 + diff --git a/pkgs/by-name/gr/grig/package.nix b/pkgs/by-name/gr/grig/package.nix index 189eaeaa3639..d6dfabd09375 100644 --- a/pkgs/by-name/gr/grig/package.nix +++ b/pkgs/by-name/gr/grig/package.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-OgIgHW9NMW/xSSti3naIR8AQWUtNSv5bYdOcObStBlM="; }; + patches = [ + # https://github.com/fillods/grig/issues/22 + ./0001-Fix-grig-for-hamlib-4.6.x.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config From 771cda90e127080ed2614a88587783aa590157dd Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Wed, 16 Apr 2025 12:50:40 +0800 Subject: [PATCH 33/75] zed-editor: 0.181.5 -> 0.181.8 --- pkgs/by-name/ze/zed-editor/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index b3f75176f55f..673c818ab843 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -98,7 +98,7 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "zed-editor"; - version = "0.181.5"; + version = "0.181.8"; outputs = [ "out" ] @@ -110,7 +110,7 @@ rustPlatform.buildRustPackage (finalAttrs: { owner = "zed-industries"; repo = "zed"; tag = "v${finalAttrs.version}"; - hash = "sha256-wp8CoWEOSScQP2Q+lQJgstzTNNwiy0ONHOy6PjIlFBo="; + hash = "sha256-gkbiV0kfeM1Ito8jVOBVneNjaXCA4PFayXJLIUmjqn4="; }; patches = [ @@ -128,7 +128,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; useFetchCargoVendor = true; - cargoHash = "sha256-FATdeVwbSUA/zfWV9TdoS4/fT9KWsekKGjQ34HJW4rk="; + cargoHash = "sha256-PMLu2PeyRNu6VbHByL+clUoY/P8Rlrc+SvP5gDKrN/E="; nativeBuildInputs = [ From 0ed45481feb4131341ef8ebbca7a5bb0f815d134 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 16 Apr 2025 09:53:34 +0200 Subject: [PATCH 34/75] python312Packages.islpy: 2025.1.3 -> 2025.1.5 Diff: https://github.com/inducer/islpy/compare/refs/tags/v2025.1.3...refs/tags/v2025.1.5 Changelog: https://github.com/inducer/islpy/releases/tag/v2025.1.5 --- pkgs/development/python-modules/islpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/islpy/default.nix b/pkgs/development/python-modules/islpy/default.nix index 8738fc22e1f5..c7f6c53cb1bc 100644 --- a/pkgs/development/python-modules/islpy/default.nix +++ b/pkgs/development/python-modules/islpy/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "islpy"; - version = "2025.1.3"; + version = "2025.1.5"; pyproject = true; src = fetchFromGitHub { owner = "inducer"; repo = "islpy"; tag = "v${version}"; - hash = "sha256-3HUfr0W5X8HaViUD0kpKbdxTTRS/TW6PvAGl8vr03XU="; + hash = "sha256-hzqxVLNKm63XliX5rDB54f6n1nJPVJJSAMmNTInbOEE="; }; build-system = [ From 04a4e527ae916b2e53708219ff1e1b03c7893180 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 07:53:36 +0000 Subject: [PATCH 35/75] lutgen: 0.11.2 -> 0.12.0 --- pkgs/by-name/lu/lutgen/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/lu/lutgen/package.nix b/pkgs/by-name/lu/lutgen/package.nix index 4d096143fbfc..011a65ce898f 100644 --- a/pkgs/by-name/lu/lutgen/package.nix +++ b/pkgs/by-name/lu/lutgen/package.nix @@ -8,17 +8,17 @@ rustPlatform.buildRustPackage rec { pname = "lutgen"; - version = "0.11.2"; + version = "0.12.0"; src = fetchFromGitHub { owner = "ozwaldorf"; repo = "lutgen-rs"; rev = "v${version}"; - hash = "sha256-jmMVeDDVb/TuxulDYj+8y4Kl42EJTAWb3tAsanfWduE="; + hash = "sha256-VE4R0rdQbZ7cyCPRtWWARUAnlR/KWGFUoJSJ4lySwzY="; }; useFetchCargoVendor = true; - cargoHash = "sha256-BEh8Wl0X1wv53w/Zu0PHwh8oGtCvIJe60aVqLbiH1Hs="; + cargoHash = "sha256-H913/EjCh14AcCIj/Em6neP5F6i88rSVbPMmnS3po/I="; nativeBuildInputs = [ installShellFiles ]; From 00b1651006d3599fd980d3274c653fbec2749b63 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 09:30:12 +0000 Subject: [PATCH 36/75] gallery-dl: 1.29.3 -> 1.29.4 --- pkgs/by-name/ga/gallery-dl/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ga/gallery-dl/package.nix b/pkgs/by-name/ga/gallery-dl/package.nix index cded6b78595c..af8206fd4f33 100644 --- a/pkgs/by-name/ga/gallery-dl/package.nix +++ b/pkgs/by-name/ga/gallery-dl/package.nix @@ -8,7 +8,7 @@ let pname = "gallery-dl"; - version = "1.29.3"; + version = "1.29.4"; in python3Packages.buildPythonApplication { inherit pname version; @@ -18,7 +18,7 @@ python3Packages.buildPythonApplication { owner = "mikf"; repo = "gallery-dl"; tag = "v${version}"; - hash = "sha256-LzMiJxMl6IWtUloWxBAMLvkhnTQpHkz/gjWl5gW2sZ0="; + hash = "sha256-dQK1AWmdlfb1cRcYzXWUsXmRgjQRc++zEHZvLUygMwg="; }; build-system = [ python3Packages.setuptools ]; From 2e4e1472df72e5a02c8927359e554bd0425dd562 Mon Sep 17 00:00:00 2001 From: Defelo Date: Tue, 8 Apr 2025 10:56:32 +0200 Subject: [PATCH 37/75] synapse-admin-etkecc: init at 0.10.3-etke39 --- .../sy/synapse-admin-etkecc/package.nix | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 pkgs/by-name/sy/synapse-admin-etkecc/package.nix diff --git a/pkgs/by-name/sy/synapse-admin-etkecc/package.nix b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix new file mode 100644 index 000000000000..8f445e0000f0 --- /dev/null +++ b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix @@ -0,0 +1,79 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnBuildHook, + nodejs, + nix-update-script, + writers, + baseUrl ? null, +}: + +assert lib.asserts.assertMsg ( + baseUrl == null +) "The baseUrl parameter is deprecated, please use .withConfig instead"; + +stdenv.mkDerivation (finalAttrs: { + pname = "synapse-admin-etkecc"; + version = "0.10.3-etke39"; + + src = fetchFromGitHub { + owner = "etkecc"; + repo = "synapse-admin"; + tag = "v${finalAttrs.version}"; + hash = "sha256-1jE4QrHAnH27FrfpgM8rKd4I2AAJArtL0jgcWVc8TrU="; + }; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = finalAttrs.src + "/yarn.lock"; + hash = "sha256-60rS/OfPEQmmZ5j7mUjMPyK9prgNOX7MkYpu9djdjxQ="; + }; + + nativeBuildInputs = [ + nodejs + yarnConfigHook + yarnBuildHook + ]; + + env = { + NODE_ENV = "production"; + SYNAPSE_ADMIN_VERSION = finalAttrs.version; + }; + + installPhase = '' + runHook preInstall + cp -r dist $out + runHook postInstall + ''; + + passthru = { + # https://github.com/etkecc/synapse-admin/blob/main/docs/config.md + withConfig = + config: + stdenv.mkDerivation { + inherit (finalAttrs) version meta; + pname = "synapse-admin-etkecc-with-config"; + dontUnpack = true; + configFile = writers.writeJSON "synapse-admin-config" config; + installPhase = '' + runHook preInstall + cp -r ${finalAttrs.finalPackage} $out + chmod -R +w $out + cp $configFile $out/config.json + runHook postInstall + ''; + }; + + updateScript = nix-update-script { }; + }; + + meta = { + description = "Maintained fork of the admin console for (Matrix) Synapse homeservers, including additional features"; + homepage = "https://github.com/etkecc/synapse-admin"; + changelog = "https://github.com/etkecc/synapse-admin/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ defelo ]; + }; +}) From fbc136159e3fe64bb1560d858939596789d639bc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 09:57:03 +0000 Subject: [PATCH 38/75] snx-rs: 3.1.1 -> 3.1.2 --- pkgs/by-name/sn/snx-rs/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sn/snx-rs/package.nix b/pkgs/by-name/sn/snx-rs/package.nix index 69328f7b3d05..be931652bd21 100644 --- a/pkgs/by-name/sn/snx-rs/package.nix +++ b/pkgs/by-name/sn/snx-rs/package.nix @@ -18,13 +18,13 @@ }: rustPlatform.buildRustPackage rec { pname = "snx-rs"; - version = "3.1.1"; + version = "3.1.2"; src = fetchFromGitHub { owner = "ancwrd1"; repo = "snx-rs"; tag = "v${version}"; - hash = "sha256-eWtoCU5JkpHGcOLzjzj9icDlnIW1y+fiEn5V/E5IQ4U="; + hash = "sha256-bLuIXd2pqqiyEP+lDTJYVDZkRZ0HcDkKFZd/qlpuf98="; }; passthru.updateScript = nix-update-script { }; @@ -57,7 +57,7 @@ rustPlatform.buildRustPackage rec { ]; useFetchCargoVendor = true; - cargoHash = "sha256-Hjc2wKkNmlVjZb5wz9fq9hzUsxXJyeFYq+4C+weUlq0="; + cargoHash = "sha256-E5OJVf9CkLn5mFtk4Yacs2OIvAuIw0idSs7QuTNvfgU="; meta = { description = "Open source Linux client for Checkpoint VPN tunnels"; From 189e41631e71d207f28e6ea69885203fb11fea11 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 10:07:19 +0000 Subject: [PATCH 39/75] libretro-shaders-slang: 0-unstable-2025-03-13 -> 0-unstable-2025-04-14 --- pkgs/by-name/li/libretro-shaders-slang/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/li/libretro-shaders-slang/package.nix b/pkgs/by-name/li/libretro-shaders-slang/package.nix index adbc3ca89e7b..7546283c2732 100644 --- a/pkgs/by-name/li/libretro-shaders-slang/package.nix +++ b/pkgs/by-name/li/libretro-shaders-slang/package.nix @@ -7,13 +7,13 @@ stdenvNoCC.mkDerivation { pname = "libretro-shaders-slang"; - version = "0-unstable-2025-03-13"; + version = "0-unstable-2025-04-14"; src = fetchFromGitHub { owner = "libretro"; repo = "slang-shaders"; - rev = "25311dc03332d9ef2dff8d9d06c611d828028fac"; - hash = "sha256-nmDjjQgxpZcddOHlBAE9CKdR95u+6lEYXcmIwH9RHXo="; + rev = "cacb61c9a3022c84057331063e31304933b61bdf"; + hash = "sha256-dpqru8Qu1xZkHNKv6oF/T61/k6X2CWljUSVeJqxMvso="; }; dontConfigure = true; From 1d06a19f28ac4f5d3df4267a9404570751af604b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 10:30:21 +0000 Subject: [PATCH 40/75] misconfig-mapper: 1.13.7 -> 1.14.2 --- pkgs/by-name/mi/misconfig-mapper/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/mi/misconfig-mapper/package.nix b/pkgs/by-name/mi/misconfig-mapper/package.nix index 1bc25833f15a..fbd13a1002d8 100644 --- a/pkgs/by-name/mi/misconfig-mapper/package.nix +++ b/pkgs/by-name/mi/misconfig-mapper/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "misconfig-mapper"; - version = "1.13.7"; + version = "1.14.2"; src = fetchFromGitHub { owner = "intigriti"; repo = "misconfig-mapper"; tag = "v${version}"; - hash = "sha256-6WFtXIqnn2ayfXkGMIxGDlYpE3UbHRuAU8qHGk9SCU4="; + hash = "sha256-7ObDlO/jHUMJdEIFwsFrdSyrbs6I6koNJxQyH6FbhZc="; }; - vendorHash = "sha256-fEmf+d9oBXz7KymNVmC+CM7OyPD9QV1uN4ReTNhei7A="; + vendorHash = "sha256-gxURT2S1m7J3bZ0VIYxFFsbxU3za2BgJ/6TONoPGzAw="; ldflags = [ "-s" From 1cfcbd9a945560fd3f69d991e407cd316fd95ed7 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 16 Apr 2025 13:47:54 +0200 Subject: [PATCH 41/75] nixosTests.nextflow: migrate to runTestOn Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/nextflow.nix | 110 +++++++++++++++++++------------------- 2 files changed, 55 insertions(+), 57 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8e83095a7ded..2aef513d160e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -885,7 +885,7 @@ in # TODO: put in networking.nix after the test becomes more complete networkingProxy = handleTest ./networking-proxy.nix { }; nextcloud = handleTest ./nextcloud { }; - nextflow = handleTestOn [ "x86_64-linux" ] ./nextflow.nix { }; + nextflow = runTestOn [ "x86_64-linux" ] ./nextflow.nix; nextjs-ollama-llm-ui = runTest ./web-apps/nextjs-ollama-llm-ui.nix; nexus = handleTest ./nexus.nix { }; # TODO: Test nfsv3 + Kerberos diff --git a/nixos/tests/nextflow.nix b/nixos/tests/nextflow.nix index b4aad98483b9..62ce7d3ea571 100644 --- a/nixos/tests/nextflow.nix +++ b/nixos/tests/nextflow.nix @@ -1,60 +1,58 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - let - bash = pkgs.dockerTools.pullImage { - imageName = "quay.io/nextflow/bash"; - imageDigest = "sha256:bea0e244b7c5367b2b0de687e7d28f692013aa18970941c7dd184450125163ac"; - sha256 = "161s9f24njjx87qrwq0c9nmnwvyc6iblcxka7hirw78lm7i9x4w5"; - finalImageName = "quay.io/nextflow/bash"; - }; +{ pkgs, ... }: +let + bash = pkgs.dockerTools.pullImage { + imageName = "quay.io/nextflow/bash"; + imageDigest = "sha256:bea0e244b7c5367b2b0de687e7d28f692013aa18970941c7dd184450125163ac"; + sha256 = "161s9f24njjx87qrwq0c9nmnwvyc6iblcxka7hirw78lm7i9x4w5"; + finalImageName = "quay.io/nextflow/bash"; + }; - hello = pkgs.stdenv.mkDerivation { - name = "nextflow-hello"; - src = pkgs.fetchFromGitHub { - owner = "nextflow-io"; - repo = "hello"; - rev = "afff16a9b45c8e8a4f5a3743780ac13a541762f8"; - hash = "sha256-c8FirHc+J5Y439g0BdHxRtXVrOAzIrGEKA0m1mp9b/U="; + hello = pkgs.stdenv.mkDerivation { + name = "nextflow-hello"; + src = pkgs.fetchFromGitHub { + owner = "nextflow-io"; + repo = "hello"; + rev = "afff16a9b45c8e8a4f5a3743780ac13a541762f8"; + hash = "sha256-c8FirHc+J5Y439g0BdHxRtXVrOAzIrGEKA0m1mp9b/U="; + }; + installPhase = '' + cp -r $src $out + ''; + }; + run-nextflow-pipeline = pkgs.writeShellApplication { + name = "run-nextflow-pipeline"; + runtimeInputs = [ pkgs.nextflow ]; + text = '' + export NXF_OFFLINE=true + for b in false true; do + echo "docker.enabled = $b" > nextflow.config + cat nextflow.config + nextflow run -ansi-log false ${hello} + done + ''; + }; +in +{ + name = "nextflow"; + + nodes.machine = + { ... }: + { + environment.systemPackages = [ + run-nextflow-pipeline + pkgs.nextflow + ]; + virtualisation = { + docker.enable = true; }; - installPhase = '' - cp -r $src $out - ''; }; - run-nextflow-pipeline = pkgs.writeShellApplication { - name = "run-nextflow-pipeline"; - runtimeInputs = [ pkgs.nextflow ]; - text = '' - export NXF_OFFLINE=true - for b in false true; do - echo "docker.enabled = $b" > nextflow.config - cat nextflow.config - nextflow run -ansi-log false ${hello} - done - ''; - }; - in - { - name = "nextflow"; - nodes.machine = - { ... }: - { - environment.systemPackages = [ - run-nextflow-pipeline - pkgs.nextflow - ]; - virtualisation = { - docker.enable = true; - }; - }; - - testScript = - { nodes, ... }: - '' - start_all() - machine.wait_for_unit("docker.service") - machine.succeed("docker load < ${bash}") - machine.succeed("run-nextflow-pipeline >&2") - ''; - } -) + testScript = + { nodes, ... }: + '' + start_all() + machine.wait_for_unit("docker.service") + machine.succeed("docker load < ${bash}") + machine.succeed("run-nextflow-pipeline >&2") + ''; +} From 1f4d59c406a77974d828455869e6e266a8c12631 Mon Sep 17 00:00:00 2001 From: April John Date: Wed, 16 Apr 2025 14:26:17 +0200 Subject: [PATCH 42/75] yelp: fix for CVE-2025-3155 --- pkgs/by-name/ye/yelp/cve-2025-3155.patch | 101 +++++++++++++++++++++++ pkgs/by-name/ye/yelp/package.nix | 4 + 2 files changed, 105 insertions(+) create mode 100644 pkgs/by-name/ye/yelp/cve-2025-3155.patch diff --git a/pkgs/by-name/ye/yelp/cve-2025-3155.patch b/pkgs/by-name/ye/yelp/cve-2025-3155.patch new file mode 100644 index 000000000000..3cdcfaeef332 --- /dev/null +++ b/pkgs/by-name/ye/yelp/cve-2025-3155.patch @@ -0,0 +1,101 @@ +diff --git a/data/xslt/mal2html.xsl.in b/data/xslt/mal2html.xsl.in +index 9e44b734..0a74da55 100644 +--- a/data/xslt/mal2html.xsl.in ++++ b/data/xslt/mal2html.xsl.in +@@ -19,6 +19,11 @@ + + + ++ ++ ++ ++ ++ + + + +diff --git a/data/xslt/man2html.xsl.in b/data/xslt/man2html.xsl.in +index 676ce3eb..56bc1f5c 100644 +--- a/data/xslt/man2html.xsl.in ++++ b/data/xslt/man2html.xsl.in +@@ -131,7 +131,7 @@ + the correct styling and a single character which we measure the + width of and update each sheet as required. + --> +-