Merge pull request #222514 from viraptor/gptfdisk

gptfdisk: fix darwin build
This commit is contained in:
Weijia Wang 2023-03-22 19:19:00 +02:00 committed by GitHub
commit eed3be2c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,10 +30,14 @@ stdenv.mkDerivation rec {
"-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6"
substituteInPlace Makefile.mac --replace \
" -arch i386" ""
substituteInPlace Makefile.mac --replace \
"-arch x86_64" ""
substituteInPlace Makefile.mac --replace \
"-arch arm64" ""
substituteInPlace Makefile.mac --replace \
" -I/opt/local/include -I /usr/local/include -I/opt/local/include" ""
substituteInPlace Makefile.mac --replace \
"/opt/local/lib/libncurses.a" "${ncurses.out}/lib/libncurses.dylib"
"/usr/local/Cellar/ncurses/6.2/lib/libncurses.dylib" "${ncurses.out}/lib/libncurses.dylib"
'';
buildPhase = lib.optionalString stdenv.isDarwin "make -f Makefile.mac";
@ -54,7 +58,6 @@ stdenv.mkDerivation rec {
};
meta = with lib; {
broken = stdenv.isDarwin;
description = "Set of text-mode partitioning tools for Globally Unique Identifier (GUID) Partition Table (GPT) disks";
license = licenses.gpl2;
homepage = "https://www.rodsbooks.com/gdisk/";