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