diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index 871d309d530..436aec4c552 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { }; patches = [ + # issues with popt 1.19 (from upstream but not yet released): + # https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/ + # https://github.com/rpm-software-management/popt/issues/80 + ./popt-1-19.patch + # fix UUID generation (from upstream but not yet released): # https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f/ # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1853985.html diff --git a/pkgs/tools/system/gptfdisk/popt-1-19.patch b/pkgs/tools/system/gptfdisk/popt-1-19.patch new file mode 100644 index 00000000000..ae971362cdd --- /dev/null +++ b/pkgs/tools/system/gptfdisk/popt-1-19.patch @@ -0,0 +1,13 @@ +diff --git a/gptcl.cc b/gptcl.cc +index 34c9421..0d578eb 100644 +--- a/gptcl.cc ++++ b/gptcl.cc +@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { + } // while + + // Assume first non-option argument is the device filename.... +- device = (char*) poptGetArg(poptCon); ++ device = strdup((char*) poptGetArg(poptCon)); + poptResetContext(poptCon); + + if (device != NULL) {