9 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
10 , withPpp ? stdenv.isLinux
13 stdenv.mkDerivation rec {
14 pname = "openfortivpn";
17 src = fetchFromGitHub {
18 owner = "adrienverge";
21 hash = "sha256-K4sTvt0rIDh8A7uhUQmw3zvS2ksclOLBO76wHevRONU=";
24 # we cannot write the config file to /etc and as we don't need the file, so drop it
26 substituteInPlace Makefile.am \
27 --replace '$(DESTDIR)$(confdir)' /tmp
30 nativeBuildInputs = [ autoreconfHook pkg-config ];
35 ++ lib.optional withSystemd systemd
36 ++ lib.optional withPpp ppp;
41 ++ lib.optional withSystemd "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
42 ++ lib.optional withPpp "--with-pppd=${ppp}/bin/pppd";
44 enableParallelBuilding = true;
47 description = "Client for PPP+SSL VPN tunnel services";
48 homepage = "https://github.com/adrienverge/openfortivpn";
49 license = licenses.gpl3;
50 maintainers = with maintainers; [ madjar ];
51 platforms = with platforms; linux ++ darwin;
52 mainProgram = "openfortivpn";