diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-05-08 09:39:51 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-05-08 09:39:51 +0100 |
commit | 83cfaa762b1881ba4b190f799af9d3f2c4e81641 (patch) | |
tree | ebf9e4b61d6ec198d31a575e9e6fe61dc85277d6 | |
parent | 60480a51d566582d69425a168b3982e0477c322d (diff) |
ncrack: pull upstream fix for fno-common toolchains
Without the change build on -fno-common toolchains like upstream gcc-10 fails as: $ nix build -L --impure --expr 'with import ./. {}; ncrack.overrideAttrs (oa: { NIX_CFLAGS_COMPILE = (oa.NIX_CFLAGS_COMPILE or "") + "-fno-common"; })' ... ld: opensshlib/libopenssh.a(umac128.o):/build/source/opensshlib/umac.c:1184: multiple definition of `umac_ctx'; opensshlib/libopenssh.a(umac.o):/build/source/opensshlib/umac.c:1184: first defined here
-rw-r--r-- | pkgs/tools/security/ncrack/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/security/ncrack/default.nix b/pkgs/tools/security/ncrack/default.nix index e1504eb12b4cc..9e9aeaa409d42 100644 --- a/pkgs/tools/security/ncrack/default.nix +++ b/pkgs/tools/security/ncrack/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, openssl, zlib }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, openssl, zlib }: stdenv.mkDerivation rec { pname = "ncrack"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "1gnv5xdd7n04glcpy7q1mkb6f8gdhdrhlrh8z6k4g2pjdhxlz26g"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains like upstream gcc-10: + # https://github.com/nmap/ncrack/pull/83 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/nmap/ncrack/commit/cc4103267bab6017a4da9d41156d0c1075012eba.patch"; + sha256 = "06nlfvc7p108f8ppbcgwmj4iwmjy95xhc1sawa8c78lrx22r7gy3"; + }) + ]; + buildInputs = [ openssl zlib ]; meta = with lib; { |