From 9d66d3c7f87e10c83d74b7f3d6b541360e04cb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20F=C3=B6rster?= <135814375+secufoe@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:08:18 +0200 Subject: [PATCH 1/2] rshim-user-space: add bfb-install Make bfb-install script available for convenient bootstream installation including log output and progress feedback. --- pkgs/tools/misc/rshim-user-space/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/misc/rshim-user-space/default.nix b/pkgs/tools/misc/rshim-user-space/default.nix index 79b795f869a3..4f1bc510dd80 100644 --- a/pkgs/tools/misc/rshim-user-space/default.nix +++ b/pkgs/tools/misc/rshim-user-space/default.nix @@ -3,10 +3,13 @@ , fetchFromGitHub , autoconf , automake +, makeBinaryWrapper , pkg-config , pciutils , libusb1 , fuse +, busybox +, pv }: stdenv.mkDerivation rec { @@ -24,12 +27,15 @@ stdenv.mkDerivation rec { autoconf automake pkg-config + makeBinaryWrapper ]; buildInputs = [ pciutils libusb1 fuse + busybox + pv ]; strictDeps = true; @@ -39,6 +45,12 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p "$out"/bin cp -a src/rshim "$out"/bin/ + cp -a scripts/bfb-install "$out"/bin/ + ''; + + postFixup = '' + wrapProgram $out/bin/bfb-install \ + --set PATH ${lib.makeBinPath [ busybox pv ]} ''; meta = with lib; { From 271b097d249399613fd9a3edfa6eb69e9db43023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20F=C3=B6rster?= <135814375+secufoe@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:45:08 +0100 Subject: [PATCH 2/2] rshim-user-space: make bfb-install optional --- pkgs/tools/misc/rshim-user-space/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/rshim-user-space/default.nix b/pkgs/tools/misc/rshim-user-space/default.nix index 4f1bc510dd80..25550f45c4fa 100644 --- a/pkgs/tools/misc/rshim-user-space/default.nix +++ b/pkgs/tools/misc/rshim-user-space/default.nix @@ -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 ]} '';