Merge pull request #261376 from secufoe/rshim-user-space-bfb-install

rshim-user-space: add bfb-install
This commit is contained in:
nikstur
2023-11-06 16:00:36 +01:00
committed by GitHub
+12 -1
View File
@@ -3,10 +3,14 @@
, fetchFromGitHub
, autoconf
, automake
, makeBinaryWrapper
, pkg-config
, pciutils
, libusb1
, fuse
, busybox
, pv
, withBfbInstall ? true
}:
stdenv.mkDerivation rec {
@@ -24,7 +28,7 @@ stdenv.mkDerivation rec {
autoconf
automake
pkg-config
];
] ++ lib.optionals withBfbInstall [ makeBinaryWrapper ];
buildInputs = [
pciutils
@@ -39,6 +43,13 @@ stdenv.mkDerivation rec {
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; {