From 3e04410ced5c98a12cfcba179b0854fff99f2813 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 2 Dec 2022 10:21:44 +0000 Subject: [PATCH] pkgsMusl.cdrkit: fix build These are the same tricks that Alpine uses. --- pkgs/tools/cd-dvd/cdrkit/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/cd-dvd/cdrkit/default.nix b/pkgs/tools/cd-dvd/cdrkit/default.nix index e28d4f8b9c7e..6f9c7a656d1b 100644 --- a/pkgs/tools/cd-dvd/cdrkit/default.nix +++ b/pkgs/tools/cd-dvd/cdrkit/default.nix @@ -13,10 +13,16 @@ stdenv.mkDerivation rec { buildInputs = [ libcap zlib bzip2 perl ]; hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isMusl "-D__THROW="; # efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244 patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ]; + preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace include/xconfig.h.in \ + --replace "#define HAVE_RCMD 1" "#undef HAVE_RCMD" + ''; + postInstall = '' # file name compatibility with the old cdrecord (growisofs wants this name) ln -s $out/bin/genisoimage $out/bin/mkisofs