drawio: 26.1.1 -> 29.0.3, move to by-name, modernize (#464002)

This commit is contained in:
Austin Horstman
2025-11-24 14:23:53 +00:00
committed by GitHub
3 changed files with 15 additions and 19 deletions
@@ -30,14 +30,14 @@ writeTextFile {
XDG_CONFIG_HOME="$tmpdir" ${xvfb-run}/bin/xvfb-run --auto-display ${drawio}/bin/drawio $@
'';
meta = with lib; {
meta = {
description = "xvfb wrapper around drawio";
longDescription = ''
A wrapper around drawio (draw.io) for running in headless environments.
Runs drawio under xvfb-run, with configuration going to a temporary
directory.
'';
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
qyliss
tfc
];
@@ -7,32 +7,33 @@
copyDesktopItems,
fixup-yarn-lock,
makeWrapper,
autoSignDarwinBinariesHook,
darwin,
nodejs,
yarn,
electron,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "drawio";
version = "26.1.1";
version = "29.0.3";
src = fetchFromGitHub {
owner = "jgraph";
repo = "drawio-desktop";
rev = "v${version}";
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-h9APkOtH7s31r89hqqH12zYqkVMrR2ZxMyc+Zwq21+A=";
hash = "sha256-YVkGt096Vy1s/ZjvuWUWVE2eiaI7Wg/YdWSueTsKzEg=";
};
# `@electron/fuses` tries to run `codesign` and fails. Disable and use autoSignDarwinBinariesHook instead
postPatch = ''
sed -i -e 's/resetAdHocDarwinSignature:.*/resetAdHocDarwinSignature: false,/' build/fuses.cjs
substituteInPlace ./build/fuses.cjs \
--replace-fail "resetAdHocDarwinSignature:" "// resetAdHocDarwinSignature:"
'';
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-kmA0z/vmWH+yD2OQ6VVSE0yPxInTAGjjG+QfcoZHlQ0=";
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-/CzHvGUKhB2RBaz+LVXaHr5q6KLkQR0asFZRruOUmqU=";
};
nativeBuildInputs = [
@@ -45,7 +46,7 @@ stdenv.mkDerivation rec {
copyDesktopItems
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
autoSignDarwinBinariesHook
darwin.autoSignDarwinBinariesHook
];
ELECTRON_SKIP_BINARY_DOWNLOAD = true;
@@ -77,7 +78,7 @@ stdenv.mkDerivation rec {
''
+ ''
yarn --offline run electron-builder --dir \
${lib.optionalString stdenv.hostPlatform.isDarwin "--config electron-builder-linux-mac.json"} \
${lib.optionalString stdenv.hostPlatform.isDarwin "--config electron-builder-linux-mac.json --config.mac.identity=null"} \
-c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \
-c.electronVersion=${electron.version}
@@ -137,9 +138,9 @@ stdenv.mkDerivation rec {
# The minified code authored by us in this repo is licensed under an Apache v2 license, but the sources to build those files are not in this repo. This is not an open source project.
unfreeRedistributable
];
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${version}";
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${finalAttrs.version}";
maintainers = with lib.maintainers; [ darkonion0 ];
platforms = lib.platforms.darwin ++ lib.platforms.linux;
mainProgram = "drawio";
};
}
})
-5
View File
@@ -10801,11 +10801,6 @@ with pkgs;
docker-compose = callPackage ../applications/virtualization/docker/compose.nix { };
docker-sbom = callPackage ../applications/virtualization/docker/sbom.nix { };
drawio = callPackage ../applications/graphics/drawio {
inherit (darwin) autoSignDarwinBinariesHook;
};
drawio-headless = callPackage ../applications/graphics/drawio/headless.nix { };
drawpile-server-headless = drawpile.override {
buildClient = false;
buildServerGui = false;