Commit 3e04410c authored by Alyssa Ross's avatar Alyssa Ross Committed by Bjørn Forsman
Browse files

pkgsMusl.cdrkit: fix build

These are the same tricks that Alpine uses.
parent 188b935b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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