Unverified Commit a19e8471 authored by nikstur's avatar nikstur Committed by GitHub
Browse files

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

rshim-user-space: add bfb-install
parents f879f6a4 271b097d
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -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; {