gpio-tools: init in kernel 5.4

Linux provides some tools to interact with the gpiochip interface (which
replaces the deprecated sysfs GPIO interface). Expose these as a
package.

The tool has not changed much recently, so there is no need to package a
version for each kernel.
This commit is contained in:
Kai Wohlfahrt 2020-04-29 23:10:03 +01:00
parent d59cc0f9cd
commit 89d3a605e3
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,24 @@
{ lib, stdenv, linux }:
with lib;
assert versionAtLeast linux.version "4.6";
stdenv.mkDerivation {
name = "gpio-utils-${linux.version}";
inherit (linux) src makeFlags;
preConfigure = ''
cd tools/gpio
'';
separateDebugInfo = true;
installFlags = [ "install" "DESTDIR=$(out)" "bindir=/bin" ];
meta = {
description = "Linux tools to inspect the gpiochip interface";
maintainers = with stdenv.lib.maintainers; [ kwohlfahrt ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -26468,4 +26468,5 @@ in
vpsfree-client = callPackage ../tools/virtualization/vpsfree-client {};
gpio-utils = callPackage ../os-specific/linux/kernel/gpio-utils.nix { };
}