From 8736cb35d8cd94bc1af2bbc15d0bfbb19e230f97 Mon Sep 17 00:00:00 2001 From: Alexander Sergeev Date: Tue, 3 Nov 2026 15:19:50 +0300 Subject: [PATCH 1/2] doublecmd: 1.2.9 -> 1.2.11 Assisted-by: Copilot SDK in VS Code (GPT-6 Luna) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkgs/by-name/do/doublecmd/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/do/doublecmd/package.nix b/pkgs/by-name/do/doublecmd/package.nix index a9f36abbb117..24e91adb3667 100644 --- a/pkgs/by-name/do/doublecmd/package.nix +++ b/pkgs/by-name/do/doublecmd/package.nix @@ -19,13 +19,13 @@ in stdenv.mkDerivation (finalAttrs: { pname = "doublecmd"; - version = "1.2.9"; + version = "1.2.11"; src = fetchFromGitHub { owner = "doublecmd"; repo = "doublecmd"; tag = "v${finalAttrs.version}"; - hash = "sha256-UuwE4ptOdrh00Rec7CjPPJoA9Qo4S19GwSbLNQn+Uac="; + hash = "sha256-pl/0YmZxPZfb+nubzig9DmyGonvnitVPr5f4n8ll3Bs="; }; nativeBuildInputs = [ From 72379b53fab01ca850f8179c4ff72e4df533c06c Mon Sep 17 00:00:00 2001 From: Alexander Sergeev Date: Tue, 3 Nov 2026 15:05:07 +0300 Subject: [PATCH 2/2] doublecmd: add aarch64-darwin build Assisted-by: Copilot SDK in VS Code (GPT-6 Luna) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkgs/by-name/do/doublecmd/package.nix | 49 +++++++++++++++++++-------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/do/doublecmd/package.nix b/pkgs/by-name/do/doublecmd/package.nix index 24e91adb3667..ce8398cfac85 100644 --- a/pkgs/by-name/do/doublecmd/package.nix +++ b/pkgs/by-name/do/doublecmd/package.nix @@ -15,6 +15,7 @@ let lua = lua5_5; + widgetset = if stdenv.hostPlatform.isDarwin then "cocoa" else "qt5"; in stdenv.mkDerivation (finalAttrs: { @@ -32,24 +33,29 @@ stdenv.mkDerivation (finalAttrs: { fpc getopt lazarus - libsForQt5.wrapQtAppsHook writableTmpDirAsHomeHook - ]; + ] + ++ lib.optional (!stdenv.hostPlatform.isDarwin) libsForQt5.wrapQtAppsHook; buildInputs = [ dbus glib libx11 - libsForQt5.libqtpas - ]; + ] + ++ lib.optional (!stdenv.hostPlatform.isDarwin) libsForQt5.libqtpas; - env.NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath finalAttrs.buildInputs}"; + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "--as-needed -rpath ${lib.makeLibraryPath finalAttrs.buildInputs}"; postPatch = '' # Double Commander saves this default into the user's configuration, so use # the symlink installed next to the executable instead of a store path. substituteInPlace src/platform/lua.pas \ --replace-fail "LuaDLL = 'liblua5.1.so.0';" "LuaDLL = '%COMMANDER_PATH%/liblua.so';" + ${lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace src/platform/lua.pas \ + --replace-fail "LuaDLL = 'liblua5.1.dylib';" "LuaDLL = '%COMMANDER_PATH%/liblua.dylib';" + patchShebangs install/darwin/install.sh + ''} patchShebangs build.sh install/linux/install.sh substituteInPlace build.sh \ --replace-warn '$(which lazbuild)' '"${lazarus}/bin/lazbuild --lazarusdir=${lazarus}/share/lazarus"' @@ -60,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { buildPhase = '' runHook preBuild - ./build.sh release qt5 + ./build.sh release ${widgetset} runHook postBuild ''; @@ -68,14 +74,27 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - install/linux/install.sh -I $out - - cd $out/lib64/doublecmd - - ln -vs ${lib.getLib lua}/lib/liblua.so.${lua.version} - - ln -vs ./liblua.so.${lua.version} ./liblua.so - ln -vs ./liblua.so.${lua.version} ./liblua.so.${lib.versions.majorMinor lua.version} + ${ + if stdenv.hostPlatform.isDarwin then + '' + rm -f doublecmd.app/Contents/MacOS/doublecmd + install/darwin/install.sh "$TMPDIR" + mkdir -p $out/Applications + mv "$TMPDIR/doublecmd.app" $out/Applications/ + cd $out/Applications/doublecmd.app/Contents/MacOS + ln -vs ${lib.getLib lua}/lib/liblua.${lua.version}.dylib ./liblua.dylib + mkdir -p $out/bin + ln -s $out/Applications/doublecmd.app/Contents/MacOS/doublecmd $out/bin/doublecmd + '' + else + '' + install/linux/install.sh -I $out + cd $out/lib64/doublecmd + ln -vs ${lib.getLib lua}/lib/liblua.so.${lua.version} + ln -vs ./liblua.so.${lua.version} ./liblua.so + ln -vs ./liblua.so.${lua.version} ./liblua.so.${lib.versions.majorMinor lua.version} + '' + } runHook postInstall ''; @@ -86,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl2Plus; mainProgram = "doublecmd"; maintainers = [ ]; - platforms = lib.platforms.linux; + platforms = lib.platforms.linux ++ lib.platforms.darwin; }; }) # TODO: deal with other platforms too