nixpkgs/pkgs/tools/misc/rshim-user-space/default.nix
Markus Theil 936ac723b4 rshim-user-space: 2.0.32 -> 2.1.5
Notable changes include:
- more robust timeouts
- better BlueField 3 support
- better detect install finish in bfb-install with BMC present
- loose less log log messages with CLEAR_ON_READ

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-10-20 13:02:06 +02:00

74 lines
1.7 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, autoconf
, automake
, makeBinaryWrapper
, pkg-config
, pciutils
, libusb1
, fuse
, busybox
, pv
, withBfbInstall ? true
}:
stdenv.mkDerivation rec {
pname = "rshim-user-space";
version = "2.1.5";
src = fetchFromGitHub {
owner = "Mellanox";
repo = pname;
rev = "rshim-${version}";
hash = "sha256-moU6XxBVSAZiiR/usFfxse2CHk6+003Jb9t62szk1fk=";
};
nativeBuildInputs = [
autoconf
automake
pkg-config
] ++ lib.optionals withBfbInstall [ makeBinaryWrapper ];
buildInputs = [
pciutils
libusb1
fuse
];
prePatch = ''
patchShebangs scripts/bfb-install
'';
strictDeps = true;
preConfigure = "./bootstrap.sh";
installPhase = ''
mkdir -p "$out"/bin
cp -a src/rshim "$out"/bin/
'' + lib.optionalString withBfbInstall ''
cp -a scripts/bfb-install "$out"/bin/
'';
postFixup = lib.optionalString withBfbInstall ''
wrapProgram $out/bin/bfb-install \
--set PATH ${lib.makeBinPath [ busybox pv ]}
'';
meta = with lib; {
description = "user-space rshim driver for the BlueField SoC";
longDescription = ''
The rshim driver provides a way to access the rshim resources on the
BlueField target from external host machine. The current version
implements device files for boot image push and virtual console access.
It also creates virtual network interface to connect to the BlueField
target and provides a way to access the internal rshim registers.
'';
homepage = "https://github.com/Mellanox/rshim-user-space";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ nikstur ];
};
}