Merge branch 'rust-team'
Change-Id: Iee33d7b9067d2180fd4b2e28d81716a251a53a01
commit
c9e1a72cc2
|
@ -13,6 +13,7 @@
|
|||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
|
||||
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -198,6 +199,32 @@ text or blue underlined text, on ANSI terminals.")
|
|||
"1xif1bh938qpfc3d0f9xgidibpm65xix11w9gszwqnia00q7rb13"))))
|
||||
(arguments `())))
|
||||
|
||||
(define-public rust-ansiterm-0.12
|
||||
(package
|
||||
(name "rust-ansiterm")
|
||||
(version "0.12.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "ansiterm" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1k14pywvgd829swxzji0nchk4n6yvr9xz6lkwv96v8ax77sqgdaa"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:cargo-inputs (("rust-ansi-colours" ,rust-ansi-colours-1)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-winapi" ,rust-winapi-0.3))
|
||||
#:cargo-development-inputs (("rust-doc-comment" ,rust-doc-comment-0.3)
|
||||
("rust-regex" ,rust-regex-1)
|
||||
("rust-serde-json" ,rust-serde-json-1))))
|
||||
(home-page "https://github.com/rustadopt/ansiterm-rs")
|
||||
(synopsis "Library for ANSI terminal colours and styles (bold, underline)")
|
||||
(description
|
||||
"This package provides a library for ANSI terminal colours and
|
||||
styles (bold, underline).")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public rust-aom-sys-0.3
|
||||
(package
|
||||
(name "rust-aom-sys")
|
||||
|
@ -1134,7 +1161,9 @@ EUI-64, also known as MAC-48 media access control addresses.")
|
|||
(base32
|
||||
"0lilr4f335m1fq1acmshd51zblfaglw1hha6lhalnc1fw3cg0aag"))))
|
||||
(arguments
|
||||
`(#:cargo-inputs
|
||||
`(#:cargo-test-flags
|
||||
'("--release" "--lib" "--bins" "--tests")
|
||||
#:cargo-inputs
|
||||
(("rust-android-glue" ,rust-android-glue-0.2)
|
||||
("rust-cgl" ,rust-cgl-0.3)
|
||||
("rust-cocoa" ,rust-cocoa-0.19)
|
||||
|
@ -1170,7 +1199,9 @@ EUI-64, also known as MAC-48 media access control addresses.")
|
|||
(base32
|
||||
"1ggyyqn7dvz4yx5ygqfvnxwfb78wvdm5y6xqw5my1b4x61dv6wak"))))
|
||||
(arguments
|
||||
`(#:cargo-inputs
|
||||
`(#:cargo-test-flags
|
||||
'("--release" "--lib" "--bins" "--tests")
|
||||
#:cargo-inputs
|
||||
(("rust-android-glue" ,rust-android-glue-0.2)
|
||||
("rust-cgl" ,rust-cgl-0.2)
|
||||
("rust-cocoa" ,rust-cocoa-0.18)
|
||||
|
@ -4025,8 +4056,7 @@ the platform-specific getters provided by winit, or another library.")
|
|||
(uri (crate-uri "y4m" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1bhdgb7hgx7j92nm6ij5n8wisp50j8ff66ks14jzwdw2mwhrjam7"))))
|
||||
(arguments `(#:skip-build? #t))))
|
||||
(base32 "1bhdgb7hgx7j92nm6ij5n8wisp50j8ff66ks14jzwdw2mwhrjam7"))))))
|
||||
|
||||
;;;
|
||||
;;; Avoid adding new packages to the end of this file. To reduce the chances
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3586,11 +3586,19 @@ for dealing with different structured file formats.")
|
|||
;; https://gitlab.gnome.org/GNOME/librsvg/-/issues/955).
|
||||
(substitute* "gdk-pixbuf-loader/librsvg.thumbnailer.in"
|
||||
(("@bindir@/gdk-pixbuf-thumbnailer")
|
||||
(search-input-file inputs "bin/gdk-pixbuf-thumbnailer")))))
|
||||
(string-append #$(this-package-input "gdk-pixbuf")
|
||||
"/bin/gdk-pixbuf-thumbnailer")))))
|
||||
(add-after 'unpack 'prepare-for-build
|
||||
(lambda _
|
||||
;; In lieu of #:make-flags
|
||||
(setenv "CC" #$(cc-for-target))
|
||||
(setenv "PKG_CONFIG" #$(pkg-config-for-target))
|
||||
(when #$(%current-target-system)
|
||||
(setenv "RUST_TARGET"
|
||||
(string-replace
|
||||
#$(%current-target-system)
|
||||
"-unknown-linux-gnu"
|
||||
(string-index #$(%current-target-system) #\-))))
|
||||
;; Something about the build environment resists building
|
||||
;; successfully with the '--locked' flag.
|
||||
(substitute* '("Makefile.am" "Makefile.in")
|
||||
|
@ -3623,9 +3631,18 @@ for dealing with different structured file formats.")
|
|||
(apply (assoc-ref gnu:%standard-phases 'configure)
|
||||
#:configure-flags
|
||||
(list "--disable-static"
|
||||
"--enable-vala"
|
||||
(string-append "--with-html-dir=" #$output
|
||||
"/share/gtk-doc/html"))
|
||||
#$@(if (%current-target-system)
|
||||
#~(;; g-ir-scanner can't import its modules
|
||||
;; and vala currently can't be cross-compiled.
|
||||
"--enable-introspection=no"
|
||||
"--enable-vala=no"
|
||||
;; These two are necessary for cross-compiling.
|
||||
(string-append
|
||||
"--build=" #$(nix-system->gnu-triplet
|
||||
(%current-system)))
|
||||
(string-append
|
||||
"--host=" #$(%current-target-system)))
|
||||
#~("--enable-vala")))
|
||||
args)))
|
||||
(add-after 'configure 'dont-vendor-self
|
||||
(lambda* (#:key vendor-dir #:allow-other-keys)
|
||||
|
@ -3635,13 +3652,14 @@ for dealing with different structured file formats.")
|
|||
(replace 'build
|
||||
(assoc-ref gnu:%standard-phases 'build))
|
||||
(replace 'check
|
||||
(lambda* args
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "check")))
|
||||
(lambda* (#:key tests? #:allow-other-keys #:rest args)
|
||||
(when tests?
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "check"))))
|
||||
(replace 'install
|
||||
(assoc-ref gnu:%standard-phases 'install)))))
|
||||
(native-inputs (list `(,glib "bin") gobject-introspection pkg-config vala))
|
||||
(inputs (list freetype harfbuzz libxml2 pango))
|
||||
(native-inputs (list gdk-pixbuf `(,glib "bin") gobject-introspection pkg-config vala))
|
||||
(inputs (list freetype gobject-introspection harfbuzz libxml2 pango))
|
||||
(propagated-inputs (list cairo gdk-pixbuf glib))
|
||||
(synopsis "SVG rendering library")
|
||||
(description "Librsvg is a library to render SVG images to Cairo surfaces.
|
||||
|
|
|
@ -806,7 +806,8 @@ ever use this library.")
|
|||
;; The CI test suite fails completely on powerpc-linux.
|
||||
;; The name org.gnome.SessionManager was not provided by any .service
|
||||
;; TODO: Wrap 'check phase with 'tests?'.
|
||||
#$@(if (not (target-ppc32?))
|
||||
#$@(if (not (or (target-ppc32?)
|
||||
(%current-target-system)))
|
||||
#~((add-after 'install 'check
|
||||
(lambda _
|
||||
;; xfconfd requires a writable HOME
|
||||
|
|
|
@ -330,8 +330,9 @@ of your system.")
|
|||
"1460d5lc780p3q38l3wc9jfr2a7zlyrcra0li65aynj738cam9yl"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:tests? #f ; no test target
|
||||
#:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
|
||||
`(#:tests? #f ; no test target
|
||||
#:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
|
||||
(string-append "CC=" ,(cc-for-target)))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure) ; there is no configure script
|
||||
|
@ -339,8 +340,7 @@ of your system.")
|
|||
(add-before 'build 'patch-ncursesw
|
||||
(lambda _
|
||||
(substitute* "stfl_internals.h"
|
||||
(("ncursesw/") ""))
|
||||
#t))
|
||||
(("ncursesw/") ""))))
|
||||
(add-after 'install 'install-missing-symlink
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
|
||||
;;; Copyright © 2023 Arnav Andrew Jose <arnav.jose@gmail.com>
|
||||
;;; Copyright © 2023 Wilko Meyer <w@wmeyer.eu>
|
||||
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
|
||||
;;; Copyright © 2023 Steve George <steve@futurile.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -80,7 +82,7 @@
|
|||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-build)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages rust)
|
||||
#:use-module (gnu packages sqlite)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages webkit)
|
||||
|
@ -126,7 +128,7 @@ low-end hardware and serving many concurrent requests.")
|
|||
(define-public alfis
|
||||
(package
|
||||
(name "alfis")
|
||||
(version "0.6.10")
|
||||
(version "0.8.4")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
|
@ -135,7 +137,12 @@ low-end hardware and serving many concurrent requests.")
|
|||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1kgzz92mkyzn7mbsdpik1q21kl38i4almn01k99nww3p0vgx9514"))))
|
||||
(base32 "1zqszjyiab0b76m2b8zfzpndg393hn311whq1fs9syfn53hp7nh4"))
|
||||
(snippet
|
||||
#~(begin (use-modules (guix build utils))
|
||||
;; Use a packaged version of web-view.
|
||||
(substitute* "Cargo.toml"
|
||||
(("git = .*,") "version = \"0.7.3\","))))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:cargo-test-flags
|
||||
|
@ -145,15 +152,15 @@ low-end hardware and serving many concurrent requests.")
|
|||
#:cargo-inputs
|
||||
(("rust-getopts" ,rust-getopts-0.2)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-simplelog" ,rust-simplelog-0.11)
|
||||
("rust-toml" ,rust-toml-0.5)
|
||||
("rust-simplelog" ,rust-simplelog-0.12)
|
||||
("rust-toml" ,rust-toml-0.7)
|
||||
("rust-digest" ,rust-digest-0.10)
|
||||
("rust-sha2" ,rust-sha2-0.10)
|
||||
("rust-ed25519-dalek" ,rust-ed25519-dalek-1)
|
||||
("rust-x25519-dalek" ,rust-x25519-dalek-1)
|
||||
("rust-ecies-ed25519" ,rust-ecies-ed25519-0.5)
|
||||
("rust-chacha20poly1305" ,rust-chacha20poly1305-0.9)
|
||||
("rust-signature" ,rust-signature-1)
|
||||
("rust-signature" ,rust-signature-2)
|
||||
("rust-blakeout" ,rust-blakeout-0.3)
|
||||
("rust-num-cpus" ,rust-num-cpus-1)
|
||||
("rust-byteorder" ,rust-byteorder-1)
|
||||
|
@ -161,23 +168,25 @@ low-end hardware and serving many concurrent requests.")
|
|||
("rust-serde-json" ,rust-serde-json-1)
|
||||
("rust-bincode" ,rust-bincode-1)
|
||||
("rust-serde-cbor" ,rust-serde-cbor-0.11)
|
||||
("rust-base64" ,rust-base64-0.13)
|
||||
("rust-base64" ,rust-base64-0.21)
|
||||
("rust-num-bigint" ,rust-num-bigint-0.4)
|
||||
("rust-num-traits" ,rust-num-traits-0.2)
|
||||
("rust-chrono" ,rust-chrono-0.4)
|
||||
("rust-rand" ,rust-rand-0.8)
|
||||
("rust-rand-0.7" ,rust-rand-0.7) ;For ed25519-dalek
|
||||
("rust-sqlite" ,rust-sqlite-0.26)
|
||||
("rust-uuid" ,rust-uuid-0.8)
|
||||
("rust-sqlite" ,rust-sqlite-0.30)
|
||||
("rust-uuid" ,rust-uuid-1)
|
||||
("rust-mio" ,rust-mio-0.8)
|
||||
("rust-ureq" ,rust-ureq-2)
|
||||
("rust-lru" ,rust-lru-0.7)
|
||||
("rust-lru" ,rust-lru-0.9)
|
||||
("rust-derive-more" ,rust-derive-more-0.99)
|
||||
("rust-lazy-static" ,rust-lazy-static-1)
|
||||
("rust-spmc" ,rust-spmc-0.3)
|
||||
("rust-tinyfiledialogs" ,rust-tinyfiledialogs-3)
|
||||
("rust-web-view" ,rust-web-view-0.7)
|
||||
("rust-open" ,rust-open-2)
|
||||
("rust-thread-priority" ,rust-thread-priority-0.4)
|
||||
("rust-open" ,rust-open-3)
|
||||
("rust-winapi" ,rust-winapi-0.3)
|
||||
("rust-thread-priority" ,rust-thread-priority-0.10)
|
||||
("rust-winres" ,rust-winres-0.1))
|
||||
#:cargo-development-inputs
|
||||
(("rust-serde-bytes" ,rust-serde-bytes-0.11)
|
||||
|
@ -189,6 +198,7 @@ low-end hardware and serving many concurrent requests.")
|
|||
gtk
|
||||
glib
|
||||
pango
|
||||
sqlite
|
||||
webkitgtk-with-libsoup2))
|
||||
(home-page "https://github.com/Revertron/Alfis")
|
||||
(synopsis "Alternative Free Identity System")
|
||||
|
@ -463,6 +473,96 @@ program @code{ls}. It uses colours to distinguish file types and metadata. It
|
|||
also knows about symlinks, extended attributes, and Git.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public eza
|
||||
(package
|
||||
(name "eza")
|
||||
(version "0.15.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "eza" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "14qapnxc1rwqsq6c13b35wgaiypn23niajk39c44i1w3if91rd85"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:cargo-inputs `(("rust-ansiterm" ,rust-ansiterm-0.12)
|
||||
("rust-chrono" ,rust-chrono-0.4)
|
||||
("rust-git2" ,rust-git2-0.18)
|
||||
("rust-glob" ,rust-glob-0.3)
|
||||
("rust-libc" ,rust-libc-0.2)
|
||||
("rust-locale" ,rust-locale-0.2)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-natord" ,rust-natord-1)
|
||||
("rust-num-cpus" ,rust-num-cpus-1)
|
||||
("rust-number-prefix" ,rust-number-prefix-0.4)
|
||||
("rust-once-cell" ,rust-once-cell-1)
|
||||
("rust-percent-encoding" ,rust-percent-encoding-2)
|
||||
("rust-phf" ,rust-phf-0.11)
|
||||
("rust-proc-mounts" ,rust-proc-mounts-0.3)
|
||||
("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
|
||||
("rust-terminal-size" ,rust-terminal-size-0.3)
|
||||
("rust-timeago" ,rust-timeago-0.4)
|
||||
("rust-unicode-width" ,rust-unicode-width-0.1)
|
||||
("rust-uutils-term-grid" ,rust-uutils-term-grid-0.3)
|
||||
("rust-uzers" ,rust-uzers-0.11)
|
||||
("rust-windows-sys" ,rust-windows-sys-0.48)
|
||||
("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.5))
|
||||
#:cargo-development-inputs `(("rust-criterion" ,rust-criterion-0.5)
|
||||
("rust-trycmd" ,rust-trycmd-0.14))
|
||||
#:phases #~(modify-phases %standard-phases
|
||||
(add-after 'build 'build-manual
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(when (assoc-ref inputs "pandoc")
|
||||
(map (lambda (page)
|
||||
(with-output-to-file page
|
||||
(lambda _
|
||||
(invoke "pandoc" "--standalone"
|
||||
"-f" "markdown"
|
||||
"-t" "man"
|
||||
(string-append "man/" page ".md")))))
|
||||
(list "eza.1" "eza_colors.5")))))
|
||||
(add-after 'install 'install-extras
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(share (string-append out "/share"))
|
||||
(man1 (string-append share "/man/man1"))
|
||||
(man5 (string-append share "/man/man5")))
|
||||
(when (file-exists? "eza.1")
|
||||
(install-file "eza.1" man1))
|
||||
(when (file-exists? "eza_colors.5")
|
||||
(install-file "eza_colors.5" man5))
|
||||
(mkdir-p (string-append out "/etc/bash_completion.d"))
|
||||
(mkdir-p (string-append
|
||||
share "/fish/vendor_completions.d"))
|
||||
(mkdir-p (string-append share "/zsh/site-functions"))
|
||||
(copy-file "completions/bash/eza"
|
||||
(string-append
|
||||
out "/etc/bash_completion.d/eza"))
|
||||
(copy-file "completions/fish/eza.fish"
|
||||
(string-append
|
||||
share "/fish/vendor_completions.d/eza.fish"))
|
||||
(copy-file "completions/zsh/_eza"
|
||||
(string-append
|
||||
share "/zsh/site-functions/_eza"))))))))
|
||||
(native-inputs
|
||||
(append
|
||||
(list pkg-config)
|
||||
(if (supported-package? pandoc)
|
||||
(list pandoc)
|
||||
'())))
|
||||
(inputs (list libgit2-1.7 zlib))
|
||||
(home-page "https://github.com/eza-community/eza")
|
||||
(synopsis "Modern replacement for ls")
|
||||
(description
|
||||
"@code{eza} is a modern replacement for the command-line
|
||||
program @code{ls}. It uses colours to distinguish file types and
|
||||
metadata. It also knows about symlinks, extended attributes, and Git.
|
||||
This package is the community maintained fork of @code{exa}.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public fd
|
||||
(package
|
||||
(name "fd")
|
||||
|
@ -533,18 +633,19 @@ also knows about symlinks, extended attributes, and Git.")
|
|||
(add-after 'install 'install-extra
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "make" "completions")
|
||||
;; Manpages
|
||||
(install-file "doc/fd.1" (string-append out "/share/man/man1"))
|
||||
;; Completions
|
||||
(install-file "autocomplete/fd.bash"
|
||||
(string-append out "/etc/bash_completion.d"))
|
||||
(install-file "autocomplete/fd.fish"
|
||||
(string-append out "/share/fish/vendor_completions.d"))
|
||||
(install-file "autocomplete/_fd"
|
||||
(string-append out "/share/zsh/site-functions"))
|
||||
(rename-file (string-append out "/etc/bash_completion.d/fd.bash")
|
||||
(string-append out "/etc/bash_completion.d/fd"))))))))
|
||||
;; Completions require running the built binary.
|
||||
(unless ,(%current-target-system)
|
||||
(invoke "make" "completions")
|
||||
(install-file "autocomplete/fd.bash"
|
||||
(string-append out "/etc/bash_completion.d"))
|
||||
(install-file "autocomplete/fd.fish"
|
||||
(string-append out "/share/fish/vendor_completions.d"))
|
||||
(install-file "autocomplete/_fd"
|
||||
(string-append out "/share/zsh/site-functions"))
|
||||
(rename-file (string-append out "/etc/bash_completion.d/fd.bash")
|
||||
(string-append out "/etc/bash_completion.d/fd")))))))))
|
||||
(inputs (list jemalloc))
|
||||
(home-page "https://github.com/sharkdp/fd")
|
||||
(synopsis "Simple, fast and user-friendly alternative to find")
|
||||
|
@ -600,6 +701,7 @@ characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
|
|||
`(#:modules ((guix build cargo-build-system)
|
||||
(guix build utils)
|
||||
(srfi srfi-26))
|
||||
#:install-source? #f
|
||||
#:cargo-inputs
|
||||
(("rust-atty" ,rust-atty-0.2)
|
||||
("rust-cfg-if" ,rust-cfg-if-0.1)
|
||||
|
@ -629,13 +731,13 @@ characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
|
|||
(zsh (string-append share "zsh/site-functions")))
|
||||
(install-file "doc/hyperfine.1" man)
|
||||
(for-each (cut install-file <> bash)
|
||||
(find-files "target/release/build" "^hyperfine.bash$"))
|
||||
(find-files "target" "^hyperfine.bash$"))
|
||||
(rename-file (string-append bash "/hyperfine.bash")
|
||||
(string-append bash "/hyperfine"))
|
||||
(for-each (cut install-file <> fish)
|
||||
(find-files "target/release/build" "^hyperfine.fish$"))
|
||||
(find-files "target" "^hyperfine.fish$"))
|
||||
(for-each (cut install-file <> zsh)
|
||||
(find-files "target/release/build" "^_hyperfine$"))))))))
|
||||
(find-files "target" "^_hyperfine$"))))))))
|
||||
(home-page "https://github.com/sharkdp/hyperfine")
|
||||
(synopsis "Command-line benchmarking tool")
|
||||
(description
|
||||
|
@ -829,12 +931,58 @@ bar. It is also compatible with sway.")
|
|||
(with-output-to-file
|
||||
(string-append share "/elvish/lib/just")
|
||||
(lambda _ (invoke just "--completions" "elvish")))))))))
|
||||
(inputs (list bash-minimal coreutils-minimal))
|
||||
(home-page "https://github.com/casey/just")
|
||||
(synopsis "Just a command runner")
|
||||
(description "This package provides @code{just}, a command runner.
|
||||
@code{just} is a handy way to save and run project-specific commands.")
|
||||
(license license:cc0)))
|
||||
|
||||
(define-public kibi
|
||||
(package
|
||||
(name "kibi")
|
||||
(version "0.2.2")
|
||||
(source
|
||||
(origin
|
||||
;; crates.io doesn't have the config files
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/ilai-deutel/kibi")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1s9ka3pfhpssms2y5707f33n59ljnqqwp7jarh2l55a9dhlnl7d3"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:cargo-test-flags `(list "--release" "--"
|
||||
"--skip=syntax::tests::syntax_d_files")
|
||||
#:cargo-inputs `(("rust-libc" ,rust-libc-0.2)
|
||||
("rust-unicode-width" ,rust-unicode-width-0.1)
|
||||
("rust-winapi" ,rust-winapi-0.3)
|
||||
("rust-winapi-util" ,rust-winapi-util-0.1))
|
||||
#:cargo-development-inputs `(("rust-serial-test" ,rust-serial-test-0.5)
|
||||
("rust-tempfile" ,rust-tempfile-3))
|
||||
#:phases #~(modify-phases %standard-phases
|
||||
(add-after 'install 'install-extras
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(share (string-append out "/share"))
|
||||
(syntax.d (string-append share "/syntax.d"))
|
||||
(etc (string-append out "/etc")))
|
||||
(mkdir-p syntax.d)
|
||||
(copy-recursively "syntax.d" syntax.d)
|
||||
(rename-file "config_example.ini" "config.ini")
|
||||
(install-file "config.ini" etc)))))))
|
||||
(home-page "https://github.com/ilai-deutel/kibi")
|
||||
(synopsis "Featureful text editor in less than 1024 lines of code")
|
||||
(description
|
||||
"Inspired by the kilo text editor in C, this package provides a text
|
||||
editor in less than 1024 lines of code with syntax higlighting, search and
|
||||
more.")
|
||||
(license (list license:expat license:asl2.0))))
|
||||
|
||||
(define-public maturin
|
||||
(package
|
||||
(name "maturin")
|
||||
|
@ -985,6 +1133,7 @@ bar. It is also compatible with sway.")
|
|||
(lambda _ (invoke maturin "completions" "elvish")))))))))
|
||||
(propagated-inputs
|
||||
(list python-tomli))
|
||||
(inputs (list bzip2))
|
||||
(native-inputs
|
||||
(list perl
|
||||
python-wheel
|
||||
|
@ -1031,6 +1180,7 @@ bar. It is also compatible with sway.")
|
|||
#:modules ((ice-9 match)
|
||||
(guix build cargo-build-system)
|
||||
(guix build utils))
|
||||
#:install-source? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'build 'install-manpage
|
||||
|
@ -1211,8 +1361,9 @@ touchscreen devices.")
|
|||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(install-file "target/release/swc" bin)))))))
|
||||
(bin (string-append out "/bin"))
|
||||
(swc (car (find-files "target" "^swc$"))))
|
||||
(install-file swc bin)))))))
|
||||
(home-page "https://swc.rs/")
|
||||
(synopsis "Typescript/javascript compiler")
|
||||
(description "@code{rust-swc} is a typescript/javascript compiler. It
|
||||
|
@ -1423,67 +1574,6 @@ rebase.")
|
|||
(base32
|
||||
"006rn3fn4njayjxr2vd24g1awssr9i3894nbmfzkybx07j728vav"))))))
|
||||
|
||||
(define-public rust-cbindgen-0.19
|
||||
(package
|
||||
(inherit rust-cbindgen)
|
||||
(name "rust-cbindgen")
|
||||
(version "0.19.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "cbindgen" version))
|
||||
(file-name
|
||||
(string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1yld9fni9g9mzg4r42zfk79aq9mzm2sfzzjrrx4vir4lp4qqqwiq"))))
|
||||
(arguments
|
||||
`(#:cargo-inputs
|
||||
(("rust-clap" ,rust-clap-2)
|
||||
("rust-heck" ,rust-heck-0.3)
|
||||
("rust-indexmap" ,rust-indexmap-1)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-proc-macro2" ,rust-proc-macro2-1)
|
||||
("rust-quote" ,rust-quote-1)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-serde-json" ,rust-serde-json-1)
|
||||
("rust-syn" ,rust-syn-1)
|
||||
("rust-tempfile" ,rust-tempfile-3)
|
||||
("rust-toml" ,rust-toml-0.5))
|
||||
#:cargo-development-inputs
|
||||
(("rust-serial-test" ,rust-serial-test-0.5))))
|
||||
(native-inputs
|
||||
(list python-cython))))
|
||||
|
||||
(define-public rust-cbindgen-0.16
|
||||
(package
|
||||
(inherit rust-cbindgen)
|
||||
(name "rust-cbindgen")
|
||||
(version "0.16.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "cbindgen" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "049cai626nzw0km03parx4sxwaxgbr7i5ifjbjwnfxkqkj5k2i4k"))))
|
||||
(arguments
|
||||
`(#:tests? #false ;missing files
|
||||
#:cargo-inputs
|
||||
(("rust-clap" ,rust-clap-2)
|
||||
("rust-heck" ,rust-heck-0.3)
|
||||
("rust-indexmap" ,rust-indexmap-1)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-proc-macro2" ,rust-proc-macro2-1)
|
||||
("rust-quote" ,rust-quote-1)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-serde-json" ,rust-serde-json-1)
|
||||
("rust-syn" ,rust-syn-1)
|
||||
("rust-tempfile" ,rust-tempfile-3)
|
||||
("rust-toml" ,rust-toml-0.5))
|
||||
#:cargo-development-inputs
|
||||
(("rust-serial-test" ,rust-serial-test-0.5))))))
|
||||
|
||||
(define-public sniffglue
|
||||
(package
|
||||
(name "sniffglue")
|
||||
|
@ -1553,7 +1643,7 @@ of the project is to be runnable on untrusted networks without crashing.")
|
|||
(base32 "1q4mz2c32gfypx33zlzgd1q9h4322jrk13fzvsf8h676ylclqzpc"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:cargo-build-flags '("--release" "--features" "external-harfbuzz")
|
||||
`(#:install-source? #f
|
||||
#:cargo-inputs
|
||||
(("rust-atty" ,rust-atty-0.2)
|
||||
("rust-byte-unit" ,rust-byte-unit-4)
|
||||
|
@ -1917,220 +2007,41 @@ work. This allows the client to be used in a much simpler way, with the
|
|||
background agent taking care of maintaining the necessary state.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public rust-analyzer
|
||||
(package
|
||||
(name "rust-analyzer")
|
||||
(version "2022-01-10")
|
||||
(source
|
||||
(origin
|
||||
;; The crate at "crates.io" is empty.
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/rust-analyzer/rust-analyzer")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1ci85bp8xwqrk8nqr8sh6yj8njgd98nhgnhaks2g00c77wwyra41"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:rust ,rust-1.64
|
||||
#:install-source? #f ; virtual manifest
|
||||
#:cargo-test-flags
|
||||
'("--release" "--lib" "--tests" "--"
|
||||
"--skip=tests::test_version_check" ;it need rustc's version
|
||||
;; FIXME: Guix's rust does not install source in
|
||||
;; %out/lib/rustlib/src/rust so "can't load standard library from
|
||||
;; sysroot"
|
||||
"--skip=tests::test_loading_rust_analyzer"
|
||||
;; Failed to run rustfmt from toolchain 'stable'. Please run `rustup
|
||||
;; component add rustfmt --toolchain stable` to install it
|
||||
"--skip=tests::sourcegen::sourcegen_assists_docs" ;need rustfmt
|
||||
"--skip=tests::sourcegen_ast::sourcegen_ast" ;same
|
||||
|
||||
"--skip=tidy::check_licenses" ;it runs cargo metadata
|
||||
"--skip=tidy::check_merge_commits" ;it runs git rev-list
|
||||
"--skip=tidy::check_code_formatting" ;need rustfmt as cargo fmt
|
||||
|
||||
;; These tests require rust <= 1.60 and too many packages
|
||||
;; has as dependency rust-serde-json-1 that use indexmap2
|
||||
;; and it need rust >= 1.64
|
||||
"--skip=tests::list_test_macros"
|
||||
"--skip=tests::test_derive_empty"
|
||||
"--skip=tests::test_attr_macro"
|
||||
"--skip=tests::test_fn_like_macro"
|
||||
"--skip=tests::test_fn_like_macro2"
|
||||
"--skip=tests::test_derive_error")
|
||||
#:cargo-development-inputs
|
||||
(("rust-arbitrary" ,rust-arbitrary-1)
|
||||
("rust-derive-arbitrary" ,rust-derive-arbitrary-1)
|
||||
("rust-expect-test" ,rust-expect-test-1)
|
||||
("rust-oorandom" ,rust-oorandom-11)
|
||||
("rust-quote" ,rust-quote-1.0.10)
|
||||
("rust-rayon" ,rust-rayon-1)
|
||||
("rust-tracing" ,rust-tracing-0.1)
|
||||
("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3)
|
||||
("rust-tracing-tree" ,rust-tracing-tree-0.2)
|
||||
("rust-ungrammar" ,rust-ungrammar-1))
|
||||
#:cargo-inputs
|
||||
(("rust-always-assert" ,rust-always-assert-0.1)
|
||||
("rust-anyhow" ,rust-anyhow-1)
|
||||
("rust-anymap" ,rust-anymap-0.12)
|
||||
("rust-arrayvec" ,rust-arrayvec-0.7)
|
||||
("rust-cargo-metadata" ,rust-cargo-metadata-0.14)
|
||||
("rust-cfg-if" ,rust-cfg-if-1)
|
||||
("rust-chalk-ir" ,rust-chalk-ir-0.75)
|
||||
("rust-chalk-recursive" ,rust-chalk-recursive-0.75)
|
||||
("rust-chalk-solve" ,rust-chalk-solve-0.75)
|
||||
("rust-countme" ,rust-countme-3)
|
||||
("rust-cov-mark" ,rust-cov-mark-2)
|
||||
("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
|
||||
("rust-dissimilar" ,rust-dissimilar-1)
|
||||
("rust-dot" ,rust-dot-0.1)
|
||||
("rust-drop-bomb" ,rust-drop-bomb-0.1)
|
||||
("rust-either" ,rust-either-1.6.0)
|
||||
("rust-ena" ,rust-ena-0.14)
|
||||
("rust-env-logger" ,rust-env-logger-0.8)
|
||||
("rust-flate2" ,rust-flate2-1)
|
||||
("rust-fst" ,rust-fst-0.4)
|
||||
("rust-home" ,rust-home-0.5)
|
||||
("rust-indexmap" ,rust-indexmap-1.7)
|
||||
("rust-itertools" ,rust-itertools-0.10)
|
||||
("rust-jod-thread" ,rust-jod-thread-0.1)
|
||||
("rust-libc" ,rust-libc-0.2)
|
||||
("rust-libloading" ,rust-libloading-0.7)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-lsp-server" ,rust-lsp-server-0.5)
|
||||
("rust-lsp-types" ,rust-lsp-types-0.91)
|
||||
("rust-memmap2" ,rust-memmap2-0.5)
|
||||
("rust-mimalloc" ,rust-mimalloc-0.1)
|
||||
("rust-miow" ,rust-miow-0.4)
|
||||
("rust-notify" ,rust-notify-5-pre.13)
|
||||
("rust-object" ,rust-object-0.28)
|
||||
("rust-once-cell" ,rust-once-cell-1)
|
||||
("rust-parking-lot" ,rust-parking-lot-0.11)
|
||||
("rust-perf-event" ,rust-perf-event-0.4)
|
||||
("rust-proc-macro2" ,rust-proc-macro2-1.0.34)
|
||||
("rust-pulldown-cmark" ,rust-pulldown-cmark-0.8)
|
||||
("rust-pulldown-cmark-to-cmark" ,rust-pulldown-cmark-to-cmark-7)
|
||||
("rust-rowan" ,rust-rowan-0.15)
|
||||
("rust-rustc-ap-rustc-lexer" ,rust-rustc-ap-rustc-lexer-725)
|
||||
("rust-rustc-hash" ,rust-rustc-hash-1)
|
||||
("rust-salsa" ,rust-salsa-0.17)
|
||||
("rust-scoped-tls" ,rust-scoped-tls-1)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-serde-json" ,rust-serde-json-1.0.73)
|
||||
("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1)
|
||||
("rust-typed-arena" ,rust-typed-arena-2)
|
||||
("rust-smallvec" ,rust-smallvec-1)
|
||||
("rust-smol-str" ,rust-smol-str-0.1)
|
||||
("rust-snap" ,rust-snap-1)
|
||||
("rust-text-size" ,rust-text-size-1)
|
||||
("rust-threadpool" ,rust-threadpool-1)
|
||||
("rust-tikv-jemalloc-ctl" ,rust-tikv-jemalloc-ctl-0.4)
|
||||
("rust-tikv-jemallocator" ,rust-tikv-jemallocator-0.4)
|
||||
("rust-url" ,rust-url-2)
|
||||
("rust-walkdir" ,rust-walkdir-2)
|
||||
("rust-winapi" ,rust-winapi-0.3)
|
||||
("rust-write-json" ,rust-write-json-0.1)
|
||||
("rust-xflags" ,rust-xflags-0.2)
|
||||
("rust-xshell" ,rust-xshell-0.1))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'fix-tests
|
||||
(lambda _
|
||||
(let ((bash (string-append "#!" (which "bash"))))
|
||||
(with-directory-excursion "crates/parser/test_data/lexer/ok"
|
||||
(substitute* "single_line_comments.txt"
|
||||
(("SHEBANG 19")
|
||||
(string-append "SHEBANG "
|
||||
(number->string (string-length bash))))
|
||||
(("#!/usr/bin/env bash") bash))))))
|
||||
(add-before 'install 'install-doc
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(doc (string-append out "/share/doc/rust-analyzer-"
|
||||
,version)))
|
||||
(copy-recursively "docs" doc))))
|
||||
(add-before 'install 'chdir
|
||||
(lambda _
|
||||
(chdir "crates/rust-analyzer")))
|
||||
(add-after 'install 'wrap-program
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin"))
|
||||
(rust-src-path (search-input-directory
|
||||
inputs "/lib/rustlib/src/rust/library")))
|
||||
;; if environment variable RUST_SRC_PATH is not set, set it,
|
||||
;; make rust-analyzer work out of box.
|
||||
(with-directory-excursion bin
|
||||
(let* ((prog "rust-analyzer")
|
||||
(wrapped-file (string-append (dirname prog)
|
||||
"/." (basename prog) "-real"))
|
||||
(prog-tmp (string-append wrapped-file "-tmp")))
|
||||
(link prog wrapped-file)
|
||||
(call-with-output-file prog-tmp
|
||||
(lambda (port)
|
||||
(format port "#!~a
|
||||
if test -z \"${RUST_SRC_PATH}\";then export RUST_SRC_PATH=~S;fi;
|
||||
exec -a \"$0\" \"~a\" \"$@\""
|
||||
(which "bash")
|
||||
rust-src-path
|
||||
(canonicalize-path wrapped-file))))
|
||||
(chmod prog-tmp #o755)
|
||||
(rename-file prog-tmp prog))))))
|
||||
(replace 'install-license-files
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(doc (string-append out "/share/doc/rust-analyzer-"
|
||||
,version)))
|
||||
(chdir "../..")
|
||||
(install-file "LICENSE-MIT" doc)
|
||||
(install-file "LICENSE-APACHE" doc)))))))
|
||||
(native-inputs (list rust-src-1.64))
|
||||
(home-page "https://rust-analyzer.github.io/")
|
||||
(synopsis "Experimental Rust compiler front-end for IDEs")
|
||||
(description "Rust-analyzer is a modular compiler frontend for the Rust
|
||||
language. It is a part of a larger rls-2.0 effort to create excellent IDE
|
||||
support for Rust.")
|
||||
(license (list license:expat license:asl2.0))))
|
||||
|
||||
;;; Note: keep in sync with our current Rust/Cargo version.
|
||||
(define-public rust-cargo-c
|
||||
(package
|
||||
(name "rust-cargo-c")
|
||||
(version "0.9.18+cargo-0.69")
|
||||
(version "0.9.27+cargo-0.74.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "cargo-c" version))
|
||||
(file-name
|
||||
(string-append name "-" version ".tar.gz"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"191d0813g4m2g1c1h8ykgrfp00blkbds6pg3zl044iyxaclng29h"))))
|
||||
(base32 "1xsw17zcxzlg7d7pg40anm9w8g95kvnxfp7ln9sbgv3zhsc9wggq"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:cargo-inputs
|
||||
(("rust-anyhow" ,rust-anyhow-1)
|
||||
("rust-cargo" ,rust-cargo-0.69)
|
||||
("rust-cargo" ,rust-cargo-0.74)
|
||||
("rust-cargo-util" ,rust-cargo-util-0.2)
|
||||
("rust-cbindgen" ,rust-cbindgen-0.24)
|
||||
("rust-cbindgen" ,rust-cbindgen-0.26)
|
||||
("rust-cc" ,rust-cc-1)
|
||||
("rust-clap" ,rust-clap-4)
|
||||
("rust-glob" ,rust-glob-0.3)
|
||||
("rust-itertools" ,rust-itertools-0.10)
|
||||
("rust-itertools" ,rust-itertools-0.11)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-regex" ,rust-regex-1)
|
||||
("rust-semver" ,rust-semver-1)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-serde-derive" ,rust-serde-derive-1)
|
||||
("rust-serde-json" ,rust-serde-json-1)
|
||||
("rust-toml" ,rust-toml-0.7))))
|
||||
("rust-toml" ,rust-toml-0.7)
|
||||
("rust-windows-sys" ,rust-windows-sys-0.48))))
|
||||
(native-inputs
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
(list curl libgit2 libssh2 openssl zlib))
|
||||
(list curl libgit2-1.6 libssh2 openssl zlib))
|
||||
(home-page "https://github.com/lu-zero/cargo-c")
|
||||
(synopsis "Build and install C-compatible libraries")
|
||||
(description
|
||||
|
@ -2284,6 +2195,66 @@ consecutive lines and since program start.")
|
|||
(define-public rust-skim-0.7
|
||||
(deprecated-package "rust-skim-0.7" skim-0.7))
|
||||
|
||||
(define-public spotifyd
|
||||
(package
|
||||
(name "spotifyd")
|
||||
(version "0.3.5")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "spotifyd" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1g6k8xmx8xvc2dpak14y8cc2221djhdflzsjczygvqa9gk5jiadd"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:install-source? #f
|
||||
#:cargo-inputs (("rust-alsa" ,rust-alsa-0.7)
|
||||
("rust-chrono" ,rust-chrono-0.4)
|
||||
("rust-color-eyre" ,rust-color-eyre-0.6)
|
||||
("rust-daemonize" ,rust-daemonize-0.5)
|
||||
("rust-dbus" ,rust-dbus-0.9)
|
||||
("rust-dbus-crossroads" ,rust-dbus-crossroads-0.5)
|
||||
("rust-dbus-tokio" ,rust-dbus-tokio-0.7)
|
||||
("rust-fern" ,rust-fern-0.6)
|
||||
("rust-futures" ,rust-futures-0.3)
|
||||
("rust-gethostname" ,rust-gethostname-0.4)
|
||||
("rust-hex" ,rust-hex-0.4)
|
||||
("rust-keyring" ,rust-keyring-2)
|
||||
("rust-libc" ,rust-libc-0.2)
|
||||
("rust-librespot-audio" ,rust-librespot-audio-0.4)
|
||||
("rust-librespot-connect" ,rust-librespot-connect-0.4)
|
||||
("rust-librespot-core" ,rust-librespot-core-0.4)
|
||||
("rust-librespot-discovery" ,rust-librespot-discovery-0.4)
|
||||
("rust-librespot-playback" ,rust-librespot-playback-0.4)
|
||||
("rust-log" ,rust-log-0.4)
|
||||
("rust-rspotify" ,rust-rspotify-0.11)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-sha-1" ,rust-sha-1-0.10)
|
||||
("rust-structopt" ,rust-structopt-0.3)
|
||||
("rust-syslog" ,rust-syslog-6)
|
||||
("rust-tokio" ,rust-tokio-1)
|
||||
("rust-tokio-stream" ,rust-tokio-stream-0.1)
|
||||
("rust-toml" ,rust-toml-0.7)
|
||||
("rust-url" ,rust-url-2)
|
||||
("rust-whoami" ,rust-whoami-1)
|
||||
("rust-xdg" ,rust-xdg-2))
|
||||
#:cargo-development-inputs (("rust-env-logger" ,rust-env-logger-0.10))
|
||||
#:features (list "alsa_backend"
|
||||
"dbus_keyring"
|
||||
;"dbus_mpris" ; Conflicts with rust-chrono-0.4 version.
|
||||
"pulseaudio_backend"
|
||||
"rodio_backend")))
|
||||
(native-inputs (list perl pkg-config))
|
||||
(inputs (list alsa-lib dbus pulseaudio))
|
||||
(home-page "https://github.com/Spotifyd/spotifyd")
|
||||
(synopsis "Spotify streaming daemon with Spotify Connect support")
|
||||
(description
|
||||
"This package provides a light-weight daemon that connects to the Spotify
|
||||
music service. A Spotifyd instance can be controlled by clients that use the
|
||||
Spotify Connect protocol, which includes the official Spotify mobile apps.")
|
||||
(license license:gpl3)))
|
||||
|
||||
(define-public svd2rust
|
||||
(package
|
||||
(name "svd2rust")
|
||||
|
@ -2522,14 +2493,7 @@ It will then write @code{fixup!} commits for each of those changes.")
|
|||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1815hz1a93brj6v9102xypds1qslf6gxgk9vcvxhxlhy1c2pfxvj"))
|
||||
(snippet
|
||||
#~(begin (use-modules (guix build utils))
|
||||
(substitute* "Cargo.toml"
|
||||
(("1\\.0\\.75") "1.0.68") ; rust-anyhow
|
||||
(("0\\.4\\.19") "0.4.17") ; rust-log
|
||||
(("1\\.9\\.4") "1.9.1") ; regex
|
||||
(("3\\.3") "3.0")))))) ; serde-with
|
||||
"1815hz1a93brj6v9102xypds1qslf6gxgk9vcvxhxlhy1c2pfxvj"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:features '()
|
||||
|
@ -2667,7 +2631,8 @@ It will then write @code{fixup!} commits for each of those changes.")
|
|||
(base32 "0y5v2vgl9f3n0n0w4b3iddbfyxv0hls0vw5406ry0hcvnnjyy2l3"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
(list #:cargo-inputs
|
||||
(list #:install-source? #f
|
||||
#:cargo-inputs
|
||||
`(("rust-anyhow" ,rust-anyhow-1)
|
||||
("rust-askama" ,rust-askama-0.11)
|
||||
("rust-bincode" ,rust-bincode-1)
|
||||
|
@ -2685,26 +2650,7 @@ It will then write @code{fixup!} commits for each of those changes.")
|
|||
`(("rust-assert-cmd" ,rust-assert-cmd-2)
|
||||
("rust-rstest" ,rust-rstest-0.15)
|
||||
("rust-rstest-reuse" ,rust-rstest-reuse-0.4)
|
||||
("rust-tempfile" ,rust-tempfile-3))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'use-older-rust
|
||||
(lambda _
|
||||
(setenv "RUSTC_BOOTSTRAP" "1")
|
||||
(substitute* "Cargo.toml"
|
||||
(("^rust-version = .*$")
|
||||
(string-append
|
||||
"rust-version = \""
|
||||
#$(package-version rust)
|
||||
"\"\n")))
|
||||
(substitute* "src/main.rs"
|
||||
(("#!\\[allow\\(clippy::single_component_path_imports)]")
|
||||
"#![feature(total_cmp)]"))
|
||||
(substitute* "src/cmd/query.rs"
|
||||
(("let handle = &mut io::stdout\\()\\.lock\\();")
|
||||
"\
|
||||
let _stdout = io::stdout();
|
||||
let handle = &mut _stdout.lock();")))))))
|
||||
("rust-tempfile" ,rust-tempfile-3))))
|
||||
(home-page "https://github.com/ajeetdsouza/zoxide/")
|
||||
(synopsis "Fast way to navigate your file system")
|
||||
(description
|
||||
|
|
|
@ -40,29 +40,34 @@
|
|||
#:use-module (gnu packages bootstrap)
|
||||
#:use-module (gnu packages cmake)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages cross-base)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages elf)
|
||||
#:use-module (gnu packages flex)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages gdb)
|
||||
#:use-module (gnu packages jemalloc)
|
||||
#:use-module (gnu packages libunwind)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages llvm)
|
||||
#:use-module (gnu packages mingw)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages ssh)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (guix build-system cargo)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module ((guix build utils) #:select (alist-replace))
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 optargs)
|
||||
#:use-module (srfi srfi-26))
|
||||
|
||||
;; This is the hash for the empty file, and the reason it's relevant is not
|
||||
|
@ -103,6 +108,10 @@
|
|||
("aarch64-linux" "aarch64-unknown-linux-gnu")
|
||||
("mips64el-linux" "mips64el-unknown-linux-gnuabi64")
|
||||
("riscv64-linux" "riscv64gc-unknown-linux-gnu")
|
||||
("i586-gnu" "i686-unknown-hurd-gnu")
|
||||
("i686-gnu" "i686-unknown-hurd-gnu")
|
||||
("i686-mingw" "i686-pc-windows-gnu")
|
||||
("x86_64-mingw" "x86_64-pc-windows-gnu")
|
||||
(_ (nix-system->gnu-triplet system))))
|
||||
|
||||
(define* (rust-uri version #:key (dist "static"))
|
||||
|
@ -825,7 +834,7 @@ safety and thread safety guarantees.")
|
|||
;;; Here we take the latest included Rust, make it public, and re-enable tests
|
||||
;;; and extra components such as rustfmt.
|
||||
(define-public rust
|
||||
(let ((base-rust rust-1.70))
|
||||
(let ((base-rust rust-1.73))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(outputs (cons* "rust-src" "tools" (package-outputs base-rust)))
|
||||
|
@ -856,11 +865,42 @@ safety and thread safety guarantees.")
|
|||
'("fn fetch_downloads_with_git2_first_")))))
|
||||
(add-after 'unpack 'disable-tests-requiring-mercurial
|
||||
(lambda _
|
||||
(with-directory-excursion "src/tools/cargo/tests/testsuite/init"
|
||||
(with-directory-excursion "src/tools/cargo/tests/testsuite/cargo_init"
|
||||
(substitute* '("mercurial_autodetect/mod.rs"
|
||||
"simple_hg_ignore_exists/mod.rs")
|
||||
,@(make-ignore-test-list
|
||||
'("fn case"))))))
|
||||
(add-after 'unpack 'disable-tests-using-cargo-publish
|
||||
(lambda _
|
||||
(with-directory-excursion "src/tools/cargo/tests/testsuite"
|
||||
(substitute* "alt_registry.rs"
|
||||
,@(make-ignore-test-list
|
||||
'("fn warn_for_unused_fields")))
|
||||
(substitute* '("cargo_add/locked_unchanged/mod.rs"
|
||||
"cargo_add/lockfile_updated/mod.rs"
|
||||
"cargo_remove/update_lock_file/mod.rs")
|
||||
,@(make-ignore-test-list
|
||||
'("fn case")))
|
||||
(substitute* "git_shallow.rs"
|
||||
,@(make-ignore-test-list
|
||||
'("fn gitoxide_clones_git_dependency_with_shallow_protocol_and_git2_is_used_for_followup_fetches"
|
||||
"fn gitoxide_clones_registry_with_shallow_protocol_and_aborts_and_updates_again"
|
||||
"fn gitoxide_clones_registry_with_shallow_protocol_and_follow_up_fetch_maintains_shallowness"
|
||||
"fn gitoxide_clones_registry_with_shallow_protocol_and_follow_up_with_git2_fetch"
|
||||
"fn gitoxide_clones_registry_without_shallow_protocol_and_follow_up_fetch_uses_shallowness"
|
||||
"fn gitoxide_shallow_clone_followed_by_non_shallow_update"
|
||||
"fn gitoxide_clones_shallow_two_revs_same_deps"
|
||||
"fn gitoxide_git_dependencies_switch_from_branch_to_rev"
|
||||
"fn shallow_deps_work_with_revisions_and_branches_mixed_on_same_dependency")))
|
||||
(substitute* "install.rs"
|
||||
,@(make-ignore-test-list
|
||||
'("fn failed_install_retains_temp_directory")))
|
||||
(substitute* "offline.rs"
|
||||
,@(make-ignore-test-list
|
||||
'("fn gitoxide_cargo_compile_offline_with_cached_git_dep_shallow_dep")))
|
||||
(substitute* "patch.rs"
|
||||
,@(make-ignore-test-list
|
||||
'("fn gitoxide_clones_shallow_old_git_patch"))))))
|
||||
(add-after 'unpack 'disable-tests-broken-on-aarch64
|
||||
(lambda _
|
||||
(with-directory-excursion "src/tools/cargo/tests/testsuite/"
|
||||
|
@ -998,30 +1038,216 @@ safety and thread safety guarantees.")
|
|||
(copy-recursively "src" (string-append out dest "/src")))))
|
||||
(add-after 'install-rust-src 'wrap-rust-analyzer
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(wrap-program (string-append (assoc-ref outputs "tools")
|
||||
"/bin/rust-analyzer")
|
||||
`("RUST_SRC_PATH" ":" =
|
||||
(,(string-append (assoc-ref outputs "rust-src")
|
||||
"/lib/rustlib/src/rust/library"))))))))))
|
||||
(let ((bin (string-append (assoc-ref outputs "tools") "/bin")))
|
||||
(rename-file (string-append bin "/rust-analyzer")
|
||||
(string-append bin "/.rust-analyzer-real"))
|
||||
(call-with-output-file (string-append bin "/rust-analyzer")
|
||||
(lambda (port)
|
||||
(format port "#!~a
|
||||
if test -z \"${RUST_SRC_PATH}\";then export RUST_SRC_PATH=~S;fi;
|
||||
exec -a \"$0\" \"~a\" \"$@\""
|
||||
(which "bash")
|
||||
(string-append (assoc-ref outputs "rust-src")
|
||||
"/lib/rustlib/src/rust/library")
|
||||
(string-append bin "/.rust-analyzer-real"))))
|
||||
(chmod (string-append bin "/rust-analyzer") #o755))))))))
|
||||
;; Add test inputs.
|
||||
(native-inputs (cons* `("gdb" ,gdb/pinned)
|
||||
`("procps" ,procps)
|
||||
(package-native-inputs base-rust))))))
|
||||
|
||||
(define-public rust-src-1.64
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit rust-1.64)
|
||||
(name "rust-src")
|
||||
(build-system copy-build-system)
|
||||
(native-inputs '())
|
||||
(inputs '())
|
||||
(native-search-paths '())
|
||||
(outputs '("out"))
|
||||
(arguments
|
||||
`(#:install-plan
|
||||
'(("library" "lib/rustlib/src/rust/library")
|
||||
("src" "lib/rustlib/src/rust/src"))))
|
||||
(synopsis "Source code for the Rust standard library")
|
||||
(description "This package provide source code for the Rust standard
|
||||
library, only use by rust-analyzer, make rust-analyzer out of the box."))))
|
||||
(define*-public (make-rust-sysroot target)
|
||||
(let ((base-rust rust))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(name (string-append "rust-sysroot-for-" target))
|
||||
(outputs '("out"))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:tests? _ #f) #f) ; This package for cross-building.
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-after 'unpack 'unbundle-xz
|
||||
(lambda _
|
||||
(delete-file-recursively "vendor/lzma-sys/xz-5.2")
|
||||
;; Remove the option of using the static library.
|
||||
;; This is necessary for building the sysroot.
|
||||
(substitute* "vendor/lzma-sys/build.rs"
|
||||
(("!want_static && ") ""))))
|
||||
,@(if (target-mingw? target)
|
||||
`((add-after 'set-env 'patch-for-mingw
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(setenv "LIBRARY_PATH"
|
||||
(string-join
|
||||
(delete
|
||||
(string-append
|
||||
(or (assoc-ref inputs "mingw-w64-i686-winpthreads")
|
||||
(assoc-ref inputs "mingw-w64-x86_64-winpthreads"))
|
||||
"/lib")
|
||||
(string-split (getenv "LIBRARY_PATH") #\:))
|
||||
":"))
|
||||
(setenv "CPLUS_INCLUDE_PATH"
|
||||
(string-join
|
||||
(delete
|
||||
(string-append
|
||||
(or (assoc-ref inputs "mingw-w64-i686-winpthreads")
|
||||
(assoc-ref inputs "mingw-w64-x86_64-winpthreads"))
|
||||
"/include")
|
||||
(string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
|
||||
":"))
|
||||
;; When building a rust-sysroot this crate is only used for
|
||||
;; the rust-installer.
|
||||
(substitute* "vendor/num_cpus/src/linux.rs"
|
||||
(("\\.ceil\\(\\)") ""))
|
||||
;; gcc doesn't recognize this flag.
|
||||
(substitute*
|
||||
"compiler/rustc_target/src/spec/windows_gnullvm_base.rs"
|
||||
((", \"--unwindlib=none\"") "")))))
|
||||
`())
|
||||
(replace 'set-env
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(setenv "SHELL" (which "sh"))
|
||||
(setenv "CONFIG_SHELL" (which "sh"))
|
||||
(setenv "CC" (which "gcc"))
|
||||
;; The Guix LLVM package installs only shared libraries.
|
||||
(setenv "LLVM_LINK_SHARED" "1")
|
||||
|
||||
(setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
|
||||
(setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
|
||||
(when (assoc-ref inputs (string-append "glibc-cross-" ,target))
|
||||
(setenv "LIBRARY_PATH"
|
||||
(string-join
|
||||
(delete
|
||||
(string-append
|
||||
(assoc-ref inputs
|
||||
(string-append "glibc-cross-" ,target))
|
||||
"/lib")
|
||||
(string-split (getenv "LIBRARY_PATH") #\:))
|
||||
":"))
|
||||
(setenv "CPLUS_INCLUDE_PATH"
|
||||
(string-join
|
||||
(delete
|
||||
(string-append
|
||||
(assoc-ref inputs
|
||||
(string-append "glibc-cross-" ,target))
|
||||
"/include")
|
||||
(string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
|
||||
":")))))
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(target-cc
|
||||
(search-input-file
|
||||
inputs (string-append "/bin/" ,(cc-for-target target)))))
|
||||
(call-with-output-file "config.toml"
|
||||
(lambda (port)
|
||||
(display (string-append "
|
||||
[llvm]
|
||||
[build]
|
||||
cargo = \"" (search-input-file inputs "/bin/cargo") "\"
|
||||
rustc = \"" (search-input-file inputs "/bin/rustc") "\"
|
||||
docs = false
|
||||
python = \"" (which "python") "\"
|
||||
vendor = true
|
||||
submodules = false
|
||||
target = [\"" ,(nix-system->gnu-triplet-for-rust (gnu-triplet->nix-system target)) "\"]
|
||||
[install]
|
||||
prefix = \"" out "\"
|
||||
sysconfdir = \"etc\"
|
||||
[rust]
|
||||
debug = false
|
||||
jemalloc = false
|
||||
default-linker = \"" target-cc "\"
|
||||
channel = \"stable\"
|
||||
[target." ,(nix-system->gnu-triplet-for-rust) "]
|
||||
# These are all native tools
|
||||
llvm-config = \"" (search-input-file inputs "/bin/llvm-config") "\"
|
||||
linker = \"" (which "gcc") "\"
|
||||
cc = \"" (which "gcc") "\"
|
||||
cxx = \"" (which "g++") "\"
|
||||
ar = \"" (which "ar") "\"
|
||||
[target." ,(nix-system->gnu-triplet-for-rust (gnu-triplet->nix-system target)) "]
|
||||
llvm-config = \"" (search-input-file inputs "/bin/llvm-config") "\"
|
||||
linker = \"" target-cc "\"
|
||||
cc = \"" target-cc "\"
|
||||
cxx = \"" (search-input-file inputs (string-append "/bin/" ,(cxx-for-target target))) "\"
|
||||
ar = \"" (search-input-file inputs (string-append "/bin/" ,(ar-for-target target))) "\"
|
||||
[dist]
|
||||
") port))))))
|
||||
(replace 'build
|
||||
;; Phase overridden to build the necessary directories.
|
||||
(lambda* (#:key parallel-build? #:allow-other-keys)
|
||||
(let ((job-spec (string-append
|
||||
"-j" (if parallel-build?
|
||||
(number->string (parallel-job-count))
|
||||
"1"))))
|
||||
;; This works for us with the --sysroot flag
|
||||
;; and then we can build ONLY library/std
|
||||
(invoke "./x.py" job-spec "build" "library/std"))))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(invoke "./x.py" "install" "library/std")))
|
||||
(add-after 'install 'remove-uninstall-script
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; This script has no use on Guix
|
||||
;; and it retains a reference to the host's bash.
|
||||
(delete-file (string-append (assoc-ref outputs "out")
|
||||
"/lib/rustlib/uninstall.sh"))))
|
||||
(delete 'install-rust-src)
|
||||
(delete 'wrap-rust-analyzer)
|
||||
(delete 'wrap-rustc)))))
|
||||
(inputs
|
||||
(modify-inputs (package-inputs base-rust)
|
||||
(prepend xz))) ; for lzma-sys
|
||||
(propagated-inputs
|
||||
(if (target-mingw? target)
|
||||
(modify-inputs (package-propagated-inputs base-rust)
|
||||
(prepend
|
||||
(if (string=? "i686-w64-mingw32" target)
|
||||
mingw-w64-i686-winpthreads
|
||||
mingw-w64-x86_64-winpthreads)))
|
||||
(package-propagated-inputs base-rust)))
|
||||
(native-inputs
|
||||
(if (target-mingw? target)
|
||||
(modify-inputs (package-native-inputs base-rust)
|
||||
(prepend (cross-gcc target
|
||||
#:libc (cross-libc target))
|
||||
(cross-binutils target)
|
||||
(if (string=? "i686-w64-mingw32" target)
|
||||
mingw-w64-i686-winpthreads
|
||||
mingw-w64-x86_64-winpthreads)
|
||||
libunwind))
|
||||
(modify-inputs (package-native-inputs base-rust)
|
||||
(prepend (cross-gcc target
|
||||
#:libc (cross-libc target))
|
||||
(cross-libc target)
|
||||
(cross-binutils target)))))
|
||||
(properties
|
||||
`((hidden? . #t)
|
||||
,(package-properties base-rust))))))
|
||||
|
||||
(define-public rust-analyzer
|
||||
(package
|
||||
(name "rust-analyzer")
|
||||
(version (package-version rust))
|
||||
(source #f)
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:modules '((guix build utils))
|
||||
#:builder
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(let ((rust (assoc-ref %build-inputs "rust")))
|
||||
(install-file (string-append rust "/bin/rust-analyzer")
|
||||
(string-append #$output "/bin"))
|
||||
(copy-recursively (string-append rust "/share")
|
||||
(string-append #$output "/share"))))))
|
||||
(inputs
|
||||
(list (list rust "tools")))
|
||||
(home-page "https://rust-analyzer.github.io/")
|
||||
(synopsis "Experimental Rust compiler front-end for IDEs")
|
||||
(description "Rust-analyzer is a modular compiler frontend for the Rust
|
||||
language. It is a part of a larger rls-2.0 effort to create excellent IDE
|
||||
support for Rust.")
|
||||
(license (list license:expat license:asl2.0))))
|
||||
|
|
|
@ -287,6 +287,14 @@ cards.")
|
|||
(("^doc:.*") "doc:\n")
|
||||
(("install-podboat install-docs") "install-podboat")))))
|
||||
'())
|
||||
(add-after 'unpack 'pre-build
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(setenv "CXX" ,(cxx-for-target))
|
||||
(setenv "CXX_FOR_BUILD" (which "g++"))
|
||||
(substitute* "config.sh"
|
||||
(("if curl-config")
|
||||
(string-append
|
||||
"if " (search-input-file inputs "/bin/curl-config"))))))
|
||||
(add-after 'configure 'dont-vendor-self
|
||||
(lambda* (#:key vendor-dir #:allow-other-keys)
|
||||
;; Don't keep the whole tarball in the vendor directory
|
||||
|
@ -301,9 +309,10 @@ cards.")
|
|||
(replace 'build
|
||||
(assoc-ref gnu:%standard-phases 'build))
|
||||
(replace 'check
|
||||
(lambda args
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "test")))
|
||||
(lambda* (#:key tests? #:allow-other-keys #:rest args)
|
||||
(when tests?
|
||||
((assoc-ref gnu:%standard-phases 'check)
|
||||
#:test-target "test"))))
|
||||
(replace 'install
|
||||
(assoc-ref gnu:%standard-phases 'install)))))
|
||||
(native-search-paths
|
||||
|
|
|
@ -1610,14 +1610,14 @@ basic input/output.")
|
|||
(search-input-file inputs "lib/libxkbcommon.so")))))
|
||||
(replace 'install
|
||||
;; Upstream install script only takes care of executable.
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin"))
|
||||
(share (string-append out "/share"))
|
||||
(icons (string-append share "/icons/hicolor/scalable/apps"))
|
||||
(tic (search-input-file inputs "/bin/tic"))
|
||||
(tic (search-input-file (or native-inputs inputs) "/bin/tic"))
|
||||
(man (string-append share "/man/man1"))
|
||||
(alacritty-bin "target/release/alacritty"))
|
||||
(alacritty-bin (car (find-files "target" "^alacritty$"))))
|
||||
;; Install the executable.
|
||||
(install-file alacritty-bin bin)
|
||||
;; Install man pages.
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
;;; Copyright © 2015, 2022 David Thompson <davet@gnu.org>
|
||||
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
|
||||
;;; Copyright © 2023 Kjartan Oli Agustsson <kjartanoli@disroot.org>
|
||||
;;; Copyright © 2023 Steve George <steve@futurile.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -74,6 +75,7 @@
|
|||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix hg-download)
|
||||
#:use-module (guix build-system cargo)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix build-system gnu)
|
||||
|
@ -91,6 +93,7 @@
|
|||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages cook)
|
||||
#:use-module (gnu packages crates-io)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages databases)
|
||||
#:use-module (gnu packages docbook)
|
||||
|
@ -886,6 +889,48 @@ write native speed custom Git applications in any language with bindings.")
|
|||
;; GPLv2 with linking exception
|
||||
(license license:gpl2)))
|
||||
|
||||
(define-public libgit2-1.7
|
||||
(package
|
||||
(inherit libgit2)
|
||||
(version "1.7.1")
|
||||
(source (origin
|
||||
(inherit (package-source libgit2))
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/libgit2/libgit2")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name "libgit2" version))
|
||||
(sha256
|
||||
(base32
|
||||
"1wq6a91k97gbsyafla39yvn1lnr559hqc41ksz1qxv7flf5kyvfx"))
|
||||
;; We need to use the bundled xdiff until an option is given
|
||||
;; to use the one from git.
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
(for-each delete-file-recursively
|
||||
'("deps/chromium-zlib"
|
||||
"deps/http-parser"
|
||||
"deps/ntlmclient"
|
||||
"deps/pcre"
|
||||
"deps/winhttp"
|
||||
"deps/zlib"))))))))
|
||||
|
||||
(define-public libgit2-1.6
|
||||
(package
|
||||
(inherit libgit2)
|
||||
(version "1.6.4")
|
||||
(source (origin
|
||||
(inherit (package-source libgit2))
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/libgit2/libgit2")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name "libgit2" version))
|
||||
(sha256
|
||||
(base32
|
||||
"078jnis7lwzb38ha5lcrs8hzi4br3c8v7c9xaqkvkcaa8nifcvcm"))))))
|
||||
|
||||
(define-public libgit2-1.4
|
||||
(package
|
||||
(inherit libgit2)
|
||||
|
@ -1475,6 +1520,91 @@ subcommands helps automate some parts of the flow to make working with it a
|
|||
lot easier.")
|
||||
(license license:bsd-2)))
|
||||
|
||||
(define-public stgit-2
|
||||
(package
|
||||
(name "stgit")
|
||||
(version "2.4.0")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/stacked-git/stgit")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0cgv7chxqkjaqmzi4691in26j2fm8r0vanw8xzb9cqnz6350wvvj"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:cargo-inputs (("rust-anstyle" ,rust-anstyle-1)
|
||||
("rust-anyhow" ,rust-anyhow-1)
|
||||
("rust-bstr" ,rust-bstr-1)
|
||||
("rust-bzip2-rs" ,rust-bzip2-rs-0.1)
|
||||
("rust-clap" ,rust-clap-4)
|
||||
("rust-ctrlc" ,rust-ctrlc-3)
|
||||
("rust-curl" ,rust-curl-0.4)
|
||||
("rust-encoding_rs" ,rust-encoding-rs-0.8)
|
||||
("rust-flate2" ,rust-flate2-1)
|
||||
("rust-gix" ,rust-gix-0.54)
|
||||
("rust-indexmap" ,rust-indexmap-2)
|
||||
("rust-is-terminal" ,rust-is-terminal-0.4)
|
||||
("rust-nom" ,rust-nom-7)
|
||||
("rust-serde" ,rust-serde-1)
|
||||
("rust-serde-json" ,rust-serde-json-1)
|
||||
("rust-strsim" ,rust-strsim-0.10)
|
||||
("rust-tar" ,rust-tar-0.4)
|
||||
("rust-tempfile" ,rust-tempfile-3)
|
||||
("rust-termcolor" ,rust-termcolor-1)
|
||||
("rust-thiserror" ,rust-thiserror-1)
|
||||
("rust-time" ,rust-time-0.3))
|
||||
#:install-source? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'build 'build-extras
|
||||
(lambda _
|
||||
(substitute* "Documentation/Makefile"
|
||||
(("docbook2x-texi") "docbook2texi"))
|
||||
(setenv "PERL_PATH" "perl")
|
||||
(invoke "make" "-C" "Documentation" "info")
|
||||
(invoke "make" "-C" "completion" "stgit.bash")
|
||||
(invoke "make" "-C" "completion" "stg.fish")))
|
||||
(add-after 'install 'install-extras
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "make" "-C" "Documentation" "install-info"
|
||||
(string-append "prefix=" out))
|
||||
(invoke "make" "-C" "completion" "install"
|
||||
(string-append "prefix=" out)
|
||||
(string-append "bashdir=" out "/etc/bash_completion.d/"))))))))
|
||||
(native-inputs
|
||||
(list pkg-config
|
||||
;; For the documentation
|
||||
asciidoc
|
||||
docbook2x
|
||||
libxslt
|
||||
perl
|
||||
texinfo
|
||||
xmlto))
|
||||
(inputs (list openssl zlib curl))
|
||||
(home-page "https://stacked-git.github.io/")
|
||||
(synopsis "Stacked Git (StGit) manages Git commits as a stack of patches")
|
||||
(description "StGit uses a patch stack workflow. Each individual patch
|
||||
focuses on a single concern, while a stack of patches forms a series of commits.
|
||||
Patches are stored as normal git commits, allowing easy merging of StGit
|
||||
patches into other repositories using standard Git.
|
||||
|
||||
Features include:
|
||||
@itemize
|
||||
@item Import and export patches from Git with @command{stg commit} and
|
||||
@command{stg uncommit}
|
||||
@item Create new patches and add them to the stack with @command{stg new}
|
||||
@item Update a patch from the working tree with @command{stg refresh} and
|
||||
@command{stg edit}
|
||||
@item See information about the stack or patch with @command{stg series} and
|
||||
@command{stg show}
|
||||
@item Export and send a series of patches by email using @command{stg email}
|
||||
@end itemize")
|
||||
(license license:gpl2)))
|
||||
|
||||
(define-public stgit
|
||||
(package
|
||||
(name "stgit")
|
||||
|
|
|
@ -5588,12 +5588,9 @@ result in several formats:
|
|||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "cargo" "cinstall" "--release"
|
||||
(string-append "--prefix=" out)))))
|
||||
(add-after 'install 'delete-static-library
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Delete 93 MiB (!) static library.
|
||||
(delete-file (string-append (assoc-ref outputs "out")
|
||||
"/lib/librav1e.a")))))))
|
||||
;; Only build the dynamic library.
|
||||
"--library-type" "cdylib"
|
||||
(string-append "--prefix=" out))))))))
|
||||
(native-inputs
|
||||
(list nasm pkg-config rust-cargo-c))
|
||||
(inputs
|
||||
|
|
|
@ -1498,7 +1498,11 @@ treat it as part of their software base when porting.")
|
|||
"1zi0r6mqa1g0hhsp02cdsjcxmsbipiv0v65c1h4pl84fydcjikbm"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:configure-flags '("--disable-static")))
|
||||
`(#:configure-flags '("--disable-static"
|
||||
;; This fixes cross compiling.
|
||||
,@(if (%current-target-system)
|
||||
'("--enable-malloc0returnsnull=yes")
|
||||
'()))))
|
||||
(propagated-inputs
|
||||
(list libx11 libxext xorgproto))
|
||||
(native-inputs
|
||||
|
|
|
@ -55,12 +55,18 @@
|
|||
to NAME and VERSION."
|
||||
(string-append crate-url name "/" version "/download"))
|
||||
|
||||
(define (default-rust)
|
||||
(define (default-rust target)
|
||||
"Return the default Rust package."
|
||||
;; Lazily resolve the binding to avoid a circular dependency.
|
||||
(let ((rust (resolve-interface '(gnu packages rust))))
|
||||
(module-ref rust 'rust)))
|
||||
|
||||
(define (default-rust-sysroot target)
|
||||
"Return the default Rust sysroot for <target>."
|
||||
;; Lazily resolve the binding to avoid a circular dependency.
|
||||
(let ((module (resolve-interface '(gnu packages rust))))
|
||||
(module-ref module 'make-rust-sysroot)))
|
||||
|
||||
(define %cargo-utils-modules
|
||||
;; Build-side modules imported by default.
|
||||
`((guix build cargo-utils)
|
||||
|
@ -126,6 +132,69 @@ to NAME and VERSION."
|
|||
#:graft? #f
|
||||
#:guile-for-build guile))
|
||||
|
||||
(define* (cargo-cross-build name
|
||||
#:key
|
||||
source target
|
||||
build-inputs target-inputs host-inputs
|
||||
(tests? #f)
|
||||
(test-target #f)
|
||||
(vendor-dir "guix-vendor")
|
||||
(cargo-build-flags ''("--release"))
|
||||
(cargo-test-flags ''("--release"))
|
||||
(cargo-package-flags ''("--no-metadata" "--no-verify"))
|
||||
(features ''())
|
||||
(skip-build? #f)
|
||||
(install-source? (not (target-mingw? target)))
|
||||
(phases '%standard-phases)
|
||||
(outputs '("out"))
|
||||
(search-paths '())
|
||||
(native-search-paths '())
|
||||
(system (%current-system))
|
||||
(guile #f)
|
||||
(imported-modules %cargo-build-system-modules)
|
||||
(modules '((guix build cargo-build-system)
|
||||
(guix build utils))))
|
||||
"Cross-build SOURCE using CARGO, and with INPUTS."
|
||||
|
||||
(define builder
|
||||
(with-imported-modules imported-modules
|
||||
#~(begin
|
||||
(use-modules #$@(sexp->gexp modules))
|
||||
|
||||
(cargo-build #:name #$name
|
||||
#:source #+source
|
||||
#:target #+target
|
||||
#:system #$system
|
||||
#:test-target #$test-target
|
||||
#:vendor-dir #$vendor-dir
|
||||
#:cargo-build-flags #$(sexp->gexp cargo-build-flags)
|
||||
#:cargo-test-flags #$(sexp->gexp cargo-test-flags)
|
||||
#:cargo-package-flags #$(sexp->gexp cargo-package-flags)
|
||||
#:features #$(sexp->gexp features)
|
||||
#:skip-build? #$skip-build?
|
||||
#:install-source? #$install-source?
|
||||
#:tests? #$(and tests? (not skip-build?))
|
||||
#:phases #$(if (pair? phases)
|
||||
(sexp->gexp phases)
|
||||
phases)
|
||||
#:outputs #$(outputs->gexp outputs)
|
||||
#:inputs (append #$(input-tuples->gexp host-inputs)
|
||||
#+(input-tuples->gexp target-inputs))
|
||||
#:native-inputs #+(input-tuples->gexp build-inputs)
|
||||
#:make-dynamic-linker-cache? #f ;cross-compiling
|
||||
#:search-paths '#$(sexp->gexp
|
||||
(map search-path-specification->sexp
|
||||
search-paths))
|
||||
#:native-search-paths '#$(sexp->gexp
|
||||
(map search-path-specification->sexp
|
||||
native-search-paths))))))
|
||||
|
||||
(gexp->derivation name builder
|
||||
#:system system
|
||||
#:target target
|
||||
#:graft? #f
|
||||
#:guile-for-build guile))
|
||||
|
||||
(define (package-cargo-inputs p)
|
||||
(apply
|
||||
(lambda* (#:key (cargo-inputs '()) #:allow-other-keys)
|
||||
|
@ -235,7 +304,8 @@ any dependent crates. This can be a benefits:
|
|||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(rust (default-rust))
|
||||
(rust (default-rust target))
|
||||
(rust-sysroot (default-rust-sysroot target))
|
||||
(cargo-inputs '())
|
||||
(cargo-development-inputs '())
|
||||
#:allow-other-keys
|
||||
|
@ -243,28 +313,49 @@ any dependent crates. This can be a benefits:
|
|||
"Return a bag for NAME."
|
||||
|
||||
(define private-keywords
|
||||
'(#:target #:rust #:inputs #:native-inputs #:outputs
|
||||
#:cargo-inputs #:cargo-development-inputs))
|
||||
`(#:rust #:inputs #:native-inputs #:outputs
|
||||
#:cargo-inputs #:cargo-development-inputs
|
||||
#:rust-sysroot
|
||||
,@(if target '() '(#:target))))
|
||||
|
||||
(and (not target) ;; TODO: support cross-compilation
|
||||
(bag
|
||||
(name name)
|
||||
(system system)
|
||||
(target target)
|
||||
(host-inputs `(,@(if source
|
||||
`(("source" ,source))
|
||||
'())
|
||||
,@inputs
|
||||
(bag
|
||||
(name name)
|
||||
(system system)
|
||||
(target target)
|
||||
(host-inputs `(,@(if source
|
||||
`(("source" ,source))
|
||||
'())
|
||||
|
||||
;; Keep the standard inputs of 'gnu-build-system'
|
||||
,@(standard-packages)))
|
||||
(build-inputs `(("cargo" ,rust "cargo")
|
||||
("rustc" ,rust)
|
||||
,@(expand-crate-sources cargo-inputs cargo-development-inputs)
|
||||
,@native-inputs))
|
||||
(outputs outputs)
|
||||
(build cargo-build)
|
||||
(arguments (strip-keyword-arguments private-keywords arguments)))))
|
||||
;,@(if target '() inputs)
|
||||
,@(if target inputs '())
|
||||
|
||||
,@(expand-crate-sources cargo-inputs cargo-development-inputs)))
|
||||
(build-inputs `(("cargo" ,rust "cargo")
|
||||
("rustc" ,rust)
|
||||
|
||||
,@native-inputs
|
||||
;,@(if target inputs '())
|
||||
,@(if target '() inputs)
|
||||
;,@inputs
|
||||
|
||||
,@(if target
|
||||
;; Use the standard cross inputs of
|
||||
;; 'gnu-build-system'.
|
||||
(standard-cross-packages target 'host)
|
||||
'())
|
||||
;; Keep the standard inputs of 'gnu-build-system'
|
||||
,@(standard-packages)))
|
||||
(target-inputs `(,@(if target
|
||||
(standard-cross-packages target 'target)
|
||||
'())
|
||||
|
||||
;; This provides a separate sysroot for the regular rustc
|
||||
,@(if target
|
||||
`(("rust-sysroot" ,(rust-sysroot target)))
|
||||
'())))
|
||||
(outputs outputs)
|
||||
(build (if target cargo-cross-build cargo-build))
|
||||
(arguments (strip-keyword-arguments private-keywords arguments))))
|
||||
|
||||
(define cargo-build-system
|
||||
(build-system
|
||||
|
|
|
@ -119,6 +119,7 @@ libraries or executables."
|
|||
(error "Possible pre-generated files found:" pregenerated-files))))
|
||||
|
||||
(define* (configure #:key inputs
|
||||
target
|
||||
(vendor-dir "guix-vendor")
|
||||
#:allow-other-keys)
|
||||
"Vendor Cargo.toml dependencies as guix inputs."
|
||||
|
@ -146,27 +147,75 @@ libraries or executables."
|
|||
(invoke "tar" "xf" path "-C" crate-dir "--strip-components" "1")))))
|
||||
inputs)
|
||||
|
||||
;; Configure cargo to actually use this new directory.
|
||||
;; For cross-building
|
||||
(when target
|
||||
(setenv "CARGO_BUILD_TARGET"
|
||||
;; Can this be replaced with platform-rust-architecture?
|
||||
;; Keep this synchronized with (guix platforms *)
|
||||
(match target
|
||||
("aarch64-linux-gnu" "aarch64-unknown-linux-gnu")
|
||||
("arm-linux-gnueabihf" "armv7-unknown-linux-gnueabihf")
|
||||
("i686-linux-gnu" "i686-unknown-linux-gnu")
|
||||
("mips64el-linux-gnu" "mips64el-unknown-linux-gnuabi64")
|
||||
("powerpc-linux-gnu" "powerpc-unknown-linux-gnu")
|
||||
("powerpc64-linux-gnu" "powerpc64-unknown-linux-gnu")
|
||||
("powerpc64le-linux-gnu" "powerpc64le-unknown-linux-gnu")
|
||||
("riscv64-linux-gnu" "riscv64gc-unknown-linux-gnu")
|
||||
("x86_64-linux-gnu" "x86_64-unknown-linux-gnu")
|
||||
("i586-pc-gnu" "i686-unknown-hurd-gnu")
|
||||
("i686-w64-mingw32" "i686-pc-windows-gnu")
|
||||
("x86_64-w64-mingw32" "x86_64-pc-windows-gnu")
|
||||
(else #f)))
|
||||
(setenv "RUSTFLAGS" (string-append
|
||||
(or (getenv "RUSTFLAGS") "")
|
||||
" --sysroot " (assoc-ref inputs "rust-sysroot")))
|
||||
|
||||
(setenv "PKG_CONFIG" (string-append target "-pkg-config"))
|
||||
|
||||
;; We've removed all the bundled libraries, don't look for them.
|
||||
(setenv "WINAPI_NO_BUNDLED_LIBRARIES" "1")
|
||||
|
||||
;; Prevent targeting the build machine.
|
||||
(setenv "CRATE_CC_NO_DEFAULTS" "1"))
|
||||
|
||||
;; Configure cargo to actually use this new directory with all the crates.
|
||||
(setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
|
||||
(mkdir-p ".cargo")
|
||||
;; Not .cargo/config.toml, rustc/cargo will generate .cargo/config otherwise.
|
||||
(let ((port (open-file ".cargo/config" "w" #:encoding "utf-8")))
|
||||
(display "
|
||||
;; Placed here so it doesn't cause random rebuilds. Neither of these work.
|
||||
;; sysroot = '" (assoc-ref inputs "rust-sysroot") "'
|
||||
;; rustflags = ['--sysroot', '" (assoc-ref inputs "rust-sysroot") "']
|
||||
(when target
|
||||
(display (string-append "
|
||||
[target." (getenv "CARGO_BUILD_TARGET") "]
|
||||
linker = '" target "-gcc'
|
||||
|
||||
[build]
|
||||
target = ['" (getenv "CARGO_BUILD_TARGET") "']") port))
|
||||
(display (string-append "
|
||||
[source.crates-io]
|
||||
replace-with = 'vendored-sources'
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = '" port)
|
||||
(display (string-append (getcwd) "/" vendor-dir) port)
|
||||
(display "'
|
||||
" port)
|
||||
directory = '" vendor-dir "'") port)
|
||||
(close-port port))
|
||||
|
||||
;; Lift restriction on any lints: a crate author may have decided to opt
|
||||
;; into stricter lints (e.g. #![deny(warnings)]) during their own builds
|
||||
;; but we don't want any build failures that could be caused later by
|
||||
;; upgrading the compiler for example.
|
||||
(setenv "RUSTFLAGS" "--cap-lints allow")
|
||||
(setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
|
||||
(setenv "RUSTFLAGS" (string-append (or (getenv "RUSTFLAGS") "")
|
||||
" --cap-lints allow"))
|
||||
|
||||
(if (assoc-ref inputs "cross-gcc")
|
||||
(begin
|
||||
(setenv "HOST_CC" "gcc")
|
||||
(setenv "TARGET_CC" (string-append target "-gcc"))
|
||||
(setenv "TARGET_AR" (string-append target "-ar"))
|
||||
(setenv "TARGET_PKG_CONFIG" (string-append target "-pkg-config")))
|
||||
(setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")))
|
||||
|
||||
(setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1")
|
||||
(setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1")
|
||||
(when (assoc-ref inputs "openssl")
|
||||
|
@ -264,7 +313,11 @@ directory = '" port)
|
|||
(unless (eq? (stat:type s) 'symlink)
|
||||
(utime file 0 0 0 0))))
|
||||
(find-files dir #:directories? #t))
|
||||
|
||||
(apply invoke "tar" "czf" (string-append dir ".crate")
|
||||
;; avoid non-determinism in the archive
|
||||
"--sort=name" "--mtime=@0"
|
||||
"--owner=root:0" "--group=root:0"
|
||||
(find-files dir #:directories? #t))
|
||||
(delete-file-recursively dir)))
|
||||
(find-files "." "\\.crate$")))))
|
||||
|
|
Reference in New Issue