toxvpn: format, cleanup

This commit is contained in:
Sandro Jäckel 2021-08-02 13:14:13 +02:00
parent 0b06ccd7be
commit 9733d7e077
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,11 +1,18 @@
{ lib, stdenv, fetchFromGitHub, cmake, nlohmann_json,
libtoxcore, libsodium, libcap, zeromq,
systemd ? null }:
with lib;
{ lib
, stdenv
, fetchFromGitHub
, cmake
, nlohmann_json
, libtoxcore
, libsodium
, libcap
, zeromq
, systemd
}:
stdenv.mkDerivation {
name = "toxvpn-2019-09-09";
name = "toxvpn";
version = "unstable-2019-09-09";
src = fetchFromGitHub {
owner = "cleverca22";
@ -15,11 +22,11 @@ stdenv.mkDerivation {
};
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ]
++ optionals stdenv.isLinux [ libcap systemd ];
++ lib.optionals stdenv.isLinux [ libcap systemd ];
nativeBuildInputs = [ cmake ];
cmakeFlags = optional stdenv.isLinux [ "-DSYSTEMD=1" ];
cmakeFlags = lib.optional stdenv.isLinux [ "-DSYSTEMD=1" ];
postInstall = "$out/bin/toxvpn -h";
@ -28,6 +35,6 @@ stdenv.mkDerivation {
homepage = "https://github.com/cleverca22/toxvpn";
license = licenses.gpl3;
maintainers = with maintainers; [ cleverca22 obadz toonn ];
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.unix;
};
}