bond and nix shell

This commit is contained in:
f321x
2024-06-09 21:44:55 +02:00
parent c33c09fd8d
commit 3ecee23550
3 changed files with 34 additions and 3 deletions

16
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/<executable file>",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}

View File

@ -1,4 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs.lib) makeLibraryPath;
inherit (pkgs.lib) fileContents;
inherit (pkgs) stdenv;
in
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
pkg-config
@ -9,7 +15,17 @@
rustfmt
gcc
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
NIX_LD_LIBRARY_PATH = makeLibraryPath [
stdenv.cc.cc
pkgs.openssl
pkgs.zlib
pkgs.pkg-config
pkgs.gcc
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
NIX_LD = fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}
# For VSCode and Rust Analyzer use the Extension "Nix Environment Selector"

View File

@ -21,7 +21,6 @@ pub struct Bond {
}
impl Bond {
println!("assembling bond transaction");
pub fn assemble(wallet: &Wallet<MemoryDatabase>,
bond_target: &OfferCreationResponse,
trader_input: &TraderSettings) -> Result<PartiallySignedTransaction> {