diff options
author | Felix Singer <felixsinger@posteo.net> | 2021-06-26 03:37:52 +0200 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2021-06-30 03:43:35 +0200 |
commit | b7a2309786b75989fb31816439f7e52a31cc64b3 (patch) | |
tree | 6602920b3c4ac96b9e4e62601e21501eb49acc39 /pkgs/tools | |
parent | e85975942742a3728226ac22a3415f2355bfc897 (diff) |
flashrom: Install udev-rules file
Add the udev-rules file from flashrom source to the out directory. The file contains rules for programmers used by flashrom. Members of the `flashrom` system group are allowed to access these devices. Also, add a module for installing flashrom and adding flashrom to udev packages. The module can be used by setting `programs.flashrom.enable` to `true`. Signed-off-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/flashrom/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/misc/flashrom/default.nix b/pkgs/tools/misc/flashrom/default.nix index 66a8b213403c8..07a2d02b0b2a3 100644 --- a/pkgs/tools/misc/flashrom/default.nix +++ b/pkgs/tools/misc/flashrom/default.nix @@ -19,11 +19,17 @@ stdenv.mkDerivation rec { sha256 = "0ax4kqnh7kd3z120ypgp73qy1knz47l6qxsqzrfkd97mh5cdky71"; }; + postPatch = '' + substituteInPlace util/z60_flashrom.rules \ + --replace "plugdev" "flashrom" + ''; + # Meson build doesn't build and install manpage. Only Makefile can. # Build manpage from source directory. Here we're inside the ./build subdirectory postInstall = '' make flashrom.8 -C .. installManPage ../flashrom.8 + install -Dm644 ../util/z60_flashrom.rules $out/etc/udev/rules.d/flashrom.rules ''; mesonFlags = lib.optionals stdenv.isAarch64 [ "-Dpciutils=false" ]; |