parent
c62334edeb
commit
53ae2db364
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@ |
||||
[workspace] |
||||
members = [ |
||||
"p2p-repo", |
||||
"p2p-net", |
||||
"p2p-broker", |
||||
"p2p-client", |
||||
"p2p-stores-lmdb", |
||||
"ngcli", |
||||
"ngd", |
||||
] |
@ -1,21 +1 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2022 NextGraph.org |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
MIT OR Apache-2.0 |
@ -0,0 +1,16 @@ |
||||
Apache 2.0 License |
||||
|
||||
Copyright (c) 2022-2023 Niko Bonnieure, Par le Peuple, NextGraph.org developers |
||||
All rights reserved. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
@ -0,0 +1,22 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2022-2023 Niko Bonnieure, Par le Peuple, NextGraph.org developers |
||||
All rights reserved. |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
@ -0,0 +1,94 @@ |
||||
{ |
||||
"nodes": { |
||||
"flake-utils": { |
||||
"locked": { |
||||
"lastModified": 1659877975, |
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"nixpkgs": { |
||||
"locked": { |
||||
"lastModified": 1672580127, |
||||
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", |
||||
"owner": "nixos", |
||||
"repo": "nixpkgs", |
||||
"rev": "0874168639713f547c05947c76124f78441ea46c", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "nixos", |
||||
"ref": "nixos-22.05", |
||||
"repo": "nixpkgs", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"nixpkgs_2": { |
||||
"locked": { |
||||
"lastModified": 1665296151, |
||||
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", |
||||
"owner": "NixOS", |
||||
"repo": "nixpkgs", |
||||
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "NixOS", |
||||
"ref": "nixpkgs-unstable", |
||||
"repo": "nixpkgs", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"root": { |
||||
"inputs": { |
||||
"nixpkgs": "nixpkgs", |
||||
"rust-overlay": "rust-overlay", |
||||
"utils": "utils" |
||||
} |
||||
}, |
||||
"rust-overlay": { |
||||
"inputs": { |
||||
"flake-utils": "flake-utils", |
||||
"nixpkgs": "nixpkgs_2" |
||||
}, |
||||
"locked": { |
||||
"lastModified": 1677465082, |
||||
"narHash": "sha256-b82PmPWkt0pAsxmc477Yowq1Ez1VyjA5wnxE+yoIOWg=", |
||||
"owner": "oxalica", |
||||
"repo": "rust-overlay", |
||||
"rev": "2924bfce2fadc1ded4a2b8cfce7f2fd4ef41c36f", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "oxalica", |
||||
"repo": "rust-overlay", |
||||
"type": "github" |
||||
} |
||||
}, |
||||
"utils": { |
||||
"locked": { |
||||
"lastModified": 1676283394, |
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", |
||||
"type": "github" |
||||
}, |
||||
"original": { |
||||
"owner": "numtide", |
||||
"repo": "flake-utils", |
||||
"type": "github" |
||||
} |
||||
} |
||||
}, |
||||
"root": "root", |
||||
"version": 7 |
||||
} |
@ -0,0 +1,107 @@ |
||||
{ |
||||
description = "NextGraph"; |
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; |
||||
inputs.utils.url = "github:numtide/flake-utils"; |
||||
inputs.rust-overlay.url = "github:oxalica/rust-overlay"; |
||||
|
||||
outputs = { |
||||
self, |
||||
nixpkgs, |
||||
utils, |
||||
rust-overlay, |
||||
}: |
||||
utils.lib.eachDefaultSystem (system: let |
||||
overlays = [ |
||||
(import rust-overlay) |
||||
]; |
||||
pkgs = import nixpkgs rec { |
||||
inherit system overlays; |
||||
}; |
||||
rust = pkgs.rust-bin.stable."1.67.1".default.override { |
||||
extensions = ["rust-src"]; |
||||
}; |
||||
buildRustPackage = |
||||
(pkgs.makeRustPlatform { |
||||
cargo = rust; |
||||
rustc = rust; |
||||
}) |
||||
.buildRustPackage; |
||||
myNativeBuildInputs = with pkgs; |
||||
[ |
||||
pkgconfig |
||||
] |
||||
++ lib.optionals stdenv.isLinux |
||||
(with pkgs; [ |
||||
cargo-kcov |
||||
]); |
||||
myBuildInputs = with pkgs; |
||||
[ |
||||
openssl |
||||
] |
||||
++ lib.optionals stdenv.isDarwin |
||||
(with darwin.apple_sdk.frameworks; [ |
||||
Security |
||||
]); |
||||
myBuildRustPackage = attrs: |
||||
buildRustPackage ({ |
||||
version = "0.1.0"; |
||||
src = ./.; |
||||
cargoLock = { |
||||
lockFile = ./Cargo.lock; |
||||
outputHashes = { |
||||
"lmdb-crypto-rs-0.14.0" = "sha256-HKbDK9jKPwYhPytdxnfwCFmve88Voy+cGZM2pt6xUjs="; |
||||
"rkv-0.18.0" = "sha256-5+CU7z6FCUI2N8amMMaa2VBLI/LVQiRPaWA1Wkz6Q5A="; |
||||
}; |
||||
}; |
||||
nativeBuildInputs = myNativeBuildInputs; |
||||
buildInputs = myBuildInputs; |
||||
RUST_BACKTRACE = 1; |
||||
} |
||||
// attrs); |
||||
in rec { |
||||
packages = rec { |
||||
p2p-repo = myBuildRustPackage rec { |
||||
pname = "p2p-repo"; |
||||
buildAndTestSubdir = "./p2p-repo"; |
||||
}; |
||||
p2p-net = myBuildRustPackage rec { |
||||
pname = "p2p-net"; |
||||
buildAndTestSubdir = "./p2p-net"; |
||||
}; |
||||
p2p-broker = myBuildRustPackage rec { |
||||
pname = "p2p-broker"; |
||||
buildAndTestSubdir = "./p2p-broker"; |
||||
}; |
||||
p2p-client = myBuildRustPackage rec { |
||||
pname = "p2p-client"; |
||||
buildAndTestSubdir = "./p2p-client"; |
||||
}; |
||||
p2p-stores-lmdb = myBuildRustPackage rec { |
||||
pname = "stores-lmdb"; |
||||
buildAndTestSubdir = "./stores-lmdb"; |
||||
}; |
||||
ngcli = myBuildRustPackage rec { |
||||
pname = "ngcli"; |
||||
buildAndTestSubdir = "./ngcli"; |
||||
}; |
||||
ngd = myBuildRustPackage rec { |
||||
pname = "ngd"; |
||||
buildAndTestSubdir = "./ngd"; |
||||
}; |
||||
default = ngd; |
||||
}; |
||||
|
||||
apps = rec { |
||||
ngd = utils.lib.mkApp { |
||||
drv = packages.ngd; |
||||
exePath = "/bin/ngd"; |
||||
}; |
||||
ngcli = utils.lib.mkApp { |
||||
drv = packages.ngcli; |
||||
exePath = "/bin/ngcli"; |
||||
}; |
||||
default = ngd; |
||||
}; |
||||
}); |
||||
} |
@ -0,0 +1,20 @@ |
||||
[package] |
||||
name = "p2p-stores-lmdb" |
||||
version = "0.1.0" |
||||
edition = "2021" |
||||
license = "MIT/Apache-2.0" |
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||
|
||||
[dependencies] |
||||
p2p-repo = { path = "../p2p-repo" } |
||||
debug_print = "1.0.0" |
||||
serde = { version = "1.0.142", features = ["derive"] } |
||||
serde_bare = "0.5.0" |
||||
tempfile = "3" |
||||
hex = "0.4.3" |
||||
|
||||
[dependencies.rkv] |
||||
git = "https://git.nextgraph.org/NextGraph/rkv.git" |
||||
rev = "f04b03957b52ebc802e58438f430cd569e55a24d" |
||||
features = [ "lmdb" ] |
Loading…
Reference in new issue