projects/guix·blob python-team · refs

79 lines · 3.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015 Mark H Weaver <[email protected]>
4;;; Copyright © 2016, 2018, 2022 Efraim Flashner <[email protected]>
5;;; Copyright © 2016, 2026 Janneke Nieuwenhuizen <[email protected]>
6;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
7;;; Copyright © 2017 Eric Bavier <[email protected]>
8;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2018 Marius Bakke <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages libunistring)
27 #:use-module (guix licenses)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix gexp)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages base))
35
36(define-public libunistring
37 (package
38 (name "libunistring")
39 (version "1.3")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append
43 "mirror://gnu/libunistring/libunistring-"
44 version ".tar.xz"))
45 (sha256
46 (base32
47 "09wmas38i9fw7l3sv92xkbvy7idcl76ifhzv7l7ia98xhdn7higj"))))
48 (propagated-inputs (libiconv-if-needed))
49 (outputs '("out" "static"))
50 (build-system gnu-build-system)
51 (arguments
52 ;; Work around parallel build issue whereby C files may be compiled before
53 ;; config.h is built: see <http://hydra.gnu.org/build/59381/nixlog/2/raw> and
54 ;; <http://lists.openembedded.org/pipermail/openembedded-core/2012-April/059850.html>.
55 (list
56 #:parallel-build? #f
57 #:phases
58 #~(modify-phases %standard-phases
59 (add-after 'install 'move-static-library
60 (lambda* (#:key outputs #:allow-other-keys)
61 (with-directory-excursion (string-append #$output "/lib")
62 (install-file "libunistring.a"
63 (string-append #$output:static "/lib"))
64 (delete-file "libunistring.a"))))
65 #$@(if (target-mingw?)
66 #~((add-after 'unpack 'patch-tests/nanosleep.c
67 (lambda _
68 (substitute* "tests/nanosleep.c"
69 (("# define WIN32_LEAN_AND_MEAN" all)
70 (string-append "#define nanosleep nanosleep_native\n"
71 all))))))
72 #~()))))
73 (synopsis "C library for manipulating Unicode strings")
74 (description
75 "GNU libunistring is a library providing functions to manipulate
76Unicode strings and for manipulating C strings according to the Unicode
77standard.")
78 (home-page "https://www.gnu.org/software/libunistring/")
79 (license (list lgpl3+ gpl2+))))