summaryrefslogtreecommitdiffstats
path: root/guix/jd/packages
diff options
context:
space:
mode:
Diffstat (limited to 'guix/jd/packages')
-rwxr-xr-xguix/jd/packages/patches/nm-pptp-autogen.patch15
-rw-r--r--guix/jd/packages/vpn.scm144
2 files changed, 159 insertions, 0 deletions
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 @@
1diff --git a/autogen.sh b/autogen.sh
2index 4ed20c6..34834a6 100755
3--- a/autogen.sh
4+++ b/autogen.sh
5@@ -13,8 +13,6 @@ PKG_NAME=NetworkManager-pptp
6 exit 1
7 }
8
9-(cd $srcdir;
10- autoreconf --install --symlink &&
11- ./configure --enable-maintainer-mode --enable-more-warnings=error $@
12-)
13+cd $srcdir
14+autoreconf --install --symlink
15
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 @@
1(define-module (jd packages vpn)
2 #:use-module (jd utils)
3
4 #:use-module (gnu packages)
5 #:use-module (gnu packages samba) ;; PPP
6 #:use-module (gnu packages perl)
7 #:use-module (gnu packages linux)
8 #:use-module (gnu packages gnome)
9 #:use-module (gnu packages glib)
10 #:use-module (gnu packages pkg-config)
11 #:use-module (gnu packages build-tools)
12 #:use-module (gnu packages gettext)
13 #:use-module (gnu packages autotools)
14 #:use-module (gnu packages gtk)
15
16 #:use-module (guix gexp)
17 #:use-module (guix git-download)
18 #:use-module ((guix licenses) #:prefix license:)
19 #:use-module (guix build-system)
20 #:use-module (guix build-system gnu)
21 #:use-module (guix utils)
22 #:use-module (guix packages)
23 #:use-module (guix download))
24
25
26
27(define-public pptp-client
28 (package
29 (name "pptp-client")
30 (version "1.10.0")
31 (source
32 (origin
33 (method git-fetch)
34 (uri (git-reference
35 (url "https://git.code.sf.net/p/pptpclient/git")
36 (commit version)))
37 (sha256
38 (base32 "0qixs1dxrr1x4sgi22250231p9kqi8l8ifawxn6ws1d3p7mc6ggh"))))
39
40 (build-system gnu-build-system)
41 (arguments
42 '(#:phases
43 (modify-phases %standard-phases
44 (delete 'configure)
45 (delete 'check)
46 (add-before 'build 'change-location-of-pppd
47 (lambda* (#:key outputs #:allow-other-keys)
48 (substitute* "Makefile"
49 (("^PPPD.=.*$")
50 (string-append "PPPD = "
51 (which "pppd")))
52 (("^IP.=.*$")
53 (string-append "IP = "
54 (which "ip"))))))
55 (replace 'install
56 (lambda* (#:key outputs #:allow-other-keys)
57 (let* ((out (assoc-ref outputs "out"))
58 (sbin (string-append out "/sbin")))
59 (mkdir-p sbin)
60 (install-file "pptp" sbin)
61 #t))))))
62 (inputs
63 (list perl))
64 (native-inputs
65 (list ppp
66 iproute))
67 (home-page "https://sourceforge.net/projects/pptpclient/")
68 (synopsis "PPTP-Client")
69 (description
70 "pptp is an implementation of the PPTP protocol for Linux and
71other Unix systems.")
72 (license license:gpl2+)
73 (properties `((upstream-name . "NetworkManager-pptp")))))
74
75
76;; ================================
77
78(define-public network-manager-pptp
79 (package
80 (name "network-manager-pptp")
81 (version "1.2.12")
82 (source
83 (origin
84 (method git-fetch)
85 (uri (git-reference
86 (url "https://gitlab.gnome.org/GNOME/NetworkManager-pptp.git")
87 (commit version)))
88 (file-name (git-file-name name version))
89
90 (sha256
91 (base32 "1prl14106kfl5x56v9adwi4wqwrh6k3chkimjpd0clwy3drywhcr"))
92 (patches (jd-search-patches "nm-pptp-autogen.patch"))))
93
94 (build-system gnu-build-system)
95 (arguments
96 '(#:configure-flags '("--enable-absolute-paths"
97 ; "--localstatedir=/var"
98 "--with-gtk4=yes")
99 #:phases
100 (modify-phases %standard-phases
101 (add-after 'configure 'patch-path
102 (lambda* (#:key inputs #:allow-other-keys #:rest args)
103 (let* ((pppd (search-input-file inputs "/sbin/pppd"))
104 (pptp (search-input-file inputs "/sbin/pptp"))
105 (modprobe (search-input-file inputs "/bin/modprobe"))
106 (pretty-pppd (string-append "\"" pppd "\""))
107 (pretty-pptp (string-append "\"" pptp "\"")))
108
109 (substitute* "src/nm-pptp-service.c"
110 (("\"/usr/local/sbin/pppd\"") pretty-pppd)
111 (("\"/usr/sbin/pppd\"") pretty-pppd)
112 (("\"/sbin/pppd\"") pretty-pppd)
113 (("\"/usr/local/sbin/pptp\"") pretty-pptp)
114 (("\"/usr/sbin/pptp\"") pretty-pptp)
115 (("\"/sbin/pptp\"") pretty-pptp)
116 (("/sbin/modprobe") modprobe))))))))
117 (native-inputs
118 (list intltool
119 `(,glib "bin")
120 glib
121 `(,gtk "bin")
122 pkg-config))
123 (inputs
124 (list autoconf
125 autoconf-archive
126 gnulib
127 gnu-gettext
128 automake
129 gtk+
130 gtk
131 kmod
132 libtool
133 network-manager
134 libnma
135 libsecret
136 ppp
137 pptp-client))
138 (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN")
139 (synopsis "PPTP plug-in for NetworkManager")
140 (description
141 "This extension of NetworkManager allows it to take care of connections
142to virtual private networks (VPNs) via pptp.")
143 (license license:gpl2+)
144 (properties `((upstream-name . "NetworkManager-pptp")))))