Merge pull request #330448 from flokli/wvdial

wvdial, wvstreams: init
This commit is contained in:
Florian Klink 2024-07-28 19:49:33 +03:00 committed by GitHub
commit bc83c7cf57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 202 additions and 0 deletions

View File

@ -1244,6 +1244,7 @@
./services/networking/websockify.nix
./services/networking/wg-access-server.nix
./services/networking/wg-netmanager.nix
./services/networking/wvdial.nix
./services/networking/webhook.nix
./services/networking/wg-quick.nix
./services/networking/wgautomesh.nix

View File

@ -0,0 +1,47 @@
# Global configuration for wvdial.
{
config,
lib,
pkgs,
...
}:
let
cfg = config.environment.wvdial;
in
{
options = {
environment.wvdial = {
dialerDefaults = lib.mkOption {
default = "";
type = lib.types.str;
example = ''Init1 = AT+CGDCONT=1,"IP","internet.t-mobile"'';
description = ''
Contents of the "Dialer Defaults" section of
<filename>/etc/wvdial.conf</filename>.
'';
};
pppDefaults = lib.mkOption {
default = ''
noipdefault
usepeerdns
defaultroute
persist
noauth
'';
type = lib.types.str;
description = "Default ppp settings for wvdial.";
};
};
};
config = lib.mkIf (cfg.dialerDefaults != "") {
environment.etc."wvdial.conf".source = pkgs.writeText "wvdial.conf" ''
[Dialer Defaults]
PPPD PATH = ${pkgs.ppp}/sbin/pppd
${config.environment.wvdial.dialerDefaults}
'';
environment.etc."ppp/peers/wvdial".source = pkgs.writeText "wvdial" cfg.pppDefaults;
};
}

View File

@ -0,0 +1,44 @@
{
stdenv,
fetchFromGitea,
fetchpatch,
wvstreams,
pkg-config,
lib,
}:
stdenv.mkDerivation {
pname = "wvdial";
version = "unstable-2016-06-15";
src = fetchFromGitea {
domain = "gitea.osmocom.org";
owner = "retronetworking";
repo = "wvdial";
rev = "42d084173cc939586c1963b8835cb00ec56b2823";
hash = "sha256-q7pFvpJvv+ZvbN4xxolI9ZRULr+N5sqO9BOXUqSG5v4=";
};
patches = [
(fetchpatch {
url = "https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch?h=73a68490efe05cdbec540ec6f17782816632a24d";
hash = "sha256-fsneoB5GeKH/nxwW0z8Mk6892PtnZ3J77wP4BGo3Tj8=";
})
];
buildInputs = [ wvstreams ];
nativeBuildInputs = [ pkg-config ];
makeFlags = [
"prefix=${placeholder "out"}"
"PPPDIR=${placeholder "out"}/etc/ppp/peers"
];
meta = {
description = "A dialer that automatically recognises the modem";
homepage = "https://gitea.osmocom.org/retronetworking/wvdial";
license = lib.licenses.lgpl2;
maintainers = with lib.maintainers; [ flokli ];
platforms = lib.platforms.linux;
};
}

View File

@ -0,0 +1,110 @@
{
stdenv,
fetchpatch,
fetchurl,
dbus,
zlib,
openssl,
readline,
lib,
perl,
}:
stdenv.mkDerivation {
pname = "wvstreams";
version = "4.6.1";
# See https://layers.openembedded.org/layerindex/recipe/190863/
src = fetchurl {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/wvstreams-4.6.1.tar.gz";
hash = "sha256-hAP1+/g6qawMbOFdl/2FYHSIFSqoTgB7fQYhuOvAdjM=";
};
patches = [
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-zlPiME+KYjesmKt3a+JoE087qE1MbnlVPjC75qQoIks=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-Twqk0J8E05kAvhHjAoAuYEpS445t3mb/BvuxTmaaGoM=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-JMPNUdfAJ/gq+am/F1DE2q3+35ItiLAve1+LLl8+Oe4=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-N3HmuBakD5VHoToOqU6EmTHlgFG6A7x84Gbf2P2u+s8=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-fXhBUKaHD27mspwrKNY5G7F6UHqq/dmnPlf9cIvM7hM=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-55vWFfd/SDa9dE+GmSHDMU2kTrn+tNUW2clPknSdi7g=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-XRJCZMnygcQie9sUc1iCe9HVE9lEFCed4JRDtd/C/84=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-v0WAFyWwQ70dpq1BEXQjkOrdUUk4tBFJVKeHffs4FmA=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-1UZziDaE0BCM/YmYjBgFA2Q8zfnWpQcal08a0qcClmo=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-4Ad10pijea/qusrdCJAEjpc1/qfQNE32t/M2YMk5jNg=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-zWREskvLoAH2sYn6kbemTC1V5KrF9jX0B0d+ASExQBA=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-ACiuwqwg5nUbzqoJR5h9GENXmN3ELzkBjujZivBoM4g=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-pMHopuBEge7Llq1Syb8sZJArhUOWBNmcOvVcNtFgnbA=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-R5pfYxefEvvxB1k+gZzRQgsbmkgpK9cBqZxCXHQnQlM=";
})
(fetchpatch {
url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Fix-narrowing-conversion-error.patch?id=0e6c34f82ca4d43cbca3754c5fe37c5b3bdd0f37";
hash = "sha256-esCD7jMVxD1sC2C4jx+pnnIWHpXAVGF/CGXvwHc9rhU=";
})
];
outputs = [
"bin"
"dev"
"lib"
"out"
];
enableParallelBuilding = true;
buildInputs = [
dbus
zlib
openssl
readline
perl
];
meta = {
description = "Network programming library in C++";
homepage = "http://alumnit.ca/wiki/index.php?page=WvStreams";
license = lib.licenses.lgpl2;
maintainers = [ lib.maintainers.flokli ];
platforms = lib.platforms.linux;
};
}