thc-hydra: fix build on darwin
stdenv-darwin's `ld` doesn;t support --allow-multiple-definition, so it has to be patched out to build
This commit is contained in:
parent
7eb3c0f557
commit
65b18a28c0
2 changed files with 18 additions and 1 deletions
13
pkgs/tools/security/thc-hydra/darwin-remove-ldflag.patch
Normal file
13
pkgs/tools/security/thc-hydra/darwin-remove-ldflag.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 1c915f1..83a8e41 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -4,7 +4,7 @@
|
||||
WARN_CLANG=-Wformat-nonliteral -Wstrncat-size -Wformat-security -Wsign-conversion -Wconversion -Wfloat-conversion -Wshorten-64-to-32 -Wuninitialized -Wmissing-variable-declarations -Wmissing-declarations
|
||||
WARN_GCC=-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-truncation=2 -Wnull-dereference -Wstrict-overflow=2 -Wstringop-overflow=4 -Walloca-larger-than=4096 -Wtype-limits -Wconversion -Wtrampolines -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fno-common -Wcast-align
|
||||
CFLAGS ?= -g
|
||||
-OPTS=-I. -O3 $(CFLAGS) -fcommon -Wl,--allow-multiple-definition
|
||||
+OPTS=-I. -O3 $(CFLAGS) -fcommon
|
||||
# -Wall -g -pedantic
|
||||
LIBS=-lm
|
||||
DESTDIR ?=
|
|
@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-V9rr5fbJWm0pa+Kp8g95XvLPo/uWcDwyU2goImnIq58=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
./darwin-remove-ldflag.patch
|
||||
];
|
||||
|
||||
postPatch = let
|
||||
makeDirs = output: subDir: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) buildInputs);
|
||||
in ''
|
||||
|
@ -43,6 +47,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = "https://www.thc.org/thc-hydra/";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ offline ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue