unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] distro: Add Libusb.
@ 2012-12-17 19:52 Nikita Karetnikov
  2012-12-17 23:44 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Nikita Karetnikov @ 2012-12-17 19:52 UTC (permalink / raw)
  To: bug-guix

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Hi,

Build succeeded with several warnings:

/tmp/nix-build-libusb-1.0.9.drv-0/libusb-1.0.9/libtool: line 1113:
ldconfig: command not found
strip:/nix/store/1x3fy2fs9p4k80asqcasji82lhhfb5hp-libusb-1.0.9/lib/libusb-1.0.la:
File format not recognized
strip:/nix/store/1x3fy2fs9p4k80asqcasji82lhhfb5hp-libusb-1.0.9/lib/pkgconfig/libusb-1.0.pc:
File format not recognized

We've already discussed the strip-related ones, [1] but what about the
first one?

I was using the following settings.

nix.conf:

build-users-group = nixbld
build-use-chroot = true
build-chroot-dirs = /dev /proc /bin

or

# ./pre-inst-env guix-daemon --build-users-group=nixbld \
> -C 0 --chroot-directory=/bin &

Can I commit it?

Nikita

[1] https://lists.gnu.org/archive/html/bug-guix/2012-12/msg00049.html

[-- Attachment #2: 0001-distro-Add-Libusb.patch --]
[-- Type: text/x-diff, Size: 2760 bytes --]

From 5ea12e289bd0b2e2302c0432b972b5f6a6d54e5f Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Mon, 17 Dec 2012 19:42:10 +0000
Subject: [PATCH] distro: Add Libusb.

* distro/packages/libusb.scm: New file.
* Makefile.am (MODULES): Add it.
---
 Makefile.am                |    1 +
 distro/packages/libusb.scm |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 distro/packages/libusb.scm

diff --git a/Makefile.am b/Makefile.am
index 42832db..3d16a16 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ MODULES =					\
   distro/packages/libffi.scm			\
   distro/packages/libsigsegv.scm		\
   distro/packages/libunistring.scm		\
+  distro/packages/libusb.scm			\
   distro/packages/linux.scm			\
   distro/packages/lout.scm			\
   distro/packages/lsh.scm			\
diff --git a/distro/packages/libusb.scm b/distro/packages/libusb.scm
new file mode 100644
index 0000000..8e156e8
--- /dev/null
+++ b/distro/packages/libusb.scm
@@ -0,0 +1,44 @@
+;;; Guix --- Nix package management from Guile.         -*- coding: utf-8 -*-
+;;; Copyright (C) 2012 Nikita Karetnikov <nikita@karetnikov.org>
+;;;
+;;; This file is part of Guix.
+;;;
+;;; Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (distro packages libusb)
+  #:use-module (distro)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public libusb
+  (package
+    (name "libusb")
+    (version "1.0.9")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://sourceforge/libusb/libusb-1.0/"
+                          "libusb-" version "/libusb-" version ".tar.bz2"))
+      (sha256
+       (base32
+        "16sz34ix6hw2wwl3kqx6rf26fg210iryr68wc439dc065pffw879"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.libusb.org")
+    (synopsis "Libusb is a user-space USB library")
+    (description
+     "Libusb is a library that gives applications easy access to USB
+devices on various operating systems.")
+    (license lgpl2.1+)))
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] distro: Add Libusb.
  2012-12-17 19:52 [PATCH] distro: Add Libusb Nikita Karetnikov
@ 2012-12-17 23:44 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2012-12-17 23:44 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita.karetnikov@gmail.com> skribis:

> /tmp/nix-build-libusb-1.0.9.drv-0/libusb-1.0.9/libtool: line 1113:
> ldconfig: command not found

Yes, we don’t use ldconfig(1).  This warning is harmless.

> strip:/nix/store/1x3fy2fs9p4k80asqcasji82lhhfb5hp-libusb-1.0.9/lib/libusb-1.0.la:
> File format not recognized
> strip:/nix/store/1x3fy2fs9p4k80asqcasji82lhhfb5hp-libusb-1.0.9/lib/pkgconfig/libusb-1.0.pc:
> File format not recognized

Harmless too: strip just warns about non-ELF files it is passed.

> I was using the following settings.
>
> nix.conf:
>
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc /bin
>
> or
>
> # ./pre-inst-env guix-daemon --build-users-group=nixbld \
>> -C 0 --chroot-directory=/bin &

Good.

> Can I commit it?

Yes, please!  One minor thing below:

> +    (synopsis "Libusb is a user-space USB library")

The synopsis should not be a sentence; instead, it should be a concise
phrase.  So I’d replace “ is” by “, ” here.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-17 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 19:52 [PATCH] distro: Add Libusb Nikita Karetnikov
2012-12-17 23:44 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).