about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-04-19 21:26:27 +0300
committerArtturin <Artturin@artturin.com>2023-04-19 22:15:23 +0300
commitb3970125b4275604cc5bdba9cae40258d98ad557 (patch)
tree7d84ada01618138525660285cd5a984c9c6aeced
parent7d9a498788cfbbb793bcacb8eb894a7bc44ceb92 (diff)
libgphoto2: update udev rules version
and add hwdb

https://github.com/gphoto/libgphoto2/blob/48d9bafe1fb9b8bd7485d554b1fec8a6a9bd3f71/packaging/generic/print-camera-list.c#L1407-L1416

paths from
https://github.com/gphoto/libgphoto2/blob/48d9bafe1fb9b8bd7485d554b1fec8a6a9bd3f71/packaging/generic/print-camera-list.c#L1426
and https://github.com/gphoto/libgphoto2/blob/48d9bafe1fb9b8bd7485d554b1fec8a6a9bd3f71/packaging/generic/print-camera-list.c#L1413

ref
https://github.com/archlinux/svntogit-packages/blob/acd9af4de4b07d4fcdb08142f7eb596ae75d81d2/trunk/PKGBUILD#L57
https://src.fedoraproject.org/rpms/libgphoto2/blob/rawhide/f/libgphoto2.spec#_105
-rw-r--r--pkgs/development/libraries/libgphoto2/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix
index cdb539272e19e..4f110db51add1 100644
--- a/pkgs/development/libraries/libgphoto2/default.nix
+++ b/pkgs/development/libraries/libgphoto2/default.nix
@@ -58,10 +58,13 @@ stdenv.mkDerivation rec {
           buildPackages.libgphoto2;
     in
     ''
-      mkdir -p $out/lib/udev/rules.d
+      mkdir -p $out/lib/udev/{rules.d,hwdb.d}
       ${executablePrefix}/lib/libgphoto2/print-camera-list \
-          udev-rules version 175 group camera \
-          >$out/lib/udev/rules.d/40-gphoto2.rules
+          udev-rules version 201 group camera \
+          >$out/lib/udev/rules.d/40-libgphoto2.rules
+      ${executablePrefix}/lib/libgphoto2/print-camera-list \
+          hwdb version 201 group camera \
+          >$out/lib/udev/hwdb.d/20-gphoto.hwdb
     '';
 
   meta = {