-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
input-utils: init at 1.3 #40042
input-utils: init at 1.3 #40042
Conversation
|
||
prePatch = '' | ||
# Adds full path to "linux/input.h" | ||
substituteInPlace ./emulate-key.c --replace "linux/input.h" "${stdenv.glibc.dev}/include/linux/input.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two shouldn’t be necessary. Glibc is already in the include path.
substituteInPlace ./emulate-key.c --replace "linux/input.h" "${stdenv.glibc.dev}/include/linux/input.h" | ||
substituteInPlace ./input.h --replace "linux/input.h" "${stdenv.glibc.dev}/include/linux/input.h" | ||
# Use proper include path for kernel include files. | ||
substituteInPlace ./name.sh --replace "/usr/include/linux/" "${stdenv.glibc.dev}/include/linux/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you have an assertion for stdenv without glibc. Just do something like:
assert stdenv ? glibc;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know what to do for the .../include/linux/
folder, looked around nixpkgs and found two patterns:
linuxHeaders
stdenv.glibc.dev
Because of what you're saying, I now think that linuxHeaders
is the better alternative since it would work without glibc, am I right? (I assumed so in my last commit).
|
||
makeFlags = [ | ||
"prefix=$(out)" | ||
"STRIP=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think STRIP=strip is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a bit of ag
to grep around, I see:
- 6
STRIP=
(including two from packages by the same upstream author, fbida, amtterm) - 5
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
(ghc) - 2
STRIP=-s
- 1
STRIP=${stdenv.cc.bintools.targetPrefix}strip
- 1
STRIP=strip
- 1 replacement of
STRIP=
by#STRIP=
And other misc:
- -DCMAKE_STRIP=$(command -v $crossConfig-strip)
Using STRIP=strip
leads to:
installing
install flags: install SHELL=/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash prefix=\$\(out\) STRIP=strip
install -d /nix/store/iw7g8gmal9bafsnsi5qxgp238chz8y3h-input-utils-1.3/bin /nix/store/iw7g8gmal9bafsnsi5qxgp238chz8y3h-input-utils-1.3/share/man/man8
install strip lsinput input-events input-kbd input-send input-recv /nix/store/iw7g8gmal9bafsnsi5qxgp238chz8y3h-input-utils-1.3/bin
install: cannot stat 'strip': No such file or directory
make: *** [GNUmakefile:39: install] Error 1
After looking at the source, the mk/Variables.mk#n31 file explains it all. That STRIP variable isn't for the strip binary, but for an option for install
.
-s, --strip
strip symbol tables
The stdenv
sets the environment STRIP to strip
, which well, given it is used like install $STRIP
would try to install [./]strip
which doesn't exist.
The STRIP=
bit was taken (IIRC) from the debian package description, or the archlinux PKGBUILD (I let that package sit in my local overlay for 5 months!).
e11a022
to
4a2bf9c
Compare
Thanks for the review! |
Motivation for this change
Adds @kraxel's input, as input-utils, the name commonly used in other distributions.
This includes the
lsinput
utility (among others), which can be used to list information the different input devices found under/dev/input/
. This is useful e.g. when wanting to find the input device file for a joypad or for actkbd.Things done
build-use-sandbox
innix.conf
on non-NixOS)./result/bin/
)