Merge pull request #170126 from Mindavi/upower/cross

upower: fix cross-compilation support
This commit is contained in:
Jan Tojnar 2022-04-26 13:09:07 +02:00 committed by GitHub
commit d0468e9521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,13 +18,15 @@
, systemd
, useIMobileDevice ? true
, libimobiledevice
, withDocs ? (stdenv.buildPlatform == stdenv.hostPlatform)
}:
stdenv.mkDerivation rec {
pname = "upower";
version = "0.99.17";
outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ]
++ lib.optionals withDocs [ "devdoc" ];
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
@ -34,6 +36,12 @@ stdenv.mkDerivation rec {
sha256 = "xvvqzGxgkuGcvnO12jnLURNJUoSlnMw2g/mnII+i6Bs=";
};
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
@ -66,6 +74,8 @@ stdenv.mkDerivation rec {
"-Dos_backend=linux"
"-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
"-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
"-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "auto" else "disabled"}"
"-Dgtk-doc=${lib.boolToString withDocs}"
];
doCheck = false; # fails with "env: './linux/integration-test': No such file or directory"