nixpkgs/pkgs/os-specific/linux/kernel/gpio-utils.nix
Kai Wohlfahrt 89d3a605e3 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.
2020-05-04 15:02:55 +01:00

25 lines
506 B
Nix

{ 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;
};
}