aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/scribus.scm
blob: 20795da2753116b86e8731cee4325ff1418f0c3a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU 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.
;;;
;;; GNU 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 GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages scribus)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages cups)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages image)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages libreoffice)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages xml))

(define-public scribus
  (package
    (name "scribus")
    (version "1.5.4")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://sourceforge/scribus/scribus-devel/"
                           version "/scribus-" version ".tar.xz"))
       (sha256
        (base32
         "00ys0p6h3iq77kh72dkl0qrf7qvznq18qdrgiq10gfxja1995034"))
       (patches (append
                 ;; Scribus relies heavily on Poppler internals, which have
                 ;; changed a lot since the latest Scribus release (2018-04).
                 ;; Thus, we require a bunch of patches to stay compatible.
                 (search-patches "scribus-poppler.patch")
                 (list (origin
                         (method url-fetch)
                         (uri (string-append
                               "https://github.com/scribusproject/scribus/commit/"
                               "7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch"))
                         (file-name "scribus-poppler-0.64.patch")
                         (sha256
                          (base32
                           "1kr27bfzkpabrh42nsrrvlqyycdg9isbavpaa5spgmrhidcg02xj")))
                       (origin
                         (method url-fetch)
                         (uri (string-append
                               "https://github.com/scribusproject/scribus/commit/"
                               "76561c1a55cd07c268f8f2b2fea888532933700b.patch"))
                         (file-name "scribus-poppler-config.patch")
                         (sha256
                          (base32
                           "01k18xjj82c3ndzp89dlpfhhdccc8z0acf8b04r592jyr5y9rc19")))
                       (origin
                         (method url-fetch)
                         (uri (string-append
                               "https://github.com/scribusproject/scribus/commit/"
                               "8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch"))
                         (file-name "scribus-poppler-0.69.patch")
                         (sha256
                          (base32
                           "1avdmsj5l543j0irq18nxgiw99n395jj56ih5dsal59fn0wbqk42")))
                       (origin
                         (method url-fetch)
                         (uri (string-append "https://git.archlinux.org/svntogit/"
                                             "community.git/plain/trunk/scribus-"
                                             "poppler-0.70.patch?h=packages/scribus&id="
                                             "8ef43ee2fceb0753ed5a76bb0a11c84775898ffc"))
                         (file-name "scribus-poppler-0.70.patch")
                         (sha256
                          (base32
                           "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr"))))))
       (modules '((guix build utils)))
       (snippet
        '(begin
           (for-each (lambda (file)
                       (substitute* file
                         ;; These are required for compatibility with Poppler 0.71.
                         (("GBool") "bool") (("gTrue") "true") (("gFalse") "false")
                         ;; ...and this for Poppler 0.72.
                         (("getCString") "c_str")))
                     (find-files "scribus/plugins/import/pdf"))
           #t))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f                      ;no test target
       #:configure-flags
       '("-DWANT_GRAPHICSMAGICK=1")
       #:phases
       (modify-phases %standard-phases
         (add-after 'install 'wrap-program
           (lambda* (#:key inputs outputs #:allow-other-keys)
             ;; Fix "ImportError: No module named _sysconfigdata_nd" where
             ;; Scribus checks PATH and eventually runs system's Python
             ;; instead of package's.
             (let* ((out (assoc-ref outputs "out"))
                    (py2 (assoc-ref inputs "python")))
               (wrap-program (string-append out "/bin/scribus")
                 `("PATH" ":" prefix (,(string-append py2 "/bin")))))
             #t)))))
    (inputs
     `(("boost" ,boost)
       ("cairo" ,cairo)
       ("cups" ,cups)
       ("fontconfig" ,fontconfig)
       ("freetype" ,freetype)
       ("graphicsmagick" ,graphicsmagick)
       ("harfbuzz" ,harfbuzz)
       ("hunspell" ,hunspell)
       ("icu4c" ,icu4c)
       ("lcms" ,lcms)
       ("libcdr" ,libcdr)
       ("libfreehand" ,libfreehand)
       ("libjpeg" ,libjpeg)
       ("libmspub" ,libmspub)
       ("libpagemaker" ,libpagemaker)
       ("librevenge" ,librevenge)
       ("libtiff" ,libtiff)
       ("libvisio" ,libvisio)
       ("libxml2" ,libxml2)
       ("libzmf" ,libzmf)
       ("openssl" ,openssl)
       ("podofo" ,podofo)
       ("poppler" ,poppler)
       ("python" ,python-2)             ;need Python library
       ("qtbase" ,qtbase)
       ("qtdeclarative" ,qtdeclarative)
       ("zlib" ,zlib)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("qttools" ,qttools)
       ("util-linux" ,util-linux)))
    (home-page "https://www.scribus.net")
    (synopsis "Desktop publishing and page layout program")
    (description
     "Scribus is a @dfn{desktop publishing} (DTP) application and can be used
for many tasks; from brochure design to newspapers, magazines, newsletters and
posters to technical documentation.  Scribus supports professional DTP
features, such as CMYK color and a color management system to soft proof
images for high quality color printing, flexible PDF creation options,
Encapsulated PostScript import/export and creation of four color separations,
import of EPS/PS and SVG as native vector graphics, Unicode text including
right to left scripts such as Arabic and Hebrew via freetype.")
    (license license:gpl2+)))
(propagated-inputs (list go-github-com-google-uuid go-github-com-ipfs-go-detect-race go-github-com-ipfs-go-ipfs-delay go-github-com-jbenet-goprocess go-go-uber-org-multierr go-golang-org-x-xerrors)) (home-page "https://github.com/ipfs/go-datastore") (synopsis "Key-value datastore interfaces") (description "Datastore is a generic layer of abstraction for data store and database access. It is a simple API with the aim to enable application development in a datastore-agnostic way, allowing datastores to be swapped seamlessly without changing application code. Thus, one can leverage different datastores with different strengths without committing the application to one datastore throughout its lifetime.") (license license:expat))) (define-public go-github-com-ipfs-go-detect-race (package (name "go-github-com-ipfs-go-detect-race") (version "0.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-detect-race") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0rqb0q66d7z852j5mhlr025dz698c44w014g4mx587amr1rvwqna")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-detect-race")) (home-page "https://github.com/ipfs/go-detect-race") (synopsis "Detect if compiled with race") (description "Check if the race detector is running.") (license license:expat))) (define-public go-github-com-ipfs-go-ipfs-exchange-interface (package (name "go-github-com-ipfs-go-ipfs-exchange-interface") (version "0.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipfs-exchange-interface") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0h5jizhjq4yz9sikqc6yhv5gsb8fgv67v0qjzagyhfznfx8kwv1d")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-ipfs-exchange-interface")) (propagated-inputs (list go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid)) (home-page "https://github.com/ipfs/go-ipfs-exchange-interface") (synopsis "The IPFS Exchange interface") (description "@code{go-ipfs-exchange-interface} defines the IPFS exchange interface.") (license license:expat))) (define-public go-github-com-ipfs-go-ipfs-redirects-file (package (name "go-github-com-ipfs-go-ipfs-redirects-file") (version "0.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipfs-redirects-file") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "16lisd5jbniang85jzfwfigw0kmz73913fsrfj49nh92mpw50qpz")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-ipfs-redirects-file")) (native-inputs (list go-github-com-tj-assert)) (propagated-inputs (list go-github-com-pkg-errors go-github-com-ucarion-urlpath)) (home-page "https://github.com/ipfs/go-ipfs-redirects-file") (synopsis "IPFS Web Gateway _redirects file format parser") (description "Package redirects provides Netlify style _redirects file format parsing.") (license license:expat))) (define-public go-github-com-ipfs-go-ipfs-util (package (name "go-github-com-ipfs-go-ipfs-util") (version "0.0.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipfs-util") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0x80c6a50zcv473xx0b39sz2xkwpiw3nmmjf51k5x7a4rx0rgvx4")))) (build-system go-build-system) (propagated-inputs (list go-github-com-mr-tron-base58 go-github-com-multiformats-go-multihash)) (arguments (list #:import-path "github.com/ipfs/go-ipfs-util")) (home-page "https://github.com/ipfs/go-ipfs-util") (synopsis "Common utilities used by @code{go-ipfs} and related packages") (description "Common utilities used by @code{go-ipfs} and other related Go packages.") (license license:expat))) (define-public go-github-com-ipfs-go-ipld-cbor (package (name "go-github-com-ipfs-go-ipld-cbor") (version "0.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipld-cbor") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0yxk4sbf1fk9aaizzpz3h30049wqvaz0s3jnbdd5akhj7wg89h21")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-ipld-cbor")) (propagated-inputs (list go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid go-github-com-ipfs-go-ipfs-util go-github-com-ipfs-go-ipld-format go-github-com-multiformats-go-multihash go-github-com-polydawn-refmt go-github-com-whyrusleeping-cbor-gen)) (home-page "https://github.com/ipfs/go-ipld-cbor") (synopsis "A cbor implementation of the @code{go-ipld-format}") (description "An implementation of a @url{https://cbor.io/, CBOR} encoded merkledag object.") (license license:expat))) (define-public go-github-com-ipfs-go-ipld-git (package (name "go-github-com-ipfs-go-ipld-git") (version "0.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipld-git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1v52qzgmx7qym0qzkzkry2kfj58f9hh7c8qycg74sqbd9zb1ynjj")))) (build-system go-build-system) (arguments (list ;; XXX: It requires .git/objects, check if it's applicable to generate ;; git repo during check phase with make-test-repo.sh. #:tests? #f #:import-path "github.com/ipfs/go-ipld-git" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-test-data-files (lambda* (#:key import-path #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) (for-each delete-file (list "testdata.tar.gz" "codecov.yml" "make-test-repo.sh")))))))) (propagated-inputs (list go-github-com-multiformats-go-multihash go-github-com-ipld-go-ipld-prime go-github-com-ipfs-go-cid go-github-com-ipfs-go-block-format)) (home-page "https://github.com/ipfs/go-ipld-git") (synopsis "IPLD handlers for git objects") (description "This is an IPLD codec which handles git objects. Objects are transformed into IPLD graph as detailed below. Objects are demonstrated here using both @url{https://ipld.io/docs/schemas/,IPLD Schemas} and example JSON forms.") (license license:expat))) (define-public go-github-com-ipfs-go-ipld-format (package (name "go-github-com-ipfs-go-ipld-format") (version "0.6.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipld-format") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0zl172ncmx9h5z2p3d0j1377xm9glw4zfyamks31p0pvvx2kyn7c")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-ipld-format")) (propagated-inputs (list go-github-com-multiformats-go-multihash go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid)) (home-page "https://github.com/ipfs/go-ipld-format") (synopsis "IPLD Node and Resolver interfaces in Go") (description "@code{go-ipld-format} is a set of interfaces that a type needs to implement in order to be a part of the @acronym{IPLD, InterPlanetary Linked Data} merkle-forest.") (license license:expat))) (define-public go-github-com-ipfs-go-ipld-legacy (package (name "go-github-com-ipfs-go-ipld-legacy") (version "0.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-ipld-legacy") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0sc2zc3lyxy30fzynwdpfrl8jhh1ynwixn1crrv8hzn93yix6550")))) (build-system go-build-system) (arguments (list #:go go-1.21 #:import-path "github.com/ipfs/go-ipld-legacy")) (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs (list go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid go-github-com-ipfs-go-ipld-format go-github-com-ipld-go-ipld-prime)) (home-page "https://github.com/ipfs/go-ipld-legacy") (synopsis "Translation layer for IPLD legacy code") (description "@code{go-ipld-format} is a translation layer between @code{go-ipld-prime} nodes and @code{go-ipld-format} legacy interface.") (license (list license:expat license:asl2.0)))) ;; XXX: This repository has been archived by the owner on Jun 20, 2023. It is ;; now read-only. We highly recommend switching to the maintained version at ;; https://github.com/ipfs/boxo/tree/main/verifcid. It's still in use by some ;; dependencies chain for unbundled inputs in Kubo. (define-public go-github-com-ipfs-go-verifcid (package (name "go-github-com-ipfs-go-verifcid") (version "0.0.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-verifcid") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "05i6wp2nln0mlr1pivmva7j6bwa09k7jl04acx1lw65h4d9nxsjm")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-verifcid")) (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs (list go-github-com-ipfs-go-cid go-github-com-multiformats-go-multihash)) (home-page "https://github.com/ipfs/go-verifcid") (synopsis "CID security code") (description "@code{go-verifcid} provides @url{https://github.com/ipld/cid, CID} security code prior to it getting merged into @code{go-cid}.") ;; This library is dual-licensed under Apache 2.0 and MIT terms: ;; LICENSE-MIT and LICENSE-APACHE. (license (list license:expat license:asl2.0)))) (define-public go-github-com-ipld-go-codec-dagpb (package (name "go-github-com-ipld-go-codec-dagpb") (version "1.6.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipld/go-codec-dagpb") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1jbrwbgr222wsi95gdflbj350csja6k8vphdq7c9bm50ipr8bvkq")))) (build-system go-build-system) (arguments (list #:go go-1.21 #:import-path "github.com/ipld/go-codec-dagpb")) (propagated-inputs (list go-github-com-ipfs-go-cid go-github-com-ipld-go-ipld-prime go-google-golang-org-protobuf)) (home-page "https://github.com/ipld/go-codec-dagpb/") (synopsis "Implementation of the DAG-PB spec for Go") (description "An implementation of the @url{https://ipld.io/, IPLD DAG-PB} spec for @code{go-ipld-prime}.") (license (list license:expat license:asl2.0)))) (define-public go-github-com-ipld-go-ipld-prime (package (name "go-github-com-ipld-go-ipld-prime") (version "0.21.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipld/go-ipld-prime") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1ycb08h0hvq3mw3sbjkjzp5sfcxmss155jxiv5gjg7myxvzk91ja")))) (build-system go-build-system) (arguments (list #:unpack-path "github.com/ipld/go-ipld-prime/" #:import-path "github.com/ipld/go-ipld-prime/" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'copy-ipld-specfs (lambda* (#:key import-path #:allow-other-keys) (copy-recursively (string-append #$(this-package-native-input "specification-ipld") "/share/ipld/") (string-append "src/" import-path "/ipld"))))))) (native-inputs (list go-github-com-frankban-quicktest go-github-com-warpfork-go-testmark specification-ipld)) (propagated-inputs (list go-github-com-google-go-cmp go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid go-github-com-multiformats-go-multicodec go-github-com-multiformats-go-multihash go-github-com-polydawn-refmt go-gopkg-in-yaml-v2)) (home-page "https://github.com/ipld/go-ipld-prime") (synopsis "Golang interfaces for the IPLD Data Model") (description "@code{go-ipld-prime} is an implementation of the IPLD spec interfaces, a batteries-included codec implementations of IPLD for CBOR and JSON, and tooling for basic operations on IPLD objects (traversals, etc).") (license license:expat))) (define-public go-github-com-ipfs-go-log-v2 (package (name "go-github-com-ipfs-go-log-v2") (version "2.5.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-log") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1yh3sw8knpy364h8h8rqw193whnjd6fbc13cxh6zs29z3x2a7aqa")))) (build-system go-build-system) (propagated-inputs (list go-github-com-mattn-go-isatty go-go-uber-org-multierr go-go-uber-org-zap)) (arguments (list #:import-path "github.com/ipfs/go-log/v2")) (home-page "https://github.com/ipfs/go-log") (synopsis "Logging library used by @code{go-ipfs}") (description "@code{go-log} wraps @url{https://github.com/uber-go/zap, zap} to provide a logging facade. @code{go-log} manages logging instances and allows for their levels to be controlled individually.") (license license:expat))) (define-public go-github-com-ipfs-go-log (package (inherit go-github-com-ipfs-go-log-v2) (name "go-github-com-ipfs-go-log") (version "1.0.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-log") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0gj2yqrv6wgpkv6f9c1anmw5kwg59plv0jrcxb3zmjrnk8fsn1jr")))) (propagated-inputs (list go-github-com-gogo-protobuf go-github-com-ipfs-go-log-v2 go-github-com-opentracing-opentracing-go go-go-uber-org-zap)) (arguments (list #:import-path "github.com/ipfs/go-log")))) (define-public go-github-com-ipfs-go-metrics-interface (package (name "go-github-com-ipfs-go-metrics-interface") (version "0.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ipfs/go-metrics-interface") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "09xc71175sfnqlizkbw066jagnbag9ihvs240z6g6dm2yx3w5xgy")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ipfs/go-metrics-interface")) (propagated-inputs (list go-github-com-ipfs-go-cid go-github-com-ipfs-go-datastore go-github-com-multiformats-go-base32 go-github-com-multiformats-go-multihash)) (home-page "https://github.com/ipfs/go-metrics-interface") ;; XXX: The project neither has no a proper description, nor a README, see ;; <https://github.com/ipfs/go-metrics-interface/issues/1>. (synopsis "Metrics interface for IPFS") (description "Metrics interface for IPFS (Kubo).") (license license:expat))) (define-public go-github-com-whyrusleeping-cbor-gen (package (name "go-github-com-whyrusleeping-cbor-gen") (version "v0.0.0-20230818171029-f91ae536ca25") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/whyrusleeping/cbor-gen") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "08by7pqh4fcwf2va01iif75yqkfssi6d48334404mmv9jmhzim60")))) (build-system go-build-system) (arguments (list #:import-path "github.com/whyrusleeping/cbor-gen")) (propagated-inputs (list go-github-com-ipfs-go-cid go-github-com-google-go-cmp go-golang-org-x-xerrors)) (home-page "https://github.com/whyrusleeping/cbor-gen") (synopsis "Codegen for CBOR codecs on the specified types") (description "Basic utilities to generate fast path @url{https://cbor.io/, CBOR} codecs for types.") (license license:expat))) (define-public kubo (package (name "kubo") (version "0.29.0") (source (origin (method url-fetch/tarbomb) (uri (string-append "https://dist.ipfs.io/kubo/v" version "/kubo-source.tar.gz")) (sha256 (base32 "121zm4k0wz2iqrl65c7bdg5d2bvz3hvj4pavk5178dyd1p49bl5r")) (file-name (string-append name "-" version "-source")) (modules '((guix build utils))) (snippet '(for-each delete-file-recursively ;; TODO: unbundle the rest as well '("vendor/bazil.org" "vendor/github.com/alecthomas" "vendor/github.com/benbjohnson" "vendor/github.com/beorn7" "vendor/github.com/blang" "vendor/github.com/cenkalti" "vendor/github.com/cespare" "vendor/github.com/cheggaaa" "vendor/github.com/coreos" "vendor/github.com/davecgh" "vendor/github.com/docker" "vendor/github.com/dustin" "vendor/github.com/elgris" "vendor/github.com/facebookgo" "vendor/github.com/felixge" "vendor/github.com/flynn" "vendor/github.com/francoispqt" "vendor/github.com/fsnotify" "vendor/github.com/gabriel-vasile" "vendor/github.com/go-kit" "vendor/github.com/go-logfmt" "vendor/github.com/go-logr" "vendor/github.com/go-task" "vendor/github.com/godbus" "vendor/github.com/gogo" "vendor/github.com/golang" "vendor/github.com/google" "vendor/github.com/gorilla" "vendor/github.com/hashicorp" "vendor/github.com/huin" "vendor/github.com/ipfs/go-bitfield" "vendor/github.com/ipfs/go-block-format" "vendor/github.com/ipfs/go-cid" "vendor/github.com/ipfs/go-cidutil" "vendor/github.com/ipfs/go-datastore" "vendor/github.com/ipfs/go-detect-race" "vendor/github.com/ipfs/go-ipfs-delay" "vendor/github.com/ipfs/go-ipfs-redirects-file" "vendor/github.com/ipfs/go-ipfs-util" "vendor/github.com/ipfs/go-ipld-cbor" "vendor/github.com/ipfs/go-ipld-format" "vendor/github.com/ipfs/go-ipld-git" "vendor/github.com/ipfs/go-ipld-legacy" "vendor/github.com/ipfs/go-log" "vendor/github.com/ipfs/go-metrics-interface" "vendor/github.com/ipfs/go-verifcid" "vendor/github.com/ipld/go-codec-dagpb" "vendor/github.com/ipld/go-ipld-prime" "vendor/github.com/jackpal" "vendor/github.com/jbenet" "vendor/github.com/julienschmidt" "vendor/github.com/klauspost" "vendor/github.com/koron" "vendor/github.com/libp2p/go-buffer-pool" "vendor/github.com/libp2p/go-cidranger" "vendor/github.com/libp2p/go-doh-resolver" "vendor/github.com/libp2p/go-flow-metrics" "vendor/github.com/libp2p/go-libp2p-asn-util" "vendor/github.com/libp2p/go-msgio" "vendor/github.com/libp2p/go-nat" "vendor/github.com/libp2p/go-netroute" "vendor/github.com/libp2p/go-reuseport" "vendor/github.com/libp2p/go-socket-activation" "vendor/github.com/libp2p/go-yamux" "vendor/github.com/libp2p/zeroconf" "vendor/github.com/mattn" "vendor/github.com/mgutz" "vendor/github.com/miekg" "vendor/github.com/minio" "vendor/github.com/mitchellh" "vendor/github.com/mr-tron" "vendor/github.com/multiformats" "vendor/github.com/onsi" "vendor/github.com/opentracing" "vendor/github.com/pbnjay" "vendor/github.com/pion" "vendor/github.com/pkg" "vendor/github.com/pmezard" "vendor/github.com/polydawn" "vendor/github.com/prometheus" "vendor/github.com/quic-go" "vendor/github.com/rs" "vendor/github.com/spaolacci" "vendor/github.com/stretchr" "vendor/github.com/syndtr" "vendor/github.com/tidwall" "vendor/github.com/ucarion" "vendor/github.com/whyrusleeping" "vendor/go.uber.org" "vendor/golang.org" "vendor/google.golang.org/protobuf" "vendor/gopkg.in" "vendor/lukechampine.com"))))) (build-system go-build-system) (arguments (list #:unpack-path "github.com/ipfs/kubo" #:import-path "github.com/ipfs/kubo/cmd/ipfs" #:phases #~(modify-phases %standard-phases ;; FIXME: src/github.com/libp2p/go-libp2p-asn-util/asn.go:12:12: ;; pattern sorted-network-list.bin: cannot embed irregular file ;; sorted-network-list.bin ;; ;; This happens due to Golang can't determine the valid directory of ;; the module which is sourced during setup environment phase, but ;; easy resolved after coping to expected directory "vendor" within ;; the current package, see details in Golang source: ;; ;; - URL: <https://github.com/golang/go/blob/> ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454 ;; - file: src/cmd/go/internal/load/pkg.go#L2059 (add-before 'build 'copy-input-to-vendor-directory (lambda* (#:key unpack-path #:allow-other-keys) (with-directory-excursion (string-append "src/" unpack-path) (copy-recursively (string-append #$(this-package-input "go-github-com-libp2p-go-libp2p-asn-util") "/src/github.com") "vendor/github.com")))) ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md (add-after 'install 'install-bashcompletion (lambda _ (let ((completiondir (string-append #$output "/etc/bash_completion.d"))) (mkdir-p completiondir) (with-output-to-file (string-append completiondir "/ipfs") (lambda _ (invoke #$(if (%current-target-system) "ipfs" #~(string-append #$output "/bin/ipfs")) "commands" "completion" "bash"))))))))) (inputs (list ;; Direct requirements as seen in kubo's go.mod file. ;; ;; XXX: Uncomment out when package is available in Guix, ;; otherwise it will be sourced from provided vendor ;; directory. ;; go-bazil-org-fuse ;;go-contrib-go-opencensus-io-exporter-prometheus go-github-com-benbjohnson-clock go-github-com-blang-semver-v4 go-github-com-cenkalti-backoff-v4 ;;go-github-com-ceramicnetwork-go-dag-jose go-github-com-cheggaaa-pb go-github-com-coreos-go-systemd-v22 go-github-com-dustin-go-humanize go-github-com-elgris-jsondiff go-github-com-facebookgo-atomicfile go-github-com-fsnotify-fsnotify go-github-com-google-uuid go-github-com-hashicorp-go-multierror ;;go-github-com-ipfs-boxo go-github-com-ipfs-go-block-format go-github-com-ipfs-go-cid go-github-com-ipfs-go-cidutil go-github-com-ipfs-go-datastore go-github-com-ipfs-go-detect-race ;;go-github-com-ipfs-go-ds-badger ;;go-github-com-ipfs-go-ds-flatfs ;;go-github-com-ipfs-go-ds-leveldb ;;go-github-com-ipfs-go-ds-measure ;;go-github-com-ipfs-go-fs-lock ;;go-github-com-ipfs-go-ipfs-cmds go-github-com-ipfs-go-ipld-cbor go-github-com-ipfs-go-ipld-format go-github-com-ipfs-go-ipld-git go-github-com-ipfs-go-ipld-legacy go-github-com-ipfs-go-log go-github-com-ipfs-go-log-v2 go-github-com-ipfs-go-metrics-interface ;;go-github-com-ipfs-go-metrics-prometheus ;;go-github-com-ipfs-go-unixfsnode ;;go-github-com-ipfs-shipyard-nopfs ;;go-github-com-ipfs-shipyard-nopfs-ipfs ;;go-github-com-ipld-go-car ;;go-github-com-ipld-go-car-v2 go-github-com-ipld-go-codec-dagpb go-github-com-ipld-go-ipld-prime go-github-com-jbenet-go-random go-github-com-jbenet-go-temp-err-catcher go-github-com-jbenet-goprocess go-github-com-julienschmidt-httprouter go-github-com-libp2p-go-doh-resolver ;;go-github-com-libp2p-go-libp2p ;;go-github-com-libp2p-go-libp2p-http ;;go-github-com-libp2p-go-libp2p-kad-dht ;;go-github-com-libp2p-go-libp2p-kbucket ;;go-github-com-libp2p-go-libp2p-pubsub ;;go-github-com-libp2p-go-libp2p-pubsub-router ;;go-github-com-libp2p-go-libp2p-record ;;go-github-com-libp2p-go-libp2p-routing-helpers ;;go-github-com-libp2p-go-libp2p-testing go-github-com-libp2p-go-socket-activation go-github-com-mitchellh-go-homedir go-github-com-multiformats-go-multiaddr go-github-com-multiformats-go-multiaddr-dns go-github-com-multiformats-go-multibase go-github-com-multiformats-go-multicodec go-github-com-multiformats-go-multihash go-github-com-opentracing-opentracing-go go-github-com-pbnjay-memory go-github-com-prometheus-client-golang go-github-com-stretchr-testify go-github-com-syndtr-goleveldb go-github-com-tidwall-gjson go-github-com-tidwall-sjson go-github-com-whyrusleeping-go-sysinfo go-github-com-whyrusleeping-multiaddr-filter ;;go-go-opencensus-io ;;go-go-opentelemetry-io-contrib-instrumentation-net-http-otelhttp ;;go-go-opentelemetry-io-contrib-propagators-autoprop ;;go-go-opentelemetry-io-otel ;;go-go-opentelemetry-io-otel-sdk ;;go-go-opentelemetry-io-otel-trace go-go-uber-org-dig go-go-uber-org-fx go-go-uber-org-multierr go-go-uber-org-zap go-golang-org-x-crypto go-golang-org-x-exp go-golang-org-x-mod go-golang-org-x-sync go-golang-org-x-sys go-google-golang-org-protobuf ;; ;; A list of indirect dependencies required for the vendored ;; models. ;; XXX: Remove them when all of the vendored packages are ;; available. ;; go-github-com-alecthomas-units ; github.com/ipfs/boxo go-github-com-cespare-xxhash go-github-com-docker-go-units ; github.com/containerd/cgroups go-github-com-felixge-httpsnoop ; go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go-github-com-flynn-noise ; github.com/libp2p/go-libp2p go-github-com-gabriel-vasile-mimetype ; github.com/ipfs/boxo go-github-com-go-logr-stdr ; go.opentelemetry.io/otel go-github-com-golang-groupcache ; go.opencensus.io/trace go-github-com-google-gopacket ; github.com/libp2p/go-libp2p-kad-dht go-github-com-gorilla-mux ; github.com/ipfs/boxo go-github-com-gorilla-websocket ; github.com/libp2p/go-libp2p go-github-com-hashicorp-golang-lru ; github.com/libp2p/go-libp2p-kad-dht go-github-com-hashicorp-golang-lru-v2 ; github.com/ipfs/boxo go-github-com-ipfs-go-bitfield ; github.com/ipfs/boxo go-github-com-ipfs-go-ipfs-redirects-file ; github.com/ipfs/boxo go-github-com-ipfs-go-verifcid ; github.com/ipfs/go-blockservice go-github-com-klauspost-compress ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-buffer-pool ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-cidranger ; github.com/libp2p/go-libp2p-kbucket go-github-com-libp2p-go-flow-metrics ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-libp2p-asn-util ; github.com/libp2p/go-libp2p-kbucket go-github-com-libp2p-go-msgio ; github.com/libp2p/go-libp2p-kad-dht go-github-com-libp2p-go-nat ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-reuseport ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-yamux-v4 ; github.com/libp2p/go-libp2p go-github-com-libp2p-zeroconf-v2 ; github.com/libp2p/go-libp2p go-github-com-multiformats-go-multiaddr-fmt ; github.com/libp2p/go-libp2p go-github-com-multiformats-go-multistream ; github.com/libp2p/go-libp2p go-github-com-pion-webrtc-v3 ; github.com/libp2p/go-libp2p go-github-com-prometheus-statsd-exporter ; contrib.go.opencensus.io/exporter/prometheus go-github-com-quic-go-quic-go ; github.com/libp2p/go-libp2p go-github-com-quic-go-webtransport-go ; github.com/libp2p/go-libp2p go-github-com-rs-cors ; github.com/ipfs/go-ipfs-cmds go-github-com-whyrusleeping-base32 ; github.com/ipfs/boxo go-github-com-whyrusleeping-cbor ; github.com/ipld/go-car go-github-com-whyrusleeping-chunker ; github.com/ipfs/boxo go-github-com-whyrusleeping-go-keyspace ; github.com/libp2p/go-libp2p-kad-dht go-golang-org-x-oauth2 ; github.com/ipfs/boxo go-golang-org-x-term ; github.com/ipfs/go-ipfs-cmds go-golang-org-x-xerrors ; github.com/whyrusleeping/cbor-gen go-gopkg-in-square-go-jose-v2 ; github.com/ceramicnetwork/go-dag-jose )) (native-inputs (append (if (%current-target-system) (list this-package) '()) (list python-minimal-wrapper zsh))) (home-page "https://ipfs.tech") (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol") (description "IPFS is a global, versioned, peer-to-peer file system. It combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bittorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built in. You can also mount the world at @code{/ipfs}.") (license license:expat))) (define-public go-ipfs (deprecated-package "go-ipfs" kubo))