Merge pull request #218520 from amjoseph-nixpkgs/pr/librem/cross

librem: use cmake for configurePhase
This commit is contained in:
7c6f434c 2023-03-06 20:25:56 +00:00 committed by GitHub
commit c2354a6878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,6 @@
{ lib, stdenv, fetchFromGitHub, zlib, openssl }:
{ lib, stdenv, fetchFromGitHub, zlib, openssl
, cmake }:
stdenv.mkDerivation rec {
version = "2.9.0";
pname = "libre";
@ -9,6 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA=";
};
buildInputs = [ zlib openssl ];
nativeBuildInputs = [ cmake ];
makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"

View file

@ -1,4 +1,6 @@
{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre }:
{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre
, cmake }:
stdenv.mkDerivation rec {
version = "2.10.0";
pname = "librem";
@ -8,10 +10,13 @@ stdenv.mkDerivation rec {
rev = "v${version}";
sha256 = "sha256-wyzpx0WjQLA8UKx4S6QOETMehf51Af5napZsxMXttmM=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib openssl libre ];
cmakeFlags = [
"-DRE_INCLUDE_DIR=${libre}/include/re"
];
makeFlags = [
"LIBRE_MK=${libre}/share/re/re.mk"
"LIBRE_INC=${libre}/include/re"
"PREFIX=$(out)"
]
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${lib.getDev stdenv.cc.cc}"