Merge pull request #218520 from amjoseph-nixpkgs/pr/librem/cross
librem: use cmake for configurePhase
This commit is contained in:
commit
c2354a6878
2 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, zlib, openssl }:
|
{ lib, stdenv, fetchFromGitHub, zlib, openssl
|
||||||
|
, cmake }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.9.0";
|
version = "2.9.0";
|
||||||
pname = "libre";
|
pname = "libre";
|
||||||
|
@ -9,6 +11,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA=";
|
sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA=";
|
||||||
};
|
};
|
||||||
buildInputs = [ zlib openssl ];
|
buildInputs = [ zlib openssl ];
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
|
makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
|
||||||
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
|
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
|
||||||
++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
|
++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre }:
|
{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre
|
||||||
|
, cmake }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.10.0";
|
version = "2.10.0";
|
||||||
pname = "librem";
|
pname = "librem";
|
||||||
|
@ -8,10 +10,13 @@ stdenv.mkDerivation rec {
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-wyzpx0WjQLA8UKx4S6QOETMehf51Af5napZsxMXttmM=";
|
sha256 = "sha256-wyzpx0WjQLA8UKx4S6QOETMehf51Af5napZsxMXttmM=";
|
||||||
};
|
};
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ zlib openssl libre ];
|
buildInputs = [ zlib openssl libre ];
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DRE_INCLUDE_DIR=${libre}/include/re"
|
||||||
|
];
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"LIBRE_MK=${libre}/share/re/re.mk"
|
"LIBRE_MK=${libre}/share/re/re.mk"
|
||||||
"LIBRE_INC=${libre}/include/re"
|
|
||||||
"PREFIX=$(out)"
|
"PREFIX=$(out)"
|
||||||
]
|
]
|
||||||
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${lib.getDev stdenv.cc.cc}"
|
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${lib.getDev stdenv.cc.cc}"
|
||||||
|
|
Loading…
Reference in a new issue