innernet:
- add simple packaging test - add manpages - remove unused linuxHeaders input
This commit is contained in:
parent
ee8e469ca9
commit
1a6899f701
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, rustPlatform, fetchFromGitHub, llvmPackages, linuxHeaders, sqlite, Security }:
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, llvmPackages, sqlite, installShellFiles, Security }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "innernet";
|
pname = "innernet";
|
||||||
@ -10,11 +10,37 @@ rustPlatform.buildRustPackage rec {
|
|||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-Z4F5RYPVgFiiDBg6lxILjAh/a/rL7IJBqHIJ/tQyLnE=";
|
sha256 = "sha256-Z4F5RYPVgFiiDBg6lxILjAh/a/rL7IJBqHIJ/tQyLnE=";
|
||||||
};
|
};
|
||||||
|
cargoSha256 = "sha256-WSkN5aXMgfqZJAV1b3elF7kwf2f5OpcntKSf8620YcY=";
|
||||||
|
|
||||||
|
nativeBuildInputs = with llvmPackages; [
|
||||||
|
llvm
|
||||||
|
clang
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||||
|
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
||||||
|
|
||||||
nativeBuildInputs = with llvmPackages; [ llvm clang ];
|
postInstall = ''
|
||||||
buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
installManPage doc/innernet-server.8.gz
|
||||||
cargoSha256 = "sha256-WSkN5aXMgfqZJAV1b3elF7kwf2f5OpcntKSf8620YcY=";
|
installManPage doc/innernet.8.gz
|
||||||
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
if [[ "$("$out/bin/${pname}"-server --version)" == "${pname}-server ${version}" ]]; then
|
||||||
|
echo '${pname}-server smoke check passed'
|
||||||
|
else
|
||||||
|
echo '${pname}-server smoke check failed'
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [[ "$("$out/bin/${pname}" --version)" == "${pname} ${version}" ]]; then
|
||||||
|
echo '${pname} smoke check passed'
|
||||||
|
else
|
||||||
|
echo '${pname} smoke check failed'
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A private network system that uses WireGuard under the hood";
|
description = "A private network system that uses WireGuard under the hood";
|
||||||
|
Loading…
Reference in New Issue
Block a user