mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
pkgsStatic.libredirect: print error message why it won't work
The whole point of libredirect is manipulation with LD_PRELOAD, which is not supposed to work on static builds.
This commit is contained in:
parent
9a7742d548
commit
17577f6b54
|
@ -1,6 +1,22 @@
|
|||
{ stdenv, lib, coreutils }:
|
||||
{ stdenv, runCommand, lib, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
if stdenv.hostPlatform.isStatic
|
||||
then throw ''
|
||||
libredirect is not available on static builds.
|
||||
|
||||
Please fix your derivation to not depend on libredirect on static
|
||||
builds, using something like following:
|
||||
|
||||
nativeBuildInputs =
|
||||
lib.optional (!stdenv.buildPlatform.isStatic) libredirect;
|
||||
|
||||
and disable tests as necessary, although fixing tests to work without
|
||||
libredirect is even better.
|
||||
|
||||
libredirect uses LD_PRELOAD feature of dynamic loader and does not
|
||||
work on static builds where dynamic loader is not used.
|
||||
''
|
||||
else stdenv.mkDerivation rec {
|
||||
pname = "libredirect";
|
||||
version = "0";
|
||||
|
||||
|
|
Loading…
Reference in a new issue