2022-11-04 22:07:35 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, pkg-config, cmake, bluez, libusb1, curl
|
|
|
|
, libiconv, gettext, sqlite, bash, dialog
|
2016-02-14 18:22:47 +00:00
|
|
|
, dbiSupport ? false, libdbi ? null, libdbiDrivers ? null
|
|
|
|
, postgresSupport ? false, postgresql ? null
|
|
|
|
}:
|
2013-12-27 21:33:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gammu";
|
2022-07-13 12:07:59 +00:00
|
|
|
version = "1.42.0";
|
2013-12-27 21:33:52 +00:00
|
|
|
|
2016-11-19 20:24:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gammu";
|
|
|
|
repo = "gammu";
|
|
|
|
rev = version;
|
2022-07-13 12:07:59 +00:00
|
|
|
sha256 = "sha256-aeaGHVxOMiXRU6RHws+oAnzdO9RY1jw/X/xuGfSt76I=";
|
2013-12-27 21:33:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 22:07:35 +00:00
|
|
|
patches = [
|
|
|
|
./bashcomp-dir.patch
|
|
|
|
./systemd.patch
|
|
|
|
(substituteAll {
|
|
|
|
src = ./gammu-config-dialog.patch;
|
|
|
|
dialog = "${dialog}/bin/dialog";
|
|
|
|
})
|
|
|
|
];
|
2013-12-27 21:33:52 +00:00
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2017-04-05 00:31:56 +00:00
|
|
|
|
2021-03-25 11:58:42 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-11-04 22:07:35 +00:00
|
|
|
buildInputs = [ bash bluez libusb1 curl gettext sqlite libiconv ]
|
2023-01-24 16:29:20 +00:00
|
|
|
++ lib.optionals dbiSupport [ libdbi libdbiDrivers ]
|
|
|
|
++ lib.optionals postgresSupport [ postgresql ];
|
2013-12-27 21:33:52 +00:00
|
|
|
|
2023-01-24 16:29:20 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://wammu.eu/gammu/";
|
2016-02-14 18:22:47 +00:00
|
|
|
description = "Command line utility and library to control mobile phones";
|
2013-12-27 21:33:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.coroa ];
|
|
|
|
};
|
|
|
|
}
|