mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 11:03:57 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, nlohmann_json
|
|
, libtoxcore
|
|
, libsodium
|
|
, libcap
|
|
, zeromq
|
|
, systemd
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "toxvpn";
|
|
version = "unstable-2024-08-21";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cleverca22";
|
|
repo = "toxvpn";
|
|
rev = "c727451eb871b43855b825ff93dc48fa0d3320b6";
|
|
sha256 = "sha256-UncU0cpoyy9Z0TCChGmaHpyhW9ctz32gU7n3hgpOEwU=";
|
|
};
|
|
|
|
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libcap systemd ];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DSYSTEMD=1" ];
|
|
|
|
postInstall = "cp ${./bootstrap.json} $out/share/toxvpn/";
|
|
|
|
installCheckPhase = "$out/bin/toxvpn -h";
|
|
doInstallCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Powerful tool that allows one to make tunneled point to point connections over Tox";
|
|
homepage = "https://github.com/cleverca22/toxvpn";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ cleverca22 craigem obadz toonn ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|