x264: fix static build

This commit is contained in:
Orivej Desh 2021-04-08 05:59:56 +00:00
parent 90691042af
commit 394315def1

View file

@ -1,4 +1,6 @@
{ stdenv, lib, fetchurl, nasm }:
{ stdenv, lib, fetchurl, nasm
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "x264";
@ -28,7 +30,7 @@ stdenv.mkDerivation rec {
export AS=$CC
'';
configureFlags = [ "--enable-shared" ]
configureFlags = lib.optional enableShared [ "--enable-shared" ]
++ lib.optional (!stdenv.isi686) "--enable-pic"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";