@@ -1,6 +1,22 @@
1−{ stdenv, lib, coreutils }:
1+{ stdenv, runCommand, lib, coreutils }:
22
3−stdenv.mkDerivation rec {
3+if stdenv.hostPlatform.isStatic
4+then throw ''
5+ libredirect is not available on static builds.
6+
7+ Please fix your derivation to not depend on libredirect on static
8+ builds, using something like following:
9+
10+ nativeBuildInputs =
11+ lib.optional (!stdenv.buildPlatform.isStatic) libredirect;
12+
13+ and disable tests as necessary, although fixing tests to work without
14+ libredirect is even better.
15+
16+ libredirect uses LD_PRELOAD feature of dynamic loader and does not
17+ work on static builds where dynamic loader is not used.
18+ ''
19+else stdenv.mkDerivation rec {
420 pname = "libredirect";
521 version = "0";
622