diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-24 08:41:25 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-24 08:41:25 -0500 |
commit | f51a7ddd11f8a496460056fd5e929af00b5fb6a4 (patch) | |
tree | 1edfdf0e1687ee7094c597f1045538ea62fae966 /pkgs/tools/system/gptfdisk | |
parent | c2911034c32c25e3588f5fdfd9b1a3097076aacb (diff) | |
download | nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar.gz nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar.bz2 nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar.lz nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar.xz nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.tar.zst nixpkgs-f51a7ddd11f8a496460056fd5e929af00b5fb6a4.zip |
gptfdisk: Fix cross-compilation
Diffstat (limited to 'pkgs/tools/system/gptfdisk')
-rw-r--r-- | pkgs/tools/system/gptfdisk/cross-makefile.patch | 20 | ||||
-rw-r--r-- | pkgs/tools/system/gptfdisk/default.nix | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/tools/system/gptfdisk/cross-makefile.patch b/pkgs/tools/system/gptfdisk/cross-makefile.patch new file mode 100644 index 00000000000..0b87de0a17a --- /dev/null +++ b/pkgs/tools/system/gptfdisk/cross-makefile.patch @@ -0,0 +1,20 @@ +commit a5381e8aaa67647a4ba0fb41b951125ae309b078 +Author: Shea Levy <shea@shealevy.com> +Date: Sat Feb 24 08:35:54 2018 -0500 + + Makefile: Don't hard-code CC and CXX. + + These variables should be provided by the Make implementation and the + build environment. In particular, this fixes cross-compilation of + gptfdisk. + +diff --git a/Makefile b/Makefile +index a3576b3..d76fab4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,3 @@ +-CC=gcc +-CXX=g++ + CFLAGS+=-D_FILE_OFFSET_BITS=64 + #CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 + CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index f9fba2dde91..4d7bcc36566 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -10,8 +10,10 @@ stdenv.mkDerivation rec { url = "mirror://sourceforge/gptfdisk/${name}.tar.gz"; sha256 = "0p0vr67lnqdsgdv2y144xmjqa1a2nijrrd3clc8dc2f46pn5mzc9"; }; + # https://sourceforge.net/p/gptfdisk/code/merge-requests/9/ + patches = [ ./cross-makefile.patch ]; - patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile.mac --replace \ "-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6" substituteInPlace Makefile.mac --replace \ |