diff --git a/pkgs/by-name/pa/parted/package.nix b/pkgs/by-name/pa/parted/package.nix index 4fc1615665e3..f01ce55da3bd 100644 --- a/pkgs/by-name/pa/parted/package.nix +++ b/pkgs/by-name/pa/parted/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, lvm2, libuuid, gettext, @@ -24,6 +25,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-O0Pb4zzKD5oYYB66tWt4UrEo7Bo986mzDM3l5zNZ5hI="; }; + patches = [ + # Fix the build against C23 compilers (like gcc-15): + (fetchpatch { + name = "c23.patch"; + url = "https://git.savannah.gnu.org/gitweb/?p=parted.git;a=patch;h=16343bda6ce0d41edf43f8dac368db3bbb63d271"; + hash = "sha256-8FgnwMrzMHPZNU+b/mRHCSu8sn6H7GhVLIhMUel40Hk="; + }) + ]; + outputs = [ "out" "dev" @@ -46,6 +56,8 @@ stdenv.mkDerivation rec { ++ lib.optional (lvm2 == null) "--disable-device-mapper" ++ lib.optional enableStatic "--enable-static"; + enableParallelBuilding = true; + # Tests were previously failing due to Hydra running builds as uid 0. # That should hopefully be fixed now. doCheck = !stdenv.hostPlatform.isMusl; # translation test