From 48d6c3310aabaee019107634b6460d2c5501a931 Mon Sep 17 00:00:00 2001 From: sempiternal-aurora <78790545+sempiternal-aurora@users.noreply.github.com> Date: Tue, 20 Jan 2026 00:20:09 +0800 Subject: [PATCH] isabelle: fix permission of copied files some files are copied from the nix store and may not be writeable, so set them writeable on copy --- pkgs/by-name/is/isabelle/fix-copied-permissions.patch | 10 ++++++++++ pkgs/by-name/is/isabelle/package.nix | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/by-name/is/isabelle/fix-copied-permissions.patch diff --git a/pkgs/by-name/is/isabelle/fix-copied-permissions.patch b/pkgs/by-name/is/isabelle/fix-copied-permissions.patch new file mode 100644 index 000000000000..5bfbd583ac34 --- /dev/null +++ b/pkgs/by-name/is/isabelle/fix-copied-permissions.patch @@ -0,0 +1,10 @@ +--- a/src/Pure/System/isabelle_system.scala ++++ b/src/Pure/System/isabelle_system.scala +@@ -214,6 +214,7 @@ object Isabelle_System { + Files.copy(src.toPath, target.toPath, + StandardCopyOption.COPY_ATTRIBUTES, + StandardCopyOption.REPLACE_EXISTING) ++ target.setWritable(true) + } + catch { + case ERROR(msg) => diff --git a/pkgs/by-name/is/isabelle/package.nix b/pkgs/by-name/is/isabelle/package.nix index 1a4fef548cc9..2348d50d9bdf 100644 --- a/pkgs/by-name/is/isabelle/package.nix +++ b/pkgs/by-name/is/isabelle/package.nix @@ -119,6 +119,12 @@ stdenv.mkDerivation (finalAttrs: { net-tools ]; + patches = [ + # Make "isabelle build" work when generating documents + # See: https://github.com/NixOS/nixpkgs/issues/289529 + ./fix-copied-permissions.patch + ]; + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ procps ]; sourceRoot = "${finalAttrs.dirname}${lib.optionalString stdenv.hostPlatform.isDarwin ".app"}";