1 { stdenv, lib, fetchFromGitHub, autoreconfHook, pkg-config
5 , withSystemd ? stdenv.isLinux
6 , withPpp ? stdenv.isLinux
9 stdenv.mkDerivation rec {
10 pname = "openfortivpn";
13 src = fetchFromGitHub {
14 owner = "adrienverge";
17 sha256 = "sha256-VGjzxEdWnGICpGWBklYoAqhC4ka1rF/a6K17hoFDxSo=";
20 # we cannot write the config file to /etc and as we don't need the file, so drop it
22 substituteInPlace Makefile.am \
23 --replace '$(DESTDIR)$(confdir)' /tmp
26 nativeBuildInputs = [ autoreconfHook pkg-config ];
31 ++ lib.optional withSystemd systemd
32 ++ lib.optional withPpp ppp;
37 ++ lib.optional withSystemd "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
38 ++ lib.optional withPpp "--with-pppd=${ppp}/bin/pppd";
40 enableParallelBuilding = true;
43 description = "Client for PPP+SSL VPN tunnel services";
44 homepage = "https://github.com/adrienverge/openfortivpn";
45 license = licenses.gpl3;
46 maintainers = with maintainers; [ madjar ];
47 platforms = with platforms; linux ++ darwin;