Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
75be6b7c | 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
e0477b73 | 4 | ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> |
3b48f78c | 5 | ;;; |
233e7676 | 6 | ;;; This file is part of GNU Guix. |
3b48f78c | 7 | ;;; |
233e7676 | 8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
3b48f78c NK |
9 | ;;; under the terms of the GNU General Public License as published by |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
233e7676 | 13 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
3b48f78c NK |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
3b48f78c | 20 | |
1ffa7090 | 21 | (define-module (gnu packages libusb) |
59a43334 | 22 | #:use-module (gnu packages) |
3b48f78c NK |
23 | #:use-module (guix licenses) |
24 | #:use-module (guix packages) | |
e0477b73 | 25 | #:use-module (guix utils) |
3b48f78c | 26 | #:use-module (guix download) |
75be6b7c AE |
27 | #:use-module (guix build-system gnu) |
28 | #:use-module (gnu packages gnupg) | |
034e0d50 | 29 | #:use-module (gnu packages linux) |
75be6b7c | 30 | #:use-module (gnu packages pkg-config)) |
3b48f78c NK |
31 | |
32 | (define-public libusb | |
33 | (package | |
34 | (name "libusb") | |
034e0d50 | 35 | (version "1.0.19") |
3b48f78c NK |
36 | (source |
37 | (origin | |
38 | (method url-fetch) | |
39 | (uri (string-append "mirror://sourceforge/libusb/libusb-1.0/" | |
40 | "libusb-" version "/libusb-" version ".tar.bz2")) | |
41 | (sha256 | |
42 | (base32 | |
034e0d50 | 43 | "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c")))) |
3b48f78c | 44 | (build-system gnu-build-system) |
034e0d50 LC |
45 | |
46 | ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on | |
47 | ;; libusb. | |
48 | (arguments `(#:configure-flags '("--disable-udev"))) | |
49 | ;; (inputs `(("eudev" ,eudev))) | |
50 | ||
3b48f78c | 51 | (home-page "http://www.libusb.org") |
35b9e423 | 52 | (synopsis "User-space USB library") |
3b48f78c NK |
53 | (description |
54 | "Libusb is a library that gives applications easy access to USB | |
55 | devices on various operating systems.") | |
75be6b7c AE |
56 | (license lgpl2.1+))) |
57 | ||
e0477b73 AW |
58 | (define-public libusb-compat |
59 | (package | |
60 | (name "libusb-compat") | |
61 | (version "0.1.5") | |
62 | (source | |
63 | (origin | |
64 | (method url-fetch) | |
65 | (uri (string-append "mirror://sourceforge/libusb/" | |
66 | name "-" (version-major+minor version) "/" | |
67 | name "-" version "/" | |
68 | name "-" version ".tar.bz2")) | |
69 | (sha256 | |
70 | (base32 | |
71 | "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0")))) | |
72 | (build-system gnu-build-system) | |
73 | (native-inputs | |
74 | `(("pkg-config" ,pkg-config))) | |
75 | (inputs | |
76 | `(("libusb" ,libusb))) | |
77 | (home-page "http://www.libusb.org") | |
78 | (synopsis "Compatibility shim for libusb") | |
79 | (description | |
80 | "Libusb-compat provides a shim allowing applications based on older | |
81 | version of libusb to run with newer libusb.") | |
82 | (license lgpl2.1+))) | |
83 | ||
75be6b7c AE |
84 | (define-public libmtp |
85 | (package | |
86 | (name "libmtp") | |
80601ec1 | 87 | (version "1.1.9") |
75be6b7c AE |
88 | (source (origin |
89 | (method url-fetch) | |
90 | (uri (string-append "mirror://sourceforge/libmtp/" version | |
91 | "/libmtp-" version ".tar.gz")) | |
92 | (sha256 | |
93 | (base32 | |
80601ec1 | 94 | "12dinqic0ljnhrwx3rc61jc7q24ybr0mckc2ya5kh1s1np0d7w93")))) |
75be6b7c AE |
95 | (build-system gnu-build-system) |
96 | (native-inputs | |
97 | `(("pkg-config" ,pkg-config))) | |
cff77d48 SB |
98 | (propagated-inputs |
99 | ;; libmtp.pc refers to all these. | |
75be6b7c AE |
100 | `(("libgcrypt" ,libgcrypt) |
101 | ("libusb" ,libusb))) | |
102 | (arguments | |
103 | `(#:configure-flags | |
104 | (list (string-append "--with-udev=" | |
105 | (assoc-ref %outputs "out") | |
106 | "/lib/udev")))) | |
107 | (home-page "http://libmtp.sourceforge.net/") | |
108 | (synopsis "Library implementing the Media Transfer Protocol") | |
109 | (description "Libmtp implements an MTP (Media Transfer Protocol) | |
110 | initiator, which means that it initiates MTP sessions with devices. The | |
111 | devices responding are known as MTP responders. Libmtp runs on devices | |
112 | with a USB host controller interface. It implements MTP Basic, which was | |
113 | proposed for standardization.") | |
114 | ;; COPYING contains lgpl2.1, while files headers give | |
115 | ;; "GNU Lesser General Public License as published by the Free Software | |
116 | ;; Foundation; either version 2 of the License, or (at your option) any | |
117 | ;; later version." | |
118 | (license lgpl2.1+))) |