blob: 2542baebb64174023d55297058dd661ce20c5eaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
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")))))
|