13 rustPlatform.buildRustPackage rec {
17 src = fetchFromGitHub {
20 rev = "refs/tags/v${version}";
21 hash = "sha256-dFMAzLvPO5xAfJqUXdiLf13uh5H5ay+CI9aop7Fhprk=";
24 cargoHash = "sha256-39LryfisVtNMX2XLPh/AEQ1KzVtwdE3wuTaTbxGMaBI=";
27 rustPlatform.bindgenHook
33 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
39 installManPage doc/innernet-server.8.gz
40 installManPage doc/innernet.8.gz
41 installShellCompletion doc/innernet.completions.{bash,fish,zsh}
42 installShellCompletion doc/innernet-server.completions.{bash,fish,zsh}
43 '' + (lib.optionalString stdenv.hostPlatform.isLinux ''
44 find . -regex '.*\.\(target\|service\)' | xargs install -Dt $out/lib/systemd/system
45 find $out/lib/systemd/system -type f | xargs sed -i "s|/usr/bin/innernet|$out/bin/innernet|"
49 serverVersion = testers.testVersion { package = innernet; command = "innernet-server --version"; };
50 version = testers.testVersion { package = innernet; command = "innernet --version"; };
54 description = "Private network system that uses WireGuard under the hood";
55 homepage = "https://github.com/tonarino/innernet";
56 changelog = "https://github.com/tonarino/innernet/releases/tag/v${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ tomberek _0x4A6F ];