summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authornikstur <nikstur@outlook.com>2023-11-06 16:00:36 +0100
committerGitHub <noreply@github.com>2023-11-06 16:00:36 +0100
commita19e84717c3ea0a0d8c646e5ee351aea3bedd609 (patch)
treec12f20c8cfad408ea63dcb4b29d87056b6d80427 /pkgs/tools/misc
parentf879f6a492a92a29e5e173d74d803dce471e84cc (diff)
parent271b097d249399613fd9a3edfa6eb69e9db43023 (diff)
downloadnixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar.gz
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar.bz2
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar.lz
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar.xz
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.tar.zst
nixpkgs-a19e84717c3ea0a0d8c646e5ee351aea3bedd609.zip
Merge pull request #261376 from secufoe/rshim-user-space-bfb-install
rshim-user-space: add bfb-install
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/rshim-user-space/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/tools/misc/rshim-user-space/default.nix b/pkgs/tools/misc/rshim-user-space/default.nix
index 79b795f869a..25550f45c4f 100644
--- a/pkgs/tools/misc/rshim-user-space/default.nix
+++ b/pkgs/tools/misc/rshim-user-space/default.nix
@@ -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; {