Public source sync 06ad9c949dc7
Source commit: 06ad9c949dc7aece0883315a3b3c3133df98f794 Public tree identity: sha256:deb98e60f26cb4942e2bc1972601259d4015fd3a945eac94d60e115b5823bbdb
This commit is contained in:
parent
fd41e0ee3b
commit
a6ab33d161
8 changed files with 115 additions and 20 deletions
65
packages.nix
Normal file
65
packages.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue