From a8c0eab3d02cb86fd08a64ba202d90fc53a3a318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Jourdois?= Date: Sat, 31 Oct 2015 21:26:10 +0100 Subject: [PATCH] gptfdisk: darwin fixes --- pkgs/tools/system/gptfdisk/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index 00cb6f8dd0c..9306b0e84cc 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -11,6 +11,18 @@ stdenv.mkDerivation rec { sha256 = "1izazbyv5n2d81qdym77i8mg9m870hiydmq4d0s51npx5vp8lk46"; }; + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile.mac --replace \ + "-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6" + substituteInPlace Makefile.mac --replace \ + " -arch i386" "" + 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}/lib/libncurses.dylib" + ''; + + buildPhase = stdenv.lib.optionalString stdenv.isDarwin "make -f Makefile.mac"; buildInputs = [ libuuid popt icu ncurses ]; installPhase = '' @@ -29,6 +41,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2; homepage = http://www.rodsbooks.com/gdisk/; maintainers = with maintainers; [ nckx ]; - platforms = platforms.linux; + platforms = platforms.all; }; }