Files
nixpkgs/pkgs/by-name/ea/easytier/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
protobuf,
nixosTests,
nix-update-script,
installShellFiles,
withQuic ? false, # with QUIC protocol support
}:
rustPlatform.buildRustPackage rec {
pname = "easytier";
version = "2.4.5";
src = fetchFromGitHub {
owner = "EasyTier";
repo = "EasyTier";
tag = "v${version}";
hash = "sha256-vGQHrpImPMF44LXVnKRpj47Nr534wTlVZJiBDm4GkGs=";
};
cargoHash = "sha256-B9GkvSXyZXTBsnV7wbipjdZ0EkVrL/aw8Ff7uUvfKPo=";
nativeBuildInputs = [
protobuf
rustPlatform.bindgenHook
installShellFiles
];
buildNoDefaultFeatures = stdenv.hostPlatform.isMips;
buildFeatures = lib.optional stdenv.hostPlatform.isMips "mips" ++ lib.optional withQuic "quic";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd easytier-cli \
--bash <($out/bin/easytier-cli gen-autocomplete bash) \
--fish <($out/bin/easytier-cli gen-autocomplete fish) \
--zsh <($out/bin/easytier-cli gen-autocomplete zsh)
installShellCompletion --cmd easytier-core \
--bash <($out/bin/easytier-core --gen-autocomplete bash) \
--fish <($out/bin/easytier-core --gen-autocomplete fish) \
--zsh <($out/bin/easytier-core --gen-autocomplete zsh)
'';
doCheck = false; # tests failed due to heavy rely on network
passthru = {
tests = { inherit (nixosTests) easytier; };
updateScript = nix-update-script { };
};
meta = {
homepage = "https://github.com/EasyTier/EasyTier";
changelog = "https://github.com/EasyTier/EasyTier/releases/tag/v${version}";
description = "Simple, decentralized mesh VPN with WireGuard support";
longDescription = ''
EasyTier is a simple, safe and decentralized VPN networking solution implemented
with the Rust language and Tokio framework.
'';
mainProgram = "easytier-core";
license = lib.licenses.asl20;
platforms = with lib.platforms; unix ++ windows;
maintainers = with lib.maintainers; [ ltrump ];
};
}