anchor.diff:      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.
  
positive.code: { lib, stdenv, fetchFromGitHub, buildPackages
  , autoreconfHook, pkg-config, gettext
  , libusb1
  , libtool
  , libexif
  , libgphoto2
  , libjpeg
  }:
  
  stdenv.mkDerivation rec {
  
negative.code: 
    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
      '';
  
    meta = {
      homepage = "http://www.gphoto.org/proj/libgphoto2/";
  