networkmanager: fix cross
copy devdoc and man from native to cross doc does not have to be copied
This commit is contained in:
parent
28ca82a86b
commit
bf15263d1c
1 changed files with 20 additions and 4 deletions
|
@ -34,6 +34,7 @@
|
|||
, iputils
|
||||
, kmod
|
||||
, jansson
|
||||
, elfutils
|
||||
, gtk-doc
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
|
@ -43,14 +44,16 @@
|
|||
, openconnect
|
||||
, curl
|
||||
, meson
|
||||
, mesonEmulatorHook
|
||||
, ninja
|
||||
, libpsl
|
||||
, mobile-broadband-provider-info
|
||||
, runtimeShell
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
let
|
||||
pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]);
|
||||
pythonForDocs = python3.pythonForBuild.withPackages (pkgs: with pkgs; [ pygobject3 ]);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "networkmanager";
|
||||
|
@ -102,7 +105,9 @@ stdenv.mkDerivation rec {
|
|||
"-Ddhcpcanon=no"
|
||||
|
||||
# Miscellaneous
|
||||
"-Ddocs=true"
|
||||
# almost cross-compiles, however fails with
|
||||
# ** (process:9234): WARNING **: Failed to load shared library '/nix/store/...-networkmanager-aarch64-unknown-linux-gnu-1.38.2/lib/libnm.so.0' referenced by the typelib: /nix/store/...-networkmanager-aarch64-unknown-linux-gnu-1.38.2/lib/libnm.so.0: cannot open shared object file: No such file or directory
|
||||
"-Ddocs=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
|
||||
# We don't use firewalld in NixOS
|
||||
"-Dfirewalld_zone=false"
|
||||
"-Dtests=no"
|
||||
|
@ -150,12 +155,12 @@ stdenv.mkDerivation rec {
|
|||
mobile-broadband-provider-info
|
||||
bluez5
|
||||
dnsmasq
|
||||
gobject-introspection
|
||||
modemmanager
|
||||
readline
|
||||
newt
|
||||
libsoup
|
||||
jansson
|
||||
dbus # used to get directory paths with pkg-config during configuration
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ gnutls libgcrypt ];
|
||||
|
@ -167,7 +172,7 @@ stdenv.mkDerivation rec {
|
|||
pkg-config
|
||||
vala
|
||||
gobject-introspection
|
||||
dbus
|
||||
elfutils # used to find jansson soname
|
||||
# Docs
|
||||
gtk-doc
|
||||
libxslt
|
||||
|
@ -176,6 +181,8 @@ stdenv.mkDerivation rec {
|
|||
docbook_xml_dtd_42
|
||||
docbook_xml_dtd_43
|
||||
pythonForDocs
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook
|
||||
];
|
||||
|
||||
doCheck = false; # requires /sys, the net
|
||||
|
@ -183,6 +190,10 @@ stdenv.mkDerivation rec {
|
|||
postPatch = ''
|
||||
patchShebangs ./tools
|
||||
patchShebangs libnm/generate-setting-docs.py
|
||||
|
||||
# TODO: submit upstream
|
||||
substituteInPlace meson.build \
|
||||
--replace "'vala', req" "'vala', native: false, req"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
@ -194,6 +205,11 @@ stdenv.mkDerivation rec {
|
|||
ln -s $PWD/src/libnm-client-impl/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cp -r ${buildPackages.networkmanager.devdoc} $devdoc
|
||||
cp -r ${buildPackages.networkmanager.man} $man
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = "NetworkManager";
|
||||
|
|
Loading…
Reference in a new issue