mirror of
https://github.com/lndk-org/lndk.git
synced 2026-08-13 12:33:05 +02:00
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ self, crane, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
config,
|
|
pkgs,
|
|
system,
|
|
...
|
|
}:
|
|
let
|
|
rustToolchainFile = builtins.fromTOML (builtins.readFile ../rust-toolchain.toml);
|
|
rustChannel = rustToolchainFile.toolchain.channel;
|
|
bitcoinPkgs = import ./bitcoin.nix { inherit system pkgs; };
|
|
in
|
|
{
|
|
devShells = {
|
|
default = pkgs.mkShell {
|
|
packages = [
|
|
pkgs.rust-bin.stable.${rustChannel}.rust-analyzer
|
|
bitcoinPkgs.bitcoind
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config
|
|
protobuf
|
|
openssl
|
|
openssl.dev
|
|
rust-bin.stable.${rustChannel}.default
|
|
go
|
|
git
|
|
just
|
|
];
|
|
|
|
shellHook = ''
|
|
echo "LNDK development environment loaded with Rust toolchain $(rustc --version)"
|
|
export BITCOIND_EXE="${bitcoinPkgs.bitcoind}/bin/bitcoind"
|
|
export BITCOIND_SKIP_DOWNLOAD="TRUE"
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|