New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usbutils: patch hashbang of lsusb.py #51312
Conversation
That might have been intentionally left out to not depend on python in our installation image. |
This sounds reasonable. However, is a separation between the system builds possible? Otherwise this program is kind of broken on most installations. |
There could be a python output where this script could be moved to. |
bed9444
to
0f539d4
Compare
Any updates? |
I would prefer splitting the output instead of having yet another build: diff --git a/pkgs/os-specific/linux/usbutils/default.nix b/pkgs/os-specific/linux/usbutils/default.nix
index d58c5a7e67c..1d6736b71fe 100644
--- a/pkgs/os-specific/linux/usbutils/default.nix
+++ b/pkgs/os-specific/linux/usbutils/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, substituteAll, autoreconfHook, pkgconfig, libusb1, hwdata }:
+{ stdenv, fetchurl, substituteAll, autoreconfHook, pkgconfig, libusb1, hwdata, python3 }:
stdenv.mkDerivation rec {
name = "usbutils-010";
@@ -16,7 +16,12 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
- buildInputs = [ libusb1 ];
+ buildInputs = [ libusb1 python3 ];
+ outputs = [ "out" "man" "python" ];
+
+ postInstall = ''
+ moveToOutput "bin/lsusb.py" "$python"
+ '';
meta = with stdenv.lib; {
homepage = http://www.linux-usb.org/; |
agree with @Mic92 , but maybe name output |
The other binary is also called |
0f539d4
to
4893aea
Compare
@Mic92: Please excuse my very long delay. I just updated this PR after read the multiple-output packages' section in the manual. |
Motivation for this change
The
lsusb.py
script in theusbutils
package is written in the Python3 programming language and requirespython3
being available in thePATH
. If one does not havepython3
installed, the script could not be executed.This PR changes the hashbang/shebang of this script to point to the
python3
interpreter.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)