eg25-manager: fix by importing the legacy libgpiod v1 as it appeared nixpkgs 1 wk ago
This commit is contained in:
parent
b7f23a032c
commit
76d8921bdf
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, callPackage
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, gnugrep
|
, gnugrep
|
||||||
, meson
|
, meson
|
||||||
|
@ -11,12 +12,19 @@
|
||||||
, scdoc
|
, scdoc
|
||||||
, curl
|
, curl
|
||||||
, glib
|
, glib
|
||||||
, libgpiod
|
|
||||||
, libgudev
|
, libgudev
|
||||||
, libusb1
|
, libusb1
|
||||||
, modemmanager
|
, 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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "eg25-manager";
|
pname = "eg25-manager";
|
||||||
version = "0.4.6";
|
version = "0.4.6";
|
||||||
|
@ -48,22 +56,20 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
curl
|
curl
|
||||||
glib
|
glib
|
||||||
libgpiod
|
libgpiod1
|
||||||
libgudev
|
libgudev
|
||||||
libusb1
|
libusb1
|
||||||
modemmanager
|
modemmanager
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit libgpiod1;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Manager daemon for the Quectel EG25 mobile broadband modem";
|
description = "Manager daemon for the Quectel EG25 mobile broadband modem";
|
||||||
homepage = "https://gitlab.com/mobian1/eg25-manager";
|
homepage = "https://gitlab.com/mobian1/eg25-manager";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
# 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>
|
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
39
pkgs/additional/eg25-manager/libgpiod1.nix
Normal file
39
pkgs/additional/eg25-manager/libgpiod1.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user