uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
137
pkgs/development/libraries/libinput/default.nix
Normal file
137
pkgs/development/libraries/libinput/default.nix
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, gitUpdater
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, libevdev
|
||||
, mtdev
|
||||
, udev
|
||||
, libwacom
|
||||
, documentationSupport ? false
|
||||
, doxygen
|
||||
, graphviz
|
||||
, runCommand
|
||||
, eventGUISupport ? false
|
||||
, cairo
|
||||
, glib
|
||||
, gtk3
|
||||
, testsSupport ? false
|
||||
, check
|
||||
, valgrind
|
||||
, python3
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
let
|
||||
mkFlag = optSet: flag: "-D${flag}=${lib.boolToString optSet}";
|
||||
|
||||
sphinx-build =
|
||||
let
|
||||
env = python3.withPackages (pp: with pp; [
|
||||
sphinx
|
||||
recommonmark
|
||||
sphinx_rtd_theme
|
||||
]);
|
||||
in
|
||||
# Expose only the sphinx-build binary to avoid contaminating
|
||||
# everything with Sphinx’s Python environment.
|
||||
runCommand "sphinx-build" { } ''
|
||||
mkdir -p "$out/bin"
|
||||
ln -s "${env}/bin/sphinx-build" "$out/bin"
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libinput";
|
||||
version = "1.20.1";
|
||||
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "libinput";
|
||||
repo = "libinput";
|
||||
rev = version;
|
||||
sha256 = "eujnabUaeNEJC/tPPhwcNS9sqDIorF52RjfqKBotbmc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./udev-absolute-path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
] ++ lib.optionals documentationSupport [
|
||||
doxygen
|
||||
graphviz
|
||||
sphinx-build
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libevdev
|
||||
mtdev
|
||||
libwacom
|
||||
(python3.withPackages (pp: with pp; [
|
||||
pp.libevdev # already in scope
|
||||
pyudev
|
||||
pyyaml
|
||||
setuptools
|
||||
]))
|
||||
] ++ lib.optionals eventGUISupport [
|
||||
# GUI event viewer
|
||||
cairo
|
||||
glib
|
||||
gtk3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
udev
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
check
|
||||
valgrind
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
(mkFlag documentationSupport "documentation")
|
||||
(mkFlag eventGUISupport "debug-gui")
|
||||
(mkFlag testsSupport "tests")
|
||||
"--sysconfdir=/etc"
|
||||
"--libexecdir=${placeholder "bin"}/libexec"
|
||||
];
|
||||
|
||||
doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
test/symbols-leak-test \
|
||||
test/check-leftover-udev-rules.sh \
|
||||
test/helper-copy-and-exec-from-tmp.sh
|
||||
|
||||
# Don't create an empty /etc directory.
|
||||
sed -i "/install_subdir('libinput', install_dir : dir_etc)/d" meson.build
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
libinput-module = nixosTests.libinput;
|
||||
};
|
||||
updateScript = gitUpdater {
|
||||
inherit pname version;
|
||||
patchlevel-unstable = true;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
|
||||
homepage = "https://www.freedesktop.org/wiki/Software/libinput/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ codyopel ] ++ teams.freedesktop.members;
|
||||
};
|
||||
}
|
||||
11
pkgs/development/libraries/libinput/udev-absolute-path.patch
Normal file
11
pkgs/development/libraries/libinput/udev-absolute-path.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -100,7 +100,7 @@
|
||||
args : model_quirks)
|
||||
|
||||
udev_rules_config = configuration_data()
|
||||
-udev_rules_config.set('UDEV_TEST_PATH', '')
|
||||
+udev_rules_config.set('UDEV_TEST_PATH', dir_udev + '/')
|
||||
configure_file(input : 'udev/80-libinput-device-groups.rules.in',
|
||||
output : '80-libinput-device-groups.rules',
|
||||
install : true,
|
||||
Loading…
Add table
Add a link
Reference in a new issue