14 rustPlatform.buildRustPackage rec {
18 src = fetchFromGitHub {
22 sha256 = "sha256-jUL7/jHjfgpLg6728JQETbBcC2Q3G8d31oiwhkS+FD0=";
24 cargoSha256 = "sha256-qQ6yRI0rNxV/TRZHCR69h6kx6L2Wp75ziw+B2P8LZmE=";
26 nativeBuildInputs = with llvmPackages; [
31 buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
33 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
36 installManPage doc/innernet-server.8.gz
37 installManPage doc/innernet.8.gz
38 installShellCompletion doc/innernet.completions.{bash,fish,zsh}
39 installShellCompletion doc/innernet-server.completions.{bash,fish,zsh}
40 '' + (lib.optionalString stdenv.isLinux ''
41 find . -regex '.*\.\(target\|service\)' | xargs install -Dt $out/lib/systemd/system
42 find $out/lib/systemd/system -type f | xargs sed -i "s|/usr/bin/innernet|$out/bin/innernet|"
46 serverVersion = testers.testVersion { package = innernet; command = "innernet-server --version"; };
47 version = testers.testVersion { package = innernet; command = "innernet --version"; };
51 description = "A private network system that uses WireGuard under the hood";
52 homepage = "https://github.com/tonarino/innernet";
53 license = licenses.mit;
54 maintainers = with maintainers; [ tomberek _0x4A6F ];