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,12 +49,15 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
postInstall = let postInstall =
executablePrefix = if stdenv.buildPlatform == stdenv.hostPlatform then let
executablePrefix =
if stdenv.buildPlatform == stdenv.hostPlatform then
"$out" "$out"
else else
buildPackages.libgphoto2; buildPackages.libgphoto2;
in '' in
''
mkdir -p $out/lib/udev/rules.d mkdir -p $out/lib/udev/rules.d
${executablePrefix}/lib/libgphoto2/print-camera-list \ ${executablePrefix}/lib/libgphoto2/print-camera-list \
udev-rules version 175 group camera \ udev-rules version 175 group camera \