mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 16:11:22 +00:00
Merge #170284: staging-next-21.11: iteration 11
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{ lib, fetchFromGitHub }:
|
||||
rec {
|
||||
version = "8.2.4186";
|
||||
version = "8.2.4816";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim";
|
||||
repo = "vim";
|
||||
rev = "v${version}";
|
||||
sha256 = "0g276mbmq69z7c4kgj59r0azxmx9ih2sd8v83dx2gfph6wgw65ph";
|
||||
sha256 = "1lgqr3ki50hwkz4vhdyaryirrs99qq4kgkhmpx7ygvn6aj2wapg5";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -1,47 +1,71 @@
|
||||
{ lib, stdenv, fetchurl, pkg-config, meson, ninja
|
||||
, libevdev, mtdev, udev, libwacom
|
||||
, documentationSupport ? false, doxygen, graphviz # Documentation
|
||||
, eventGUISupport ? false, cairo, glib, gtk3 # GUI event viewer support
|
||||
, testsSupport ? false, check, valgrind, python3
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, 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 = if documentationSupport then
|
||||
python3.pkgs.sphinx.overrideAttrs (super: {
|
||||
propagatedBuildInputs = super.propagatedBuildInputs ++ (with python3.pkgs; [ recommonmark sphinx_rtd_theme ]);
|
||||
|
||||
postFixup = super.postFixup or "" + ''
|
||||
# Do not propagate Python
|
||||
rm $out/nix-support/propagated-build-inputs
|
||||
'';
|
||||
})
|
||||
else null;
|
||||
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.19.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.freedesktop.org/software/libinput/libinput-${version}.tar.xz";
|
||||
sha256 = "sha256-C9z1sXg7c3hUt68coi32e8Nqb+fJz6cfAekUn5IgRG0=";
|
||||
};
|
||||
version = "1.19.4";
|
||||
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
|
||||
mesonFlags = [
|
||||
(mkFlag documentationSupport "documentation")
|
||||
(mkFlag eventGUISupport "debug-gui")
|
||||
(mkFlag testsSupport "tests")
|
||||
"--sysconfdir=/etc"
|
||||
"--libexecdir=${placeholder "bin"}/libexec"
|
||||
src = fetchurl {
|
||||
url = "https://www.freedesktop.org/software/libinput/libinput-${version}.tar.xz";
|
||||
sha256 = "sha256-/zOlcLWpNsgebAg4moWBwmZTEdAmzj0iXIjQnEn5tEA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./udev-absolute-path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config meson ninja ]
|
||||
++ lib.optionals documentationSupport [ doxygen graphviz sphinx-build ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
] ++ lib.optionals documentationSupport [
|
||||
doxygen
|
||||
graphviz
|
||||
sphinx-build
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libevdev
|
||||
@@ -53,20 +77,34 @@ stdenv.mkDerivation rec {
|
||||
pyyaml
|
||||
setuptools
|
||||
]))
|
||||
] ++ lib.optionals eventGUISupport [ cairo glib gtk3 ];
|
||||
] ++ lib.optionals eventGUISupport [
|
||||
# GUI event viewer
|
||||
cairo
|
||||
glib
|
||||
gtk3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
udev
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
check
|
||||
valgrind
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ udev ];
|
||||
mesonFlags = [
|
||||
(mkFlag documentationSupport "documentation")
|
||||
(mkFlag eventGUISupport "debug-gui")
|
||||
(mkFlag testsSupport "tests")
|
||||
"--sysconfdir=/etc"
|
||||
"--libexecdir=${placeholder "bin"}/libexec"
|
||||
];
|
||||
|
||||
patches = [ ./udev-absolute-path.patch ];
|
||||
doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
tools/helper-copy-and-exec-from-tmp.sh \
|
||||
test/symbols-leak-test \
|
||||
test/check-leftover-udev-rules.sh \
|
||||
test/helper-copy-and-exec-from-tmp.sh
|
||||
@@ -75,17 +113,15 @@ stdenv.mkDerivation rec {
|
||||
sed -i "/install_subdir('libinput', install_dir : dir_etc)/d" meson.build
|
||||
'';
|
||||
|
||||
doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
|
||||
passthru.tests = {
|
||||
libinput-module = nixosTests.libinput;
|
||||
};
|
||||
|
||||
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 ];
|
||||
homepage = "https://www.freedesktop.org/wiki/Software/libinput/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ codyopel ] ++ teams.freedesktop.members;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user