f52263ced0
We can use use `stdenv.hostPlatform.isStatic` instead, and move the logic per package. The least opionated benefit of this is that it makes it much easier to replace packages with modified ones, as there is no longer any issue of overlay order. CC @FRidh @matthewbauer
16 lines
395 B
Nix
16 lines
395 B
Nix
{ stdenv, version, fetch, cmake, fetchpatch
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libunwind";
|
|
inherit version;
|
|
|
|
src = fetch pname "0bwjd2xf51r2apn8p0f9shb6nc8hnqzq1n9gggjvyjmi6cf02mc4";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
|
|
}
|