add minimal ModemManager for use with GPS
can't use the regular nixos modem-manager because it doesn't cross-compile
This commit is contained in:
parent
3174caa0ed
commit
ff895276c8
@ -12,6 +12,8 @@ let
|
||||
makeFlags = ["prefix=${placeholder "out"}"];
|
||||
};
|
||||
|
||||
modemmanager_ = pkgs.callPackage ./modem-manager.nix {};
|
||||
|
||||
drm-framebuffer = pkgs.stdenv.mkDerivation {
|
||||
name = "drm-framebuffer";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
88
modem-manager.nix
Normal file
88
modem-manager.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
libxslt,
|
||||
bash, # shebangs in share/ModemManager/fcc-unlock.available.d/,
|
||||
bash-completion,
|
||||
dbus,
|
||||
gettext,
|
||||
glib,
|
||||
libgudev,
|
||||
libqmi,
|
||||
meson,
|
||||
ninja,
|
||||
cmake,
|
||||
pkg-config,
|
||||
python3,
|
||||
systemd,
|
||||
pkgsBuildBuild,
|
||||
buildPackages
|
||||
}: stdenv.mkDerivation rec {
|
||||
pname = "modemmanager";
|
||||
version = "1.22.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "mobile-broadband";
|
||||
repo = "ModemManager";
|
||||
rev = version;
|
||||
hash = "sha256-/D9b2rCCUhpDCUfSNAWR65+3EyUywzFdH1R17eSKRDo=";
|
||||
};
|
||||
patches = [
|
||||
/home/dan/src/nixpkgs/pkgs/tools/networking/modemmanager/no-dummy-dirs-in-sysconfdir.patch
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
# gobject-introspection
|
||||
gettext
|
||||
pkg-config
|
||||
libxslt
|
||||
python3
|
||||
cmake
|
||||
glib # for gdbus-codegen
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
libgudev
|
||||
# polkit
|
||||
pkg-config
|
||||
# ppp
|
||||
# libmbim
|
||||
libqmi
|
||||
systemd
|
||||
bash-completion
|
||||
dbus
|
||||
# cmake
|
||||
bash # shebangs in share/ModemManager/fcc-unlock.available.d/
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dudevdir=${placeholder "out"}/lib/udev"
|
||||
"-Ddbus_policy_dir=${placeholder "out"}/share/dbus-1/system.d"
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"-Dvapi=false"
|
||||
"-Dmbim=false"
|
||||
"-Dqmi=true"
|
||||
"-Dqrtr=false"
|
||||
"-Dpolkit=no"
|
||||
"-Dplugin_foxconn=disabled"
|
||||
"-Dman=false"
|
||||
"-Dexamples=false"
|
||||
"-Dtests=false"
|
||||
"-Dintrospection=false"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
env | grep PKG
|
||||
mkdir bin
|
||||
PATH=${buildPackages.pkg-config}/bin:$PATH
|
||||
PATH=$PWD/bin:$PATH
|
||||
ln -s ${buildPackages.pkg-config}/bin/$PKG_CONFIG bin/pkg-config
|
||||
echo $PATH | sed 's/:/\n/g' | grep pkg
|
||||
type pkg-config
|
||||
patchShebangs tools/test-modemmanager-service.py
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user