18 stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
25 rev = "libgphoto2-${builtins.replaceStrings [ "." ] [ "_" ] version}-release";
26 sha256 = "sha256-UmyDKEaPP9VJqi8f+y6JZcTlQomhMTN+/C//ODYx6/w=";
29 depsBuildBuild = [ pkg-config ];
47 # These are mentioned in the Requires line of libgphoto's pkg-config file.
48 propagatedBuildInputs = [ libexif ];
50 hardeningDisable = [ "format" ];
55 if stdenv.buildPlatform == stdenv.hostPlatform then
58 buildPackages.libgphoto2;
61 mkdir -p $out/lib/udev/{rules.d,hwdb.d}
62 ${executablePrefix}/lib/libgphoto2/print-camera-list \
63 udev-rules version 201 group camera \
64 >$out/lib/udev/rules.d/40-libgphoto2.rules
65 ${executablePrefix}/lib/libgphoto2/print-camera-list \
66 hwdb version 201 group camera \
67 >$out/lib/udev/hwdb.d/20-gphoto.hwdb
71 homepage = "http://www.gphoto.org/proj/libgphoto2/";
72 description = "A library for accessing digital cameras";
74 This is the library backend for gphoto2. It contains the code for PTP,
75 MTP, and other vendor specific protocols for controlling and transferring data
78 # XXX: the homepage claims LGPL, but several src files are lgpl21Plus
79 license = lib.licenses.lgpl21Plus;
80 platforms = with lib.platforms; unix;
81 maintainers = with lib.maintainers; [ jcumming ];