From e14390858839d7fd56b579d6489ea7bc88a5e530 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sun, 2 Jul 2023 15:36:22 +0200 Subject: Add GNU/Guix config files. --- guix/jd/packages/patches/nm-pptp-autogen.patch | 15 +++ guix/jd/packages/vpn.scm | 144 +++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100755 guix/jd/packages/patches/nm-pptp-autogen.patch create mode 100644 guix/jd/packages/vpn.scm (limited to 'guix/jd/packages') diff --git a/guix/jd/packages/patches/nm-pptp-autogen.patch b/guix/jd/packages/patches/nm-pptp-autogen.patch new file mode 100755 index 0000000..ef5c731 --- /dev/null +++ b/guix/jd/packages/patches/nm-pptp-autogen.patch @@ -0,0 +1,15 @@ +diff --git a/autogen.sh b/autogen.sh +index 4ed20c6..34834a6 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -13,8 +13,6 @@ PKG_NAME=NetworkManager-pptp + exit 1 + } + +-(cd $srcdir; +- autoreconf --install --symlink && +- ./configure --enable-maintainer-mode --enable-more-warnings=error $@ +-) ++cd $srcdir ++autoreconf --install --symlink + diff --git a/guix/jd/packages/vpn.scm b/guix/jd/packages/vpn.scm new file mode 100644 index 0000000..2542bae --- /dev/null +++ b/guix/jd/packages/vpn.scm @@ -0,0 +1,144 @@ +(define-module (jd packages vpn) + #:use-module (jd utils) + + #:use-module (gnu packages) + #:use-module (gnu packages samba) ;; PPP + #:use-module (gnu packages perl) + #:use-module (gnu packages linux) + #:use-module (gnu packages gnome) + #:use-module (gnu packages glib) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages build-tools) + #:use-module (gnu packages gettext) + #:use-module (gnu packages autotools) + #:use-module (gnu packages gtk) + + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix download)) + + + +(define-public pptp-client + (package + (name "pptp-client") + (version "1.10.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.code.sf.net/p/pptpclient/git") + (commit version))) + (sha256 + (base32 "0qixs1dxrr1x4sgi22250231p9kqi8l8ifawxn6ws1d3p7mc6ggh")))) + + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-before 'build 'change-location-of-pppd + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile" + (("^PPPD.=.*$") + (string-append "PPPD = " + (which "pppd"))) + (("^IP.=.*$") + (string-append "IP = " + (which "ip")))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sbin (string-append out "/sbin"))) + (mkdir-p sbin) + (install-file "pptp" sbin) + #t)))))) + (inputs + (list perl)) + (native-inputs + (list ppp + iproute)) + (home-page "https://sourceforge.net/projects/pptpclient/") + (synopsis "PPTP-Client") + (description + "pptp is an implementation of the PPTP protocol for Linux and +other Unix systems.") + (license license:gpl2+) + (properties `((upstream-name . "NetworkManager-pptp"))))) + + +;; ================================ + +(define-public network-manager-pptp + (package + (name "network-manager-pptp") + (version "1.2.12") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.gnome.org/GNOME/NetworkManager-pptp.git") + (commit version))) + (file-name (git-file-name name version)) + + (sha256 + (base32 "1prl14106kfl5x56v9adwi4wqwrh6k3chkimjpd0clwy3drywhcr")) + (patches (jd-search-patches "nm-pptp-autogen.patch")))) + + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-absolute-paths" + ; "--localstatedir=/var" + "--with-gtk4=yes") + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-path + (lambda* (#:key inputs #:allow-other-keys #:rest args) + (let* ((pppd (search-input-file inputs "/sbin/pppd")) + (pptp (search-input-file inputs "/sbin/pptp")) + (modprobe (search-input-file inputs "/bin/modprobe")) + (pretty-pppd (string-append "\"" pppd "\"")) + (pretty-pptp (string-append "\"" pptp "\""))) + + (substitute* "src/nm-pptp-service.c" + (("\"/usr/local/sbin/pppd\"") pretty-pppd) + (("\"/usr/sbin/pppd\"") pretty-pppd) + (("\"/sbin/pppd\"") pretty-pppd) + (("\"/usr/local/sbin/pptp\"") pretty-pptp) + (("\"/usr/sbin/pptp\"") pretty-pptp) + (("\"/sbin/pptp\"") pretty-pptp) + (("/sbin/modprobe") modprobe)))))))) + (native-inputs + (list intltool + `(,glib "bin") + glib + `(,gtk "bin") + pkg-config)) + (inputs + (list autoconf + autoconf-archive + gnulib + gnu-gettext + automake + gtk+ + gtk + kmod + libtool + network-manager + libnma + libsecret + ppp + pptp-client)) + (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN") + (synopsis "PPTP plug-in for NetworkManager") + (description + "This extension of NetworkManager allows it to take care of connections +to virtual private networks (VPNs) via pptp.") + (license license:gpl2+) + (properties `((upstream-name . "NetworkManager-pptp"))))) -- cgit v1.2.3