gammu: fix script dependencies on bash and dialog

+31 -4
+11 -4
pkgs/applications/misc/gammu/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkg-config, cmake, bluez, libusb1, curl 2 - , libiconv, gettext, sqlite 3 , dbiSupport ? false, libdbi ? null, libdbiDrivers ? null 4 , postgresSupport ? false, postgresql ? null 5 }: ··· 17 sha256 = "sha256-aeaGHVxOMiXRU6RHws+oAnzdO9RY1jw/X/xuGfSt76I="; 18 }; 19 20 - patches = [ ./bashcomp-dir.patch ./systemd.patch ]; 21 22 nativeBuildInputs = [ pkg-config cmake ]; 23 24 strictDeps = true; 25 26 - buildInputs = [ bluez libusb1 curl gettext sqlite libiconv ] 27 ++ optionals dbiSupport [ libdbi libdbiDrivers ] 28 ++ optionals postgresSupport [ postgresql ]; 29
··· 1 + { lib, stdenv, fetchFromGitHub, substituteAll, pkg-config, cmake, bluez, libusb1, curl 2 + , libiconv, gettext, sqlite, bash, dialog 3 , dbiSupport ? false, libdbi ? null, libdbiDrivers ? null 4 , postgresSupport ? false, postgresql ? null 5 }: ··· 17 sha256 = "sha256-aeaGHVxOMiXRU6RHws+oAnzdO9RY1jw/X/xuGfSt76I="; 18 }; 19 20 + patches = [ 21 + ./bashcomp-dir.patch 22 + ./systemd.patch 23 + (substituteAll { 24 + src = ./gammu-config-dialog.patch; 25 + dialog = "${dialog}/bin/dialog"; 26 + }) 27 + ]; 28 29 nativeBuildInputs = [ pkg-config cmake ]; 30 31 strictDeps = true; 32 33 + buildInputs = [ bash bluez libusb1 curl gettext sqlite libiconv ] 34 ++ optionals dbiSupport [ libdbi libdbiDrivers ] 35 ++ optionals postgresSupport [ postgresql ]; 36
+20
pkgs/applications/misc/gammu/gammu-config-dialog.patch
···
··· 1 + --- a/utils/gammu-config 2 + +++ b/utils/gammu-config 3 + @@ -59,16 +59,7 @@ 4 + shift 5 + done 6 + 7 + -if type dialog > /dev/null 2>&1 ; then 8 + - DIALOG=dialog 9 + -elif type cdialog > /dev/null 2>&1 ; then 10 + - DIALOG=cdialog 11 + -elif type whiptail > /dev/null 2>&1 ; then 12 + - DIALOG=whiptail 13 + -else 14 + - echo "You need dialog, cdialog or whiptail installed to make this work" 15 + - exit 1 16 + -fi 17 + +DIALOG=@dialog@ 18 + 19 + if [ -f "$CONFIG" ] ; then 20 + if [ ! -w "$CONFIG" ] ; then