unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies
@ 2023-12-24 22:09 Mikhail Tsykalov
  2023-12-25  7:45 ` Jaeme Sifat via Bug reports for GNU Guix
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mikhail Tsykalov @ 2023-12-24 22:09 UTC (permalink / raw)
  To: 68017

Considering cargo-inputs are built when top package is built it makes 
sense to propagate their inputs and native-inputs to top package. 
Currently you have to either track them manually or figure them out from 
build errors.

NB: This is my first time packaging rust, so I may be wrong about stuff.






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

* bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies
  2023-12-24 22:09 bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies Mikhail Tsykalov
@ 2023-12-25  7:45 ` Jaeme Sifat via Bug reports for GNU Guix
  2023-12-25  8:21 ` bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs Mikhail Tsykalov
  2023-12-25 20:02 ` Jaeme Sifat via Bug reports for GNU Guix
  2 siblings, 0 replies; 5+ messages in thread
From: Jaeme Sifat via Bug reports for GNU Guix @ 2023-12-25  7:45 UTC (permalink / raw)
  To: 68017

I'm a bit confused about what you exactly mean. Can you provide an 
example? Programmatically, the build-system isn't supposed to be 
reflected (package components of the build-system) in the inputs fields 
of packages, Rust is no different.

 > NB: This is my first time packaging rust, so I may be wrong about stuff.

The typical way of creating Rust crate definitions is to use `guix 
import crate <package-name-on-crates.io>' to obtain a template 
definition that you'd refine after building and testing the package. If 
the crate is not hosted on crates.io, then you would have to read the 
`Cargo.toml' file for build instructions. The guix import command also 
has a '--recursive' option to automate that process for all the 
dependencies of a crate as well. It's a repetitive process for sure, but 
you don't have to find out dependencies by build errors.

--

Jaeme













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

* bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs.
  2023-12-24 22:09 bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies Mikhail Tsykalov
  2023-12-25  7:45 ` Jaeme Sifat via Bug reports for GNU Guix
@ 2023-12-25  8:21 ` Mikhail Tsykalov
  2023-12-25 20:02 ` Jaeme Sifat via Bug reports for GNU Guix
  2 siblings, 0 replies; 5+ messages in thread
From: Mikhail Tsykalov @ 2023-12-25  8:21 UTC (permalink / raw)
  To: 68017

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

I didn't get CC'd for some reason.

Okay, I have an example package (attached). Hardly a good reproducer, 
but that's what I have. Mostly created by using 'guix import' and 
editing things. You can build it using 'guix build -L. av1an' in the 
directory with the file. If you want it to not segfault, you'll have to 
install python in profile (that's probably a bug in vapoursynth package).

What I want you to do is to remove clang and nasm from input field of 
av1an package and try to build it. It will crash while building 
rust-bindgen. Neither clang nor nasm are things that av1an depends on, 
they are dependencies of a dependency of a dependency, yet for some 
reason omitting them from inputs field will make a package fail to 
build. pkg-config is in similar situation.

So, my suggestion is to make cargo-build-system propagate inputs and 
native-inputs fields of packages dependent by cargo-inputs to top level 
package.

[-- Attachment #2: av1an.scm --]
[-- Type: text/x-scheme, Size: 34229 bytes --]

(define-module (av1an))
(use-modules (guix packages) (guix download) (guix build-system cargo) ((guix licenses) #:prefix license:) (gnu packages crates-graphics) (gnu packages crates-io) (gnu packages video) (gnu packages compression) (gnu packages version-control) (gnu packages pkg-config) (gnu packages llvm) (gnu packages assembly) (guix build utils) (guix build cargo-build-system) (gnu packages python))
(define-public rust-getset-0.1
  (package
    (name "rust-getset")
    (version "0.1.2")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "getset" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1f8yc83hm5b7vzscxq20ivdv7wlfvabn79j653zh9k3m1qjjfmz4"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-proc-macro-error" ,rust-proc-macro-error-1)
                       ("rust-proc-macro2" ,rust-proc-macro2-1)
                       ("rust-quote" ,rust-quote-1)
                       ("rust-syn" ,rust-syn-1))))
    (home-page "https://github.com/Hoverbear/getset")
    (synopsis
     "Getset, we're ready to go!

A procedural macro for generating the most basic getters and setters on fields.
")
    (description
     "Getset, we're ready to go! A procedural macro for generating the most basic
getters and setters on fields.")
    (license license:expat)))

(define-public rust-enum-iterator-derive-1
  (package
    (name "rust-enum-iterator-derive")
    (version "1.2.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "enum-iterator-derive" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1jzxgfhz4i0hvnw5qzqhwscky8vsmxljv89g0navisacay4qbkzf"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1)
                       ("rust-quote" ,rust-quote-1)
                       ("rust-syn" ,rust-syn-2))))
    (home-page "https://github.com/stephaneyfx/enum-iterator")
    (synopsis "Procedural macro to derive Sequence")
    (description "Procedural macro to derive Sequence")
    (license license:bsd-0)))

(define-public rust-enum-iterator-1
  (package
    (name "rust-enum-iterator")
    (version "1.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "enum-iterator" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "12g63d7w5vpq964f7fbnahw2qiqsml3f9j3rxrk6f1yxnmrkipbs"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-enum-iterator-derive" ,rust-enum-iterator-derive-1))))
    (home-page "https://github.com/stephaneyfx/enum-iterator")
    (synopsis
     "Tools to iterate over all values of a type (e.g. all variants of an enumeration)")
    (description
     "This package provides tools to iterate over all values of a type (e.g. all
variants of an enumeration)")
    (license license:bsd-0)))


(define-public rust-sysinfo-0.24
  (package
    (name "rust-sysinfo")
    (version "0.24.7")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "sysinfo" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "07004ylrpf0bvcwprxp4231bvzg2i7lrbp79wscqnc297nzlxjsl"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-cfg-if" ,rust-cfg-if-1)
                       ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.8)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-ntapi" ,rust-ntapi-0.3)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-rayon" ,rust-rayon-1)
                       ("rust-winapi" ,rust-winapi-0.3))
       #:cargo-development-inputs (("rust-tempfile" ,rust-tempfile-3))))
    (home-page "https://github.com/GuillaumeGomez/sysinfo")
    (synopsis
     "Library to get system information such as processes, CPUs, disks, components and networks")
    (description
     "Library to get system information such as processes, CPUs, disks, components and
networks")
    (license license:expat)))

(define-public rust-vergen-7
  (package
    (name "rust-vergen")
    (version "7.3.2")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "vergen" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "13cfl15g25yw9v2jwviqc3v4wv2dmwpabkwkfm650505sfplzg1v"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
                       ("rust-anyhow" ,rust-anyhow-1)
                       ("rust-cfg-if" ,rust-cfg-if-1)
                       ("rust-enum-iterator" ,rust-enum-iterator-1)
                       ("rust-getset" ,rust-getset-0.1)
                       ("rust-git2" ,rust-git2-0.14)
                       ("rust-rustc-version" ,rust-rustc-version-0.4)
                       ("rust-rustversion" ,rust-rustversion-1)
                       ("rust-sysinfo" ,rust-sysinfo-0.24)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-time" ,rust-time-0.3)
                       ("rust-time" ,rust-time-0.3))
       #:cargo-development-inputs (("rust-lazy-static" ,rust-lazy-static-1)
                                   ("rust-regex" ,rust-regex-1)
                                   ("rust-serial-test" ,rust-serial-test-0.7))))
    (home-page "https://github.com/rustyhorde/vergen")
    (synopsis
     "Generate 'cargo:rustc-env' instructions via 'build.rs' for use in your code via the 'env!' macro")
    (description
     "Generate cargo:rustc-env instructions via build.rs for use in your code via the
env! macro")
    (license (list license:expat license:asl2.0))))

(define-public rust-time-macros-0.2
  (package
    (name "rust-time-macros")
    (version "0.2.4")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "time-macros" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "14h712p63k121cwi80x8ydn99k703wkcw2ksivd7r0addwd7nra2"))))
    (build-system cargo-build-system)
    (home-page "https://github.com/time-rs/time")
    (synopsis
     "    Procedural macros for the time crate.
    This crate is an implementation detail and should not be relied upon directly.
")
    (description
     "Procedural macros for the time crate.  This crate is an implementation detail
and should not be relied upon directly.")
    (license (list license:expat license:asl2.0))))

(define-public rust-time-0.3
  (package
    (name "rust-time")
    (version "0.3.9")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "time" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1p8dsb0zwa2r9bz2f31kxfsij6qhmkf1as3ch82z0q58lw42ww62"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-itoa" ,rust-itoa-1)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-num-threads" ,rust-num-threads-0.1)
                       ("rust-quickcheck" ,rust-quickcheck-1)
                       ("rust-rand" ,rust-rand-0.8)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-time-macros" ,rust-time-macros-0.2))))
    (home-page "https://time-rs.github.io")
    (synopsis
     "Date and time library. Fully interoperable with the standard library. Mostly compatible with #![no_std].")
    (description
     "Date and time library.  Fully interoperable with the standard library.  Mostly
compatible with #![no_std].")
    (license (list license:expat license:asl2.0))))

(define-public rust-flexi-logger-0.22
  (package
    (name "rust-flexi-logger")
    (version "0.22.6")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "flexi_logger" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "02gl8mga7hv625hdhvr54zrb6lnb68hm15n6icyzq9sas46shxhc"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-ansi-term" ,rust-ansi-term-0.12)
                       ("rust-atty" ,rust-atty-0.2)
                       ("rust-chrono" ,rust-chrono-0.4)
                       ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
                       ("rust-crossbeam-queue" ,rust-crossbeam-queue-0.3)
                       ("rust-flate2" ,rust-flate2-1)
                       ("rust-glob" ,rust-glob-0.3)
                       ("rust-hostname" ,rust-hostname-0.3)
                       ("rust-lazy-static" ,rust-lazy-static-1)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-notify" ,rust-notify-4)
                       ("rust-regex" ,rust-regex-1)
                       ("rust-rustversion" ,rust-rustversion-1)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-derive" ,rust-serde-derive-1)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-time" ,rust-time-0.3)
                       ("rust-toml" ,rust-toml-0.5)
                       ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3))))
    (home-page "https://crates.io/crates/flexi_logger")
    (synopsis
     "An easy-to-configure and flexible logger that writes logs to stderr or stdout and/or to files. It allows custom logline formats, and it allows changing the log specification at runtime. It also allows defining additional log streams, e.g. for alert or security messages.")
    (description
     "An easy-to-configure and flexible logger that writes logs to stderr or stdout
and/or to files.  It allows custom logline formats, and it allows changing the
log specification at runtime.  It also allows defining additional log streams,
e.g. for alert or security messages.")
    (license (list license:expat license:asl2.0))))

(define-public rust-vapoursynth-sys-0.4
  (package
    (name "rust-vapoursynth-sys")
    (version "0.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "vapoursynth-sys" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "171ack82jv44why2f73v9cbaq9xz2viv7iavwkn23kl0g6xrpi9g"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-cfg-if" ,rust-cfg-if-1))))
    (home-page "https://github.com/YaLTeR/vapoursynth-rs")
    (synopsis "Rust bindings for vapoursynth and vsscript.")
    (description "Rust bindings for vapoursynth and vsscript.")
    (license (list license:expat license:asl2.0))))

(define-public rust-vapoursynth-0.4
  (package
    (name "rust-vapoursynth")
    (version "0.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "vapoursynth" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "0mig50a74ggljqjp52mchbdhynwdwnhj9y4k7gx1rv2xqq1gfz8c"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
                       ("rust-bitflags" ,rust-bitflags-1)
                       ("rust-half" ,rust-half-2)
                       ("rust-lazy-static" ,rust-lazy-static-1)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-vapoursynth-sys" ,rust-vapoursynth-sys-0.4))))
    (home-page "https://github.com/YaLTeR/vapoursynth-rs")
    (synopsis "Safe Rust wrapper for VapourSynth and VSScript.")
    (description "Safe Rust wrapper for @code{VapourSynth} and VSScript.")
    (license (list license:expat license:asl2.0))))

(define-public rust-splines-4
  (package
    (name "rust-splines")
    (version "4.3.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "splines" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "00bi27k30fj3iq88pibnd1mrdjzzsxfm82cm8f32wrrwwm8lb312"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-cgmath" ,rust-cgmath-0.18)
                       ("rust-glam" ,rust-glam-0.24)
                       ("rust-nalgebra" ,rust-nalgebra-0.32)
                       ("rust-serde" ,rust-serde-1))))
    (home-page "https://github.com/phaazon/splines")
    (synopsis "Spline interpolation made easy")
    (description "Spline interpolation made easy")
    (license license:bsd-3)))

(define-public rust-vt100-0.15
  (package
    (name "rust-vt100")
    (version "0.15.2")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "vt100" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1pklc8y984axmxr0cd363srr2d27wd5rj15xlcmkjznvy0xqdkc4"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-itoa" ,rust-itoa-1)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-unicode-width" ,rust-unicode-width-0.1)
                       ("rust-vte" ,rust-vte-0.11))))
    (home-page "https://github.com/doy/vt100-rust")
    (synopsis "Library for parsing terminal data")
    (description "Library for parsing terminal data")
    (license license:expat)))

(define-public rust-indicatif-0.17
  (package
    (name "rust-indicatif")
    (version "0.17.7")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "indicatif" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "098ggvg7ps4097p5n9hmb3pqqy10bi8vjfzb7pci79xrklf78a7v"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-console" ,rust-console-0.15)
                       ("rust-futures-core" ,rust-futures-core-0.3)
                       ("rust-instant" ,rust-instant-0.1)
                       ("rust-number-prefix" ,rust-number-prefix-0.4)
                       ("rust-portable-atomic" ,rust-portable-atomic-1)
                       ("rust-rayon" ,rust-rayon-1)
                       ("rust-tokio" ,rust-tokio-1)
                       ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
                       ("rust-unicode-width" ,rust-unicode-width-0.1)
                       ("rust-vt100" ,rust-vt100-0.15))))
    (home-page "https://github.com/console-rs/indicatif")
    (synopsis "A progress bar and cli reporting library for Rust")
    (description
     "This package provides a progress bar and cli reporting library for Rust")
    (license license:expat)))

(define-public rust-ffmpeg-sys-the-third-1
  (package
    (name "rust-ffmpeg-sys-the-third")
    (version "1.1.1+ffmpeg-6.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "ffmpeg-sys-the-third" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1pnkw3igax9r30y50jsmzimav6w4mjrj66v6hppc0x10q3lv594l"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.64)
                       ("rust-cc" ,rust-cc-1)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-num-cpus" ,rust-num-cpus-1)
                       ("rust-pkg-config" ,rust-pkg-config-0.3)
                       ("rust-vcpkg" ,rust-vcpkg-0.2))))
    (inputs (list ffmpeg))
    (home-page "https://github.com/shssoichiro/ffmpeg-the-third")
    (synopsis "FFI bindings to FFmpeg")
    (description "FFI bindings to FFmpeg")
    (license license:wtfpl2)))

(define-public rust-ffmpeg-the-third-1
  (package
    (name "rust-ffmpeg-the-third")
    (version "1.2.2+ffmpeg-6.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "ffmpeg-the-third" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "059pl4skjv5m9k28b1xaz1jsiiwwwrq8wvi6ql61vryc6bs5a71h"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-bitflags" ,rust-bitflags-1)
                       ("rust-ffmpeg-sys-the-third" ,rust-ffmpeg-sys-the-third-1)
                       ("rust-image" ,rust-image-0.24)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-serde" ,rust-serde-1))))
    (home-page "https://github.com/shssoichiro/ffmpeg-the-third")
    (synopsis
     "Safe FFmpeg wrapper (FFmpeg 4 compatible fork of the ffmpeg crate)")
    (description
     "Safe FFmpeg wrapper (FFmpeg 4 compatible fork of the ffmpeg crate)")
    (license license:wtfpl2)))

(define-public rust-clap-lex-0.3
  (package
    (name "rust-clap-lex")
    (version "0.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "clap_lex" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1a4dzbnlxiamfsn0pnkhn7n9bdfjh66j9fxm6mmr7d227vvrhh8d"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-os-str-bytes" ,rust-os-str-bytes-6))))
    (home-page "https://github.com/clap-rs/clap/tree/master/clap_lex")
    (synopsis "Minimal, flexible command line parser")
    (description "Minimal, flexible command line parser")
    (license (list license:expat license:asl2.0))))

(define-public rust-clap-derive-4
  (package
    (name "rust-clap-derive")
    (version "4.0.21")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "clap_derive" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "054h5c62jy5c5li58696ymly0avyjvcbn1krcaawkbq2kwzk2xq1"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-heck" ,rust-heck-0.4)
                       ("rust-proc-macro-error" ,rust-proc-macro-error-1)
                       ("rust-proc-macro2" ,rust-proc-macro2-1)
                       ("rust-quote" ,rust-quote-1)
                       ("rust-syn" ,rust-syn-1))))
    (home-page "https://github.com/clap-rs/clap/tree/master/clap_derive")
    (synopsis
     "Parse command line argument by defining a struct, derive crate.")
    (description
     "Parse command line argument by defining a struct, derive crate.")
    (license (list license:expat license:asl2.0))))

(define-public rust-clap-4
  (package
    (name "rust-clap")
    (version "4.0.32")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "clap" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "0fcsz3zggk0g0y76vv7v7ivn72p1v980h2yhi0zf9y9mr45p1nx7"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-backtrace" ,rust-backtrace-0.3)
                       ("rust-bitflags" ,rust-bitflags-1)
                       ("rust-clap-derive" ,rust-clap-derive-4)
                       ("rust-clap-lex" ,rust-clap-lex-0.3)
                       ("rust-is-terminal" ,rust-is-terminal-0.4)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-strsim" ,rust-strsim-0.10)
                       ("rust-termcolor" ,rust-termcolor-1)
                       ("rust-terminal-size" ,rust-terminal-size-0.2)
                       ("rust-unicase" ,rust-unicase-2)
                       ("rust-unicode-width" ,rust-unicode-width-0.1))))
    (home-page "https://github.com/clap-rs/clap")
    (synopsis
     "A simple to use, efficient, and full-featured Command Line Argument Parser")
    (description
     "This package provides a simple to use, efficient, and full-featured Command Line
Argument Parser")
    (license (list license:expat license:asl2.0))))

(define-public rust-rav1e-0.6
  (package
    (name "rust-rav1e")
    (version "0.6.6")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "rav1e" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1h9fhmamb7mh3cv86y1qja9qb7r6w2jv3p8ydngvsyjy59lq7hqn"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-aom-sys" ,rust-aom-sys-0.3)
                       ("rust-arbitrary" ,rust-arbitrary-0.4)
                       ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
                       ("rust-arrayvec" ,rust-arrayvec-0.7)
                       ("rust-av-metrics" ,rust-av-metrics-0.9)
                       ("rust-av1-grain" ,rust-av1-grain-0.2)
                       ("rust-backtrace" ,rust-backtrace-0.3)
                       ("rust-bitstream-io" ,rust-bitstream-io-1)
                       ("rust-built" ,rust-built-0.5)
                       ("rust-byteorder" ,rust-byteorder-1)
                       ("rust-cc" ,rust-cc-1)
                       ("rust-cfg-if" ,rust-cfg-if-1)
                       ("rust-clap" ,rust-clap-4)
                       ("rust-clap-complete" ,rust-clap-complete-4)
                       ("rust-clap-lex" ,rust-clap-lex-0.3)
                       ("rust-console" ,rust-console-0.15)
                       ("rust-crossbeam" ,rust-crossbeam-0.8)
                       ("rust-dav1d-sys" ,rust-dav1d-sys-0.7)
                       ("rust-fern" ,rust-fern-0.6)
                       ("rust-image" ,rust-image-0.24)
                       ("rust-interpolate-name" ,rust-interpolate-name-0.2)
                       ("rust-itertools" ,rust-itertools-0.10)
                       ("rust-ivf" ,rust-ivf-0.1)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-maybe-rayon" ,rust-maybe-rayon-0.1)
                       ("rust-nasm-rs" ,rust-nasm-rs-0.2)
                       ("rust-new-debug-unreachable" ,rust-new-debug-unreachable-1)
                       ("rust-nom" ,rust-nom-7)
                       ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
                       ("rust-num-derive" ,rust-num-derive-0.3)
                       ("rust-num-traits" ,rust-num-traits-0.2)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-paste" ,rust-paste-1)
                       ("rust-rand" ,rust-rand-0.8)
                       ("rust-rand-chacha" ,rust-rand-chacha-0.3)
                       ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
                       ("rust-rustc-version" ,rust-rustc-version-0.4)
                       ("rust-scan-fmt" ,rust-scan-fmt-0.2)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-big-array" ,rust-serde-big-array-0.4)
                       ("rust-signal-hook" ,rust-signal-hook-0.3)
                       ("rust-simd-helpers" ,rust-simd-helpers-0.1)
                       ("rust-system-deps" ,rust-system-deps-6)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-toml" ,rust-toml-0.5)
                       ("rust-v-frame" ,rust-v-frame-0.3)
                       ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
                       ("rust-winnow" ,rust-winnow-0.4)
                       ("rust-y4m" ,rust-y4m-0.8))))
    (home-page "https://github.com/xiph/rav1e/")
    (synopsis "The fastest and safest AV1 encoder")
    (description "The fastest and safest AV1 encoder")
    (license license:bsd-2)))

(define-public rust-av-scenechange-0.8
  (package
    (name "rust-av-scenechange")
    (version "0.8.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av-scenechange" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "057m4gr2yhxw0jkzj887jg7kd8mgz9pdh7dq79hdrk2jf0bgv4gq"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
                       ("rust-clap" ,rust-clap-4)
                       ("rust-console" ,rust-console-0.15)
                       ("rust-fern" ,rust-fern-0.6)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-rav1e" ,rust-rav1e-0.6)
                       ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-json" ,rust-serde-json-1)
                       ("rust-y4m" ,rust-y4m-0.7))))
    (home-page "https://github.com/rust-av/av-scenechange")
    (synopsis "Estimates frames in a video where a scenecut would be ideal")
    (description "Estimates frames in a video where a scenecut would be ideal")
    (license license:expat)))

(define-public rust-av-bitstream-0.2
  (package
    (name "rust-av-bitstream")
    (version "0.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av-bitstream" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "0v4rsmixkyq7g6p5sk5wrryq9vsv972dvg5wzn45c7mjim50zz7d"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-num-traits" ,rust-num-traits-0.2)
                       ("rust-thiserror" ,rust-thiserror-1))))
    (home-page "https://github.com/rust-av/rust-av")
    (synopsis "Simple bit writer/reader")
    (description "Simple bit writer/reader")
    (license license:expat)))

(define-public rust-av-ivf-0.5
  (package
    (name "rust-av-ivf")
    (version "0.5.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av-ivf" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1mhgz6swqw4i0akahnyj3q8z4a2dciq7p0bwhb9a1n08kiy2j0zm"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-av-bitstream" ,rust-av-bitstream-0.2)
                       ("rust-av-data" ,rust-av-data-0.4)
                       ("rust-av-format" ,rust-av-format-0.7)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-nom" ,rust-nom-7))))
    (home-page "https://github.com/rust-av/ivf-rs")
    (synopsis "IVF muxer and demuxer")
    (description "IVF muxer and demuxer")
    (license license:expat)))

(define-public rust-byte-slice-cast-1
  (package
    (name "rust-byte-slice-cast")
    (version "1.2.2")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "byte-slice-cast" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "033vv1qddzsj9yfsam4abj55rp60digngcr9a8wgv9pccf5rzb63"))))
    (build-system cargo-build-system)
    (home-page "https://github.com/sdroege/bytes-num-slice-cast")
    (synopsis
     "Safely cast bytes slices from/to slices of built-in fundamental numeric types")
    (description
     "Safely cast bytes slices from/to slices of built-in fundamental numeric types")
    (license license:expat)))

(define-public rust-av-data-0.4
  (package
    (name "rust-av-data")
    (version "0.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av-data" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "06zi5b6jiacd28iagjhwshgn58nwzqmc3l28wn523gafhj5zw3mf"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-byte-slice-cast" ,rust-byte-slice-cast-1)
                       ("rust-bytes" ,rust-bytes-1)
                       ("rust-num-derive" ,rust-num-derive-0.3)
                       ("rust-num-rational" ,rust-num-rational-0.4)
                       ("rust-num-traits" ,rust-num-traits-0.2)
                       ("rust-thiserror" ,rust-thiserror-1))))
    (home-page "https://github.com/rust-av/rust-av")
    (synopsis "Multimedia data structures")
    (description "Multimedia data structures")
    (license license:expat)))

(define-public rust-av-format-0.7
  (package
    (name "rust-av-format")
    (version "0.7.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av-format" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1dy35p0g2g0bzi83w9pc8khvd9hyl9mxa6wrccq38nf06r54jj9q"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-av-data" ,rust-av-data-0.4)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-thiserror" ,rust-thiserror-1))))
    (home-page "https://github.com/rust-av/rust-av")
    (synopsis "Multimedia format demuxing and muxing")
    (description "Multimedia format demuxing and muxing")
    (license license:expat)))

(define-public rust-affinity-0.1
  (package
    (name "rust-affinity")
    (version "0.1.2")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "affinity" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "0ys4bqsycwmzxz3mwia3lya1asz0ms0nyp0wn8hx0zgbxi7lhgkn"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-cfg-if" ,rust-cfg-if-1)
                       ("rust-errno" ,rust-errno-0.3)
                       ("rust-libc" ,rust-libc-0.2)
                       ("rust-num-cpus" ,rust-num-cpus-1))))
    (home-page "https://github.com/elast0ny/affinity-rs")
    (synopsis
     "Provides a consistent way to set core affinity for currently running threads and processes")
    (description
     "This package provides a consistent way to set core affinity for currently
running threads and processes")
    (license (list license:expat license:asl2.0))))

(define-public rust-av1an-core-0.4
  (package
    (name "rust-av1an-core")
    (version "0.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av1an-core" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1biss08h93j813k0xm06bybgnfnl77g1gvaljy8rlhbl5717jj1v"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-affinity" ,rust-affinity-0.1)
                       ("rust-ansi-term" ,rust-ansi-term-0.12)
                       ("rust-anyhow" ,rust-anyhow-1)
                       ("rust-arrayvec" ,rust-arrayvec-0.7)
                       ("rust-atty" ,rust-atty-0.2)
                       ("rust-av-format" ,rust-av-format-0.7)
                       ("rust-av-ivf" ,rust-av-ivf-0.5)
                       ("rust-av-scenechange" ,rust-av-scenechange-0.8)
                       ("rust-av1-grain" ,rust-av1-grain-0.2)
                       ("rust-cfg-if" ,rust-cfg-if-1)
                       ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
                       ("rust-crossbeam-utils" ,rust-crossbeam-utils-0.8)
                       ("rust-dashmap" ,rust-dashmap-5)
                       ("rust-ffmpeg-the-third" ,rust-ffmpeg-the-third-1)
                       ("rust-indicatif" ,rust-indicatif-0.17)
                       ("rust-itertools" ,rust-itertools-0.10)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-memchr" ,rust-memchr-2)
                       ("rust-nom" ,rust-nom-7)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-parking-lot" ,rust-parking-lot-0.12)
                       ("rust-paste" ,rust-paste-1)
                       ("rust-path-abs" ,rust-path-abs-0.5)
                       ("rust-plotters" ,rust-plotters-0.3)
                       ("rust-rand" ,rust-rand-0.8)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-json" ,rust-serde-json-1)
                       ("rust-simdutf8" ,rust-simdutf8-0.1)
                       ("rust-smallvec" ,rust-smallvec-1)
                       ("rust-splines" ,rust-splines-4)
                       ("rust-strsim" ,rust-strsim-0.10)
                       ("rust-strum" ,rust-strum-0.24)
                       ("rust-sysinfo" ,rust-sysinfo-0.23)
                       ("rust-textwrap" ,rust-textwrap-0.15)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-tokio" ,rust-tokio-1)
                       ("rust-vapoursynth" ,rust-vapoursynth-0.4)
                       ("rust-which" ,rust-which-4)
                       ("rust-y4m" ,rust-y4m-0.7))))
    (home-page "https://github.com/master-of-zen/Av1an")
    (synopsis
     "Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding [Core library]
")
    (description
     "Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per
scene quality encoding [Core library]")
    (license license:gpl3)))

(define-public av1an
  (package
    (name "av1an")
    (version "0.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "av1an" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "06l60mcg0izwnz0ffp3pzpn6i33csf804a5axw813wafg4hcrapg"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs (("rust-ansi-term" ,rust-ansi-term-0.12)
                       ("rust-anyhow" ,rust-anyhow-1)
                       ("rust-atty" ,rust-atty-0.2)
                       ("rust-av1an-core" ,rust-av1an-core-0.4)
                       ("rust-clap" ,rust-clap-4)
                       ("rust-ffmpeg-the-third" ,rust-ffmpeg-the-third-1)
                       ("rust-flexi-logger" ,rust-flexi-logger-0.22)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-path-abs" ,rust-path-abs-0.5)
                       ("rust-shlex" ,rust-shlex-1)
                       ("rust-thiserror" ,rust-thiserror-1)
                       ("rust-vergen" ,rust-vergen-7))))
    (inputs (list vapoursynth zlib libgit2-1.4 ffmpeg clang nasm))
    (native-inputs (list pkg-config))
    (home-page "https://github.com/master-of-zen/Av1an")
    (synopsis
     "Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding [Command line library]
")
    (description
     "Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per
scene quality encoding [Command line library]")
    (license license:gpl3)))


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

* bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs.
  2023-12-24 22:09 bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies Mikhail Tsykalov
  2023-12-25  7:45 ` Jaeme Sifat via Bug reports for GNU Guix
  2023-12-25  8:21 ` bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs Mikhail Tsykalov
@ 2023-12-25 20:02 ` Jaeme Sifat via Bug reports for GNU Guix
  2023-12-27 10:43   ` Efraim Flashner
  2 siblings, 1 reply; 5+ messages in thread
From: Jaeme Sifat via Bug reports for GNU Guix @ 2023-12-25 20:02 UTC (permalink / raw)
  To: 68017; +Cc: efraim, tsymsh

The culprit to your problem is `rust-ffmpeg-sys-the-third-1', which 
requires all the packages you just mentioned for building. 
`rust-av1an-core` requires `rust-ffmpeg-the-third-1' which in turn 
requires the sys libraries as well.

--8<---------------cut here---------------start------------->8---

rust-ffmpeg-sys-the-third-1 -> Requires vapoursynth ffmpeg clang nasm 
pkg-config

rust-ffmpeg-the-third-1 -> Requires rust-ffmpeg-sys-the-third-1

rust-av1an-core -> Requires rust-ffmpeg-the-third-1

rust-av1an -> Requires rust-av1an-core

--8<---------------cut here---------------end--------------->8---

Thus, the native-inputs and inputs of rust-ffmpeg-sys-the-third are 
required for any packages that depend on it in #:cargo-inputs.

I see your point now, it would be very helpful if cargo-build-system 
could grab the inputs and native-inputs of dependent packages in the 
case of crates like `rust-ffmpeg-sys-the-third-1.' That way the 
dependencies wouldn't have to be duplicated across packages.

This sounds like a good suggestion, I can bring this up to Efraim, who 
is on the Rust team, about this who is much more knowledgeable about the 
implementation of the cargo-build-system than me.

--

Jaeme







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

* bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs.
  2023-12-25 20:02 ` Jaeme Sifat via Bug reports for GNU Guix
@ 2023-12-27 10:43   ` Efraim Flashner
  0 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2023-12-27 10:43 UTC (permalink / raw)
  To: Jaeme Sifat; +Cc: 68017, tsymsh

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

On Mon, Dec 25, 2023 at 03:02:22PM -0500, Jaeme Sifat wrote:
> The culprit to your problem is `rust-ffmpeg-sys-the-third-1', which requires
> all the packages you just mentioned for building. `rust-av1an-core` requires
> `rust-ffmpeg-the-third-1' which in turn requires the sys libraries as well.
> 
> --8<---------------cut here---------------start------------->8---
> 
> rust-ffmpeg-sys-the-third-1 -> Requires vapoursynth ffmpeg clang nasm
> pkg-config
> 
> rust-ffmpeg-the-third-1 -> Requires rust-ffmpeg-sys-the-third-1
> 
> rust-av1an-core -> Requires rust-ffmpeg-the-third-1
> 
> rust-av1an -> Requires rust-av1an-core
> 
> --8<---------------cut here---------------end--------------->8---
> 
> Thus, the native-inputs and inputs of rust-ffmpeg-sys-the-third are required
> for any packages that depend on it in #:cargo-inputs.
> 
> I see your point now, it would be very helpful if cargo-build-system could
> grab the inputs and native-inputs of dependent packages in the case of
> crates like `rust-ffmpeg-sys-the-third-1.' That way the dependencies
> wouldn't have to be duplicated across packages.
> 
> This sounds like a good suggestion, I can bring this up to Efraim, who is on
> the Rust team, about this who is much more knowledgeable about the
> implementation of the cargo-build-system than me.

I haven't looked too closely at that part of the cargo-build-system but
in general my mental model is that it grabs the sources of the named
packages in the cargo{,-development}-inputs. I suppose we could tell the
crates to also grab the {propagated-,native-,}inputs also and carry
those forward to the next crate.  I suppose in theory we might end up
with multiple versions of libgit2 or other packages, and I'm not sure if
that'd point to various packages having the wrong inputs or needing to
adjust it somehow to prefer one version over another.

A similar issue is the perl dependency for rust-ring. I've finally fixed
it on the rust-team branch using a computed-origin but I think both are
the type of thing the antioxidant build system would help solve.

I suppose we could end up with using propagated-inputs for things like
perl or ffmpeg (in your package above) like we do with the python build
systems and adjusting the cargo-build-system to grab those when it
traverses the tree.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-12-28 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-24 22:09 bug#68017: cargo-build-system should propagate inputs and native-inputs of dependencies Mikhail Tsykalov
2023-12-25  7:45 ` Jaeme Sifat via Bug reports for GNU Guix
2023-12-25  8:21 ` bug#68017: Clarification on why cargo-build-system should propagate inputs and native-inputs Mikhail Tsykalov
2023-12-25 20:02 ` Jaeme Sifat via Bug reports for GNU Guix
2023-12-27 10:43   ` Efraim Flashner

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

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

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