Commit 271b097d authored by Niklas Förster's avatar Niklas Förster
Browse files

rshim-user-space: make bfb-install optional

parent 9d66d3c7
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
, fuse
, busybox
, pv
, withBfbInstall ? true
}:

stdenv.mkDerivation rec {
@@ -27,15 +28,12 @@ stdenv.mkDerivation rec {
    autoconf
    automake
    pkg-config
    makeBinaryWrapper
  ];
  ] ++ lib.optionals withBfbInstall [ makeBinaryWrapper ];

  buildInputs = [
    pciutils
    libusb1
    fuse
    busybox
    pv
  ];

  strictDeps = true;
@@ -45,10 +43,11 @@ 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 = ''
  postFixup = lib.optionalString withBfbInstall ''
    wrapProgram $out/bin/bfb-install \
      --set PATH ${lib.makeBinPath [ busybox pv ]}
  '';