remove custom eg25-manager and use nixpkgs upstream instead
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
# package based on:
|
||||
# - <https://github.com/NixOS/mobile-nixos/pull/573>
|
||||
|
||||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchFromGitLab
|
||||
, gnugrep
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, scdoc
|
||||
, curl
|
||||
, glib
|
||||
, libgudev
|
||||
, libusb1
|
||||
# if true, build with MMGLIB. if false, eg25-manager won't speak to modemmanager and will be usable standalone
|
||||
, withModemManager ? true, modemmanager
|
||||
}:
|
||||
|
||||
let
|
||||
# eg25-manager needs to be made compatible with libgpiod 2.0 API. see:
|
||||
# - <https://github.com/NixOS/mobile-nixos/pull/573#issuecomment-1666739462>
|
||||
# - <https://gitlab.com/mobian1/eg25-manager/-/issues/45>
|
||||
# nixpkgs libgpiod was bumped 2023-07-29:
|
||||
# - <https://github.com/NixOS/nixpkgs/pull/246018>
|
||||
libgpiod1 = callPackage ./libgpiod1.nix { };
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "eg25-manager";
|
||||
version = "0.4.6";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "mobian1";
|
||||
repo = "eg25-manager";
|
||||
rev = version;
|
||||
hash = "sha256-2JsdwK1ZOr7ljNHyuUMzVCpl+HV0C5sA5LAOkmELqag=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace 'udev/80-modem-eg25.rules' \
|
||||
--replace-fail '/bin/grep' '${gnugrep}/bin/grep'
|
||||
'';
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glib # Contains gdbus-codegen program
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
glib
|
||||
libgpiod1
|
||||
libgudev
|
||||
libusb1
|
||||
] ++ lib.optionals withModemManager [
|
||||
modemmanager
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit libgpiod1;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manager daemon for the Quectel EG25 mobile broadband modem";
|
||||
homepage = "https://gitlab.com/mobian1/eg25-manager";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
{ lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkg-config, kmod
|
||||
, enable-tools ? true
|
||||
, enablePython ? false, python3, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libgpiod";
|
||||
version = "1.6.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
|
||||
hash = "sha256-gp1KwmjfB4U2CdZ8/H9HbpqnNssqaKYwvpno+tGXvgo=";
|
||||
};
|
||||
|
||||
buildInputs = [ kmod ] ++ lib.optionals enablePython [ python3 ncurses ];
|
||||
nativeBuildInputs = [
|
||||
autoconf-archive
|
||||
pkg-config
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-tools=${if enable-tools then "yes" else "no"}"
|
||||
"--enable-bindings-cxx"
|
||||
"--prefix=${placeholder "out"}"
|
||||
] ++ lib.optional enablePython "--enable-bindings-python";
|
||||
|
||||
meta = with lib; {
|
||||
description = "C library and tools for interacting with the linux GPIO character device";
|
||||
longDescription = ''
|
||||
Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
|
||||
the character device instead. This library encapsulates the ioctl calls and
|
||||
data structures behind a straightforward API.
|
||||
'';
|
||||
homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/";
|
||||
license = licenses.lgpl2;
|
||||
maintainers = [ maintainers.expipiplus1 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@@ -30,7 +30,6 @@ let
|
||||
curlftpfs-sane = callPackage ./additional/curlftpfs-sane { };
|
||||
depthcharge-tools = callPackage ./additional/depthcharge-tools { };
|
||||
eg25-control = callPackage ./additional/eg25-control { };
|
||||
eg25-manager = callPackage ./additional/eg25-manager { };
|
||||
fastcluster = callPackage ./additional/fastcluster { };
|
||||
feeds = lib.recurseIntoAttrs (callPackage ./additional/feeds { });
|
||||
feedsearch-crawler = callPackage ./additional/feedsearch-crawler { };
|
||||
|
Reference in New Issue
Block a user