nixpkgs-suyu/pkgs/tools/networking/innernet/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2021-12-06 10:26:58 +01:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, llvmPackages
, sqlite
, installShellFiles
, Security
, libiconv
, innernet
, testVersion
}:
rustPlatform.buildRustPackage rec {
pname = "innernet";
2021-12-06 10:26:58 +01:00
version = "1.5.2";
src = fetchFromGitHub {
owner = "tonarino";
2021-11-11 21:41:53 +01:00
repo = "innernet";
rev = "v${version}";
2021-12-06 10:26:58 +01:00
sha256 = "141zjfl125m5lrimam1dbpk40dqfq4vnaz42sbiq1v1avyg684fq";
};
2021-12-06 10:26:58 +01:00
cargoSha256 = "0559d0ayysvqs4k46fhgd4r8wa89abgx6rvhlh0gnlnga8vacpw5";
nativeBuildInputs = with llvmPackages; [
llvm
clang
installShellFiles
];
2021-04-29 22:56:38 +02:00
buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
postInstall = ''
installManPage doc/innernet-server.8.gz
installManPage doc/innernet.8.gz
2021-06-01 20:38:30 +02:00
installShellCompletion doc/innernet.completions.{bash,fish,zsh}
installShellCompletion doc/innernet-server.completions.{bash,fish,zsh}
'';
2021-12-06 10:26:58 +01:00
passthru.tests = {
serverVersion = testVersion { package = innernet; command = "innernet-server --version"; };
version = testVersion { package = innernet; command = "innernet --version"; };
};
meta = with lib; {
description = "A private network system that uses WireGuard under the hood";
homepage = "https://github.com/tonarino/innernet";
license = licenses.mit;
maintainers = with maintainers; [ tomberek _0x4A6F ];
};
}