libgphoto2: fix build of all camlibs

The camlibs `lumix` and `docupen` were excluded from compilation and
bundling due to the missing depdendencies.
This commit is contained in:
Francesco Zanini 2021-11-29 09:50:42 +01:00 committed by Alyssa Ross
parent 47fbfa2a57
commit ca09b01f37

View File

@ -1,10 +1,18 @@
{ lib, stdenv, fetchFromGitHub, buildPackages
, autoreconfHook, pkg-config, gettext
{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, autoreconfHook
, pkg-config
, gettext
, libusb1
, libtool
, libexif
, libgphoto2
, libjpeg
, curl
, libxml2
, gd
}:
stdenv.mkDerivation rec {
@ -24,12 +32,16 @@ stdenv.mkDerivation rec {
autoreconfHook
gettext
libtool
pkg-config
];
buildInputs = [
libjpeg
libtool # for libltdl
libusb1
curl
libxml2
gd
];
# These are mentioned in the Requires line of libgphoto's pkg-config file.
@ -37,17 +49,20 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
postInstall = let
executablePrefix = if stdenv.buildPlatform == stdenv.hostPlatform then
"$out"
else
buildPackages.libgphoto2;
in ''
mkdir -p $out/lib/udev/rules.d
${executablePrefix}/lib/libgphoto2/print-camera-list \
udev-rules version 175 group camera \
>$out/lib/udev/rules.d/40-gphoto2.rules
'';
postInstall =
let
executablePrefix =
if stdenv.buildPlatform == stdenv.hostPlatform then
"$out"
else
buildPackages.libgphoto2;
in
''
mkdir -p $out/lib/udev/rules.d
${executablePrefix}/lib/libgphoto2/print-camera-list \
udev-rules version 175 group camera \
>$out/lib/udev/rules.d/40-gphoto2.rules
'';
meta = {
homepage = "http://www.gphoto.org/proj/libgphoto2/";