From 25b7b8895c72184c0a251c47d584d1e9f5af754a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 16 Nov 2020 22:40:29 +0100 Subject: [PATCH] libgphoto: Switch to Github, allow building from repo. Github is where upstream's development happens now, and building from repo makes adding patches and overriding the commit easier. Also use pname+version, see #103997. --- .../libraries/libgphoto2/default.nix | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix index 95bb24ecb58..93c98bb1f12 100644 --- a/pkgs/development/libraries/libgphoto2/default.nix +++ b/pkgs/development/libraries/libgphoto2/default.nix @@ -1,19 +1,34 @@ -{ stdenv, fetchFromGitHub, pkgconfig, libusb1, libtool, libexif, libjpeg, gettext, autoreconfHook }: +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gettext +, libusb1 +, libtool +, libexif +, libjpeg +}: stdenv.mkDerivation rec { - name = "libgphoto2-${meta.version}"; + pname = "libgphoto2"; + version = "2.5.23"; src = fetchFromGitHub { owner = "gphoto"; repo = "libgphoto2"; - rev = meta.tag; + rev = "libgphoto2-${builtins.replaceStrings [ "." ] [ "_" ] version}-release"; sha256 = "1sc2ycx11khf0qzp1cqxxx1qymv6bjfbkx3vvbwz6wnbyvsigxz2"; }; patches = []; - nativeBuildInputs = [ pkgconfig gettext autoreconfHook ]; - buildInputs = [ libtool libjpeg libusb1 ]; + nativeBuildInputs = [ + autoreconfHook + pkgconfig + gettext + libtool + ]; + + buildInputs = [ + libjpeg + libusb1 + ]; # These are mentioned in the Requires line of libgphoto's pkg-config file. propagatedBuildInputs = [ libexif ]; @@ -33,8 +48,6 @@ stdenv.mkDerivation rec { MTP, and other vendor specific protocols for controlling and transferring data from digital cameras. ''; - version = "2.5.23"; - tag = "libgphoto2-2_5_23-release"; # XXX: the homepage claims LGPL, but several src files are lgpl21Plus license = stdenv.lib.licenses.lgpl21Plus; platforms = with stdenv.lib.platforms; unix;