Revert "Revert "Explicitly pass -pthread flag to fix the build after some updates""

This reverts commit 6cfea50ad1.

I think the reason for the revert was because of patch dependencies. We really
need this patch to fix heimdal build.

Or else:

  $ nix-build -A heimdal
  ...
  /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_getspecific'
  /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_key_create'
  /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_setspecific'
  collect2: error: ld returned 1 exit status
  Makefile:509: recipe for target 'tc' failed
  make[2]: *** [tc] Error 1
This commit is contained in:
Bjørn Forsman 2015-06-06 09:21:21 +02:00
parent 7e04b7319c
commit 52184b53c0

View file

@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
"--without-x"
];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -pthread"
'';
# We need to build hcrypt for applications like samba
postBuild = ''
(cd lib/hcrypto; make)