From 8399907be3c008b6e12863364d6f7848f52034b1 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 13 May 2022 10:33:14 -0500 Subject: [PATCH] octave: add patch for octave incorrectly failing on package builds Patch comes from https://savannah.gnu.org/bugs/?func=detailitem&item_id=62436 --- .../interpreters/octave/default.nix | 5 ++++ .../octave/patches/bug62436.patch | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/interpreters/octave/patches/bug62436.patch diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 2fcdab95509e..ab2b6af9d5f9 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -119,6 +119,11 @@ let sha256 = "sha256-1KnYHz9ntKbgfLeoDcsQrV6RdvzDB2LHCoFYCmS4sLY="; }; + patches = [ + # https://savannah.gnu.org/bugs/?func=detailitem&item_id=62436 + ./patches/bug62436.patch + ]; + buildInputs = [ readline ncurses diff --git a/pkgs/development/interpreters/octave/patches/bug62436.patch b/pkgs/development/interpreters/octave/patches/bug62436.patch new file mode 100644 index 000000000000..d9d7cfc30408 --- /dev/null +++ b/pkgs/development/interpreters/octave/patches/bug62436.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User John Donoghue +# Date 1652358904 14400 +# Thu May 12 08:35:04 2022 -0400 +# Branch stable +# Node ID 8c940cfcce257369677c09154da2aab2c56eaa79 +# Parent 63710f3bd9811c2d206ac9e7b4f47cf06c47e153 +* scripts/pkg/private/build.m: check configure and Makefile exist before trying to unlink them (Bug #62436) + +diff -r 63710f3bd981 -r 8c940cfcce25 scripts/pkg/private/build.m +--- a/scripts/pkg/private/build.m Wed May 11 09:44:55 2022 -0700 ++++ b/scripts/pkg/private/build.m Thu May 12 08:35:04 2022 -0400 +@@ -77,8 +77,12 @@ + else + arch_abi = getarch (); + configure_make (desc, build_root, verbose); +- unlink (fullfile (build_root, "src", "configure")); +- unlink (fullfile (build_root, "src", "Makefile")); ++ if exist (fullfile (build_root, "src", "configure"), "file") ++ unlink (fullfile (build_root, "src", "configure")); ++ endif ++ if exist (fullfile (build_root, "src", "Makefile"), "file") ++ unlink (fullfile (build_root, "src", "Makefile")); ++ endif + endif + tar_name = [desc.name "-" desc.version "-" arch_abi ".tar"]; + tar_path = fullfile (builddir, tar_name);