2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, AppKit
|
|
|
|
, Security
|
|
|
|
, fetchFromGitLab
|
|
|
|
, rustPlatform
|
|
|
|
, protobuf
|
|
|
|
, capnproto
|
2024-09-19 14:19:46 +00:00
|
|
|
, cmake
|
|
|
|
, testers
|
|
|
|
, veilid
|
|
|
|
, gitUpdater
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "veilid";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "0.4.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "veilid";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-5Xjdc66VA7FFk75jnTARCs2oGT/hWX8VPlZV48q6kpI=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
2023-10-09 19:29:22 +00:00
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-07-27 06:49:29 +00:00
|
|
|
"ansi-parser-0.9.1" = "sha256-Vdjt8QDstrfxYfklZ5vYPGhVNG1BVh4cpKGwvvsHlS4=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"cursive-0.20.0" = "sha256-EGKO7JVN9hIqADKKC3mUHHOCSxMjPoXzYBZujzdgk3E=";
|
2023-10-09 19:29:22 +00:00
|
|
|
"cursive_buffered_backend-0.6.1" = "sha256-+sTJnp570HupwaJxV2x+oKyLwNmqQ4HqOH2P1s9Hhw8=";
|
2024-04-21 15:54:59 +00:00
|
|
|
"cursive_table_view-0.14.0" = "sha256-haos82qtobMsFCP3sNRu5u1mki4bsjrV+eqFxUGIHqk=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
capnproto
|
2024-09-19 14:19:46 +00:00
|
|
|
cmake
|
2023-08-22 20:05:09 +00:00
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Security ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--workspace"
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
RUSTFLAGS = "--cfg tokio_unstable";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "lib" "$lib"
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gitUpdater { rev-prefix = "v"; };
|
|
|
|
tests = {
|
|
|
|
veilid-version = testers.testVersion {
|
|
|
|
package = veilid;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Open-source, peer-to-peer, mobile-first, networked application framework";
|
2024-09-19 14:19:46 +00:00
|
|
|
mainProgram = "veilid-server";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://veilid.com";
|
|
|
|
license = licenses.mpl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ bbigras qbit ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
}
|