system-tools: init
This commit is contained in:
parent
348efbceba
commit
7bd8c04003
|
@ -33,6 +33,7 @@
|
||||||
sfpi = callPackages ./pkgs/sfpi { };
|
sfpi = callPackages ./pkgs/sfpi { };
|
||||||
luwen = callPackage ./pkgs/luwen { };
|
luwen = callPackage ./pkgs/luwen { };
|
||||||
tools-common = callPackage ./pkgs/tools-common { };
|
tools-common = callPackage ./pkgs/tools-common { };
|
||||||
|
system-tools = callPackage ./pkgs/system-tools { };
|
||||||
flash = callPackage ./pkgs/flash {
|
flash = callPackage ./pkgs/flash {
|
||||||
pyluwen = self.luwen.pyluwen_0_1;
|
pyluwen = self.luwen.pyluwen_0_1;
|
||||||
};
|
};
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
luwen = scope.luwen.luwen;
|
luwen = scope.luwen.luwen;
|
||||||
pyluwen = scope.luwen.pyluwen;
|
pyluwen = scope.luwen.pyluwen;
|
||||||
tools-common = scope.tools-common;
|
tools-common = scope.tools-common;
|
||||||
|
system-tools = scope.system-tools;
|
||||||
flash = scope.flash;
|
flash = scope.flash;
|
||||||
umd = scope.umd;
|
umd = scope.umd;
|
||||||
metal = scope.metal;
|
metal = scope.metal;
|
||||||
|
|
57
pkgs/system-tools/default.nix
Normal file
57
pkgs/system-tools/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
makeWrapper,
|
||||||
|
bash,
|
||||||
|
pciutils,
|
||||||
|
}:
|
||||||
|
|
||||||
|
# NOTE: We might not use these files if we end up doing the things it does in nix instead if possible.
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "tt-system-tools";
|
||||||
|
version = "unstable-2024-10-11";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "tenstorrent";
|
||||||
|
repo = "tt-system-tools";
|
||||||
|
rev = "29ba4dc6049eef3cee4314c53720417823ffc667";
|
||||||
|
hash = "sha256-1Z6I5LAfOdNrTSBm49LyBGkmlhgfXKsAxA867rvDiIE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
buildInputs = [ bash ];
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -Dm444 -t $out/lib/systemd/system/ "tenstorrent-hugepages.service"
|
||||||
|
install -Dm444 -t $out/lib/systemd/system/ 'dev-hugepages\x2d1G.mount'
|
||||||
|
install -Dm555 -t $out/libexec/ "hugepages-setup.sh"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
substituteInPlace "$out/lib/systemd/system/tenstorrent-hugepages.service" \
|
||||||
|
--replace-fail "/opt/tenstorrent/bin/hugepages-setup.sh" "$out/libexec/hugepages-setup.sh"
|
||||||
|
|
||||||
|
wrapProgram "$out/libexec/hugepages-setup.sh" \
|
||||||
|
--prefix PATH : ${
|
||||||
|
lib.makeBinPath [
|
||||||
|
pciutils # for lspci
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/tenstorrent/tt-system-tools";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue