mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
Merge pull request #330260 from Luflosi/add/eg25-manager
eg25-manager: init at 0.4.6
This commit is contained in:
commit
03dfa4c1da
27
nixos/modules/hardware/network/eg25-manager.nix
Normal file
27
nixos/modules/hardware/network/eg25-manager.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkPackageOption;
|
||||
cfg = config.services.eg25-manager;
|
||||
in
|
||||
{
|
||||
options.services.eg25-manager = {
|
||||
enable = mkEnableOption "Quectel EG25 modem manager service";
|
||||
|
||||
package = mkPackageOption pkgs "eg25-manager" { };
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.packages = [ cfg.package ];
|
||||
services.udev.packages = [ cfg.package ];
|
||||
systemd.services.eg25-manager.wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ Luflosi ];
|
||||
};
|
||||
}
|
@ -81,6 +81,7 @@
|
||||
./hardware/mcelog.nix
|
||||
./hardware/network/ath-user-regd.nix
|
||||
./hardware/network/b43.nix
|
||||
./hardware/network/eg25-manager.nix
|
||||
./hardware/network/intel-2200bg.nix
|
||||
./hardware/new-lg4ff.nix
|
||||
./hardware/nitrokey.nix
|
||||
|
64
pkgs/by-name/eg/eg25-manager/package.nix
Normal file
64
pkgs/by-name/eg/eg25-manager/package.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
gnugrep,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
scdoc,
|
||||
curl,
|
||||
glib,
|
||||
libgpiod_1,
|
||||
libgudev,
|
||||
libusb1,
|
||||
modemmanager,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "eg25-manager";
|
||||
version = "0.4.6";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "mobian1";
|
||||
repo = "eg25-manager";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-2JsdwK1ZOr7ljNHyuUMzVCpl+HV0C5sA5LAOkmELqag=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace 'udev/80-modem-eg25.rules' \
|
||||
--replace-fail '/bin/grep' '${lib.getExe gnugrep}'
|
||||
'';
|
||||
|
||||
depsBuildBuild = [ pkg-config ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glib # Contains gdbus-codegen program
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
glib
|
||||
libgpiod_1 # Tracking issue for compatibility with libgpiod 2.0: https://gitlab.com/mobian1/eg25-manager/-/issues/45
|
||||
libgudev
|
||||
libusb1
|
||||
modemmanager
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = {
|
||||
description = "Manager daemon for the Quectel EG25 mobile broadband modem found on the Pine64 PinePhone and PinePhone Pro";
|
||||
homepage = "https://gitlab.com/mobian1/eg25-manager";
|
||||
changelog = "https://gitlab.com/mobian1/eg25-manager/-/tags/${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
mainProgram = "eg25-manager";
|
||||
maintainers = with lib.maintainers; [ Luflosi ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user