help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Howto supply cargo-build-system dependency to guix package definitio


From: Timothy Washington
Subject: Re: Howto supply cargo-build-system dependency to guix package definition
Date: Mon, 24 Apr 2023 23:48:44 -0400

You've gotten me quite a bit further. This is great.
Now, "guix build ..." breaks if I try to include "(gnu packages cargo-xyz)"
(*or "(guix packages cargo-xyz)"*).

A.
guix build -L ~/dotfiles/ rustscan
...
no code for module (gnu packages cargo-xyz)


B. And I don't see cargo-xyz in these locations.

   - https://packages.guix.gnu.org/search/?query=cargo-xyz
   - https://packages.guix.gnu.org/search/?query=cargo
   - https://packages.guix.gnu.org/search/?query=xyz


C.
I disabled cargo-xyz and included "crates-graphics" to no avail. Is it
having a problem with "rust-ansi-term-0.12"? Because I definitely see it
here.
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/crates-graphics.scm#n137

guix build -L ~/dotfiles/ rustscan
...
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure append: Wrong type argument in position 1 (expecting empty
list): #<gexp (quasiquote (("rust-ansi-term" (unquote
rust-ansi-term-0.12))))
/home/twashing/dotfiles/guix/packages/rustscan.scm:26:10 7f8a484722d0>


D.
(define-module (guix packages rustscan)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system cargo)
  #:use-module (guix gexp)
  #:use-module (gnu packages crates-graphics)  ;; << enabled
  ;; #:use-module (gnu packages cargo-xyz)  ;; << disabled
  #:use-module (guix licenses))

(define-public rustscan
  (package
   (name "rustscan")
   (version "2.1.1")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/RustScan/RustScan.git";)
                  (commit version)))
            (file-name (git-file-name name version))
            (sha256
             (base32
"1hs065rrk40ksbxh413fbgnr760adgw9dlg5qqv6xb04ra0n0hjf"))))
   (build-system cargo-build-system)
   (arguments
    (list #:cargo-inputs
          #~`(("rust-ansi-term" ,rust-ansi-term-0.12))))
   (home-page "https://github.com/RustScan/RustScan";)
   (synopsis "A fast port scanner written in Rust")
   (description "RustScan is a fast port scanner that utilizes the Rust
programming language to scan for open ports on IP addresses.")
   (license gpl3+)))



On Mon, 24 Apr 2023 at 02:24, ( <paren@disroot.org> wrote:

> "(" <paren@disroot.org> writes:
> > Timothy Washington <twashing@gmail.com> writes:
> >>     (native-inputs
> >>      `(("rustc" ,rustc)
> >>        ("cargo" ,cargo)))
> >>     (inputs
> >>      `(("ansi_term" ,ansi-term)))
> > You don't need these.
> >
> >>     (arguments
> >>      `(#:cargo-inputs
> >>        (("ansi-term" ,ansi-term))))
> >
> > Try this:
> >
> > ```
> >     (arguments
> >      (list #:cargo-inputs
> >            #~`(("rust-ansi-term" ,rust-ansi-term-0.12))))
> > ```
>
> (You'll need to import (guix gexp) and (gnu packages cargo-xyz) for this
> to work.)
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]