Source commit: 06ad9c949dc7aece0883315a3b3c3133df98f794 Public tree identity: sha256:deb98e60f26cb4942e2bc1972601259d4015fd3a945eac94d60e115b5823bbdb
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{ pkgs, self }:
|
|
let
|
|
clusterflux-tools = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "clusterflux-tools";
|
|
version = "0.1.0";
|
|
src = self;
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
nativeBuildInputs = [
|
|
pkgs.git
|
|
pkgs.lld
|
|
pkgs.makeWrapper
|
|
];
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"clusterflux-cli"
|
|
"--package"
|
|
"clusterflux-node"
|
|
"--package"
|
|
"clusterflux-coordinator"
|
|
"--package"
|
|
"clusterflux-dap"
|
|
];
|
|
cargoTestFlags = [
|
|
"--package"
|
|
"clusterflux-cli"
|
|
"--package"
|
|
"clusterflux-node"
|
|
"--package"
|
|
"clusterflux-coordinator"
|
|
"--package"
|
|
"clusterflux-dap"
|
|
];
|
|
NIX_BUILD_CORES = "2";
|
|
RUST_MIN_STACK = "1073741824";
|
|
postInstall = ''
|
|
test -x "$out/bin/clusterflux"
|
|
test -x "$out/bin/clusterflux-node"
|
|
test -x "$out/bin/clusterflux-coordinator"
|
|
test -x "$out/bin/clusterflux-debug-dap"
|
|
'';
|
|
postFixup =
|
|
let
|
|
runtimePath = pkgs.lib.makeBinPath [
|
|
pkgs.cargo
|
|
pkgs.git
|
|
pkgs.lld
|
|
pkgs.rustc
|
|
];
|
|
in
|
|
''
|
|
wrapProgram "$out/bin/clusterflux" --prefix PATH : ${runtimePath}
|
|
wrapProgram "$out/bin/clusterflux-node" --prefix PATH : ${runtimePath}
|
|
wrapProgram "$out/bin/clusterflux-debug-dap" --prefix PATH : ${runtimePath}
|
|
'';
|
|
meta = {
|
|
description = "Clusterflux CLI, node, coordinator, and debugger adapter";
|
|
mainProgram = "clusterflux";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
inherit clusterflux-tools;
|
|
clusterflux = clusterflux-tools;
|
|
default = clusterflux-tools;
|
|
}
|