all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timothy Washington <twashing@gmail.com>
To: Tobias Kortkamp <tobias.kortkamp@gmail.com>
Cc: Simon Tournier <zimon.toutoune@gmail.com>, guix-devel@gnu.org
Subject: Re: issue with packaging 'rustscan'
Date: Mon, 22 May 2023 16:21:00 -0400	[thread overview]
Message-ID: <CAADtM-aw-+dVmhwjAT5v0HoPQk0LBiEpOhMqdBDrOTgmtZOHNw@mail.gmail.com> (raw)
In-Reply-To: <87pm6sisi0.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4021 bytes --]

This was also touched on in the email thread "*Howto reference a custom
package from a manifest*". But I also wanted to acknowledge that "*Solution:
add perl to native-inputs*" was indeed the right answer. So thanks for
that.

I added "(native-inputs (list perl python))" to my package definition.

$ guix build -L ~/dotfiles/ rust-rustscan   # A. Now builds again!
/gnu/store/4bldy27x1f2mzjqg5jd176nrawl98y1y-rust-rustscan-2.1.1

$ guix package -L ~/dotfiles/ -m ~/dotfiles/guix/packages/manifest.scm   #
B. Now also builds!
...
The following derivation will be built:
  /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv
...

guix package --list-profiles   # C. does NOT show the custom profile just
built
/home/twashing/.config/guix/current
/home/twashing/.guix-profile

cat /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv   # D. DOES
show the new profile in /gnu/store
Derive([("out","/gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile","","")],
...
("out","/gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile"),("preferLocalBuild","1")])


i. Using a direct "guix build" gives you a directory in "/gnu/store". And
you can add that bin to your PATH.
ii. But for "/gnu/store/*-profile/", would you just loop over those profile
directories, and run each "/gnu/store/*-profile/etc/profile"?


I'm attaching the full package definition to this email.

Thanks again!
Tim


On Mon, 22 May 2023 at 06:13, Tobias Kortkamp <tobias.kortkamp@gmail.com>
wrote:

>
> Simon Tournier <zimon.toutoune@gmail.com> writes:
>
> > Hi,
> >
> > On Sun, 21 May 2023 at 22:35, Timothy Washington <twashing@gmail.com>
> wrote:
> >
> >> guix build -L ~/dotfiles/ rust-rustscan
> >
> > [...]
> >
> >>  error: failed to run custom build command for `ring v0.16.20`
> >>
> >> Caused by:
> >>   process didn't exit successfully:
> `/tmp/guix-build-rust-rustscan-2.1.1.drv-0/rustscan-2.1.1/target/release/build/ring-9bf05aa562ef9c86/build-script-build`
> (exit status: 101)
> >>   --- stderr
> >>   running "perl" "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" "elf"
> "/tmp/guix-build-rust-rustscan-2.1.1.drv-0/rustscan-2.1.1/target/release/build/ring-297f46c71994a65c/out/aesni-x86_64-elf.S"
> >>   thread 'main' panicked at 'failed to execute ["perl"
> "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" "elf"
> "/tmp/guix-build-rust-rustscan-2.1.1.drv-0/rustscan-2.1.1/target/release/build/ring-297f46c71994a65c/out/aesni-x86_64-elf.S"]:
> No such file or directory (os error 2)',
> /tmp/guix-build-rust-rustscan-2.1.1.drv-0/rustscan-2.1.1/guix-vendor/rust-ring-0.16.20.tar.xz/build.rs:653
> :9
> >>   note: run with `RUST_BACKTRACE=1` environment variable to display a
> backtrace
> >> warning: build failed, waiting for other jobs to finish...
> >> error: in phase 'build': uncaught exception:
> >> %exception #<&invoke-error program: "cargo" arguments: ("build"
> "--release") exit-status: 101 term-signal: #f stop-signal: #f>
> >> phase `build' failed after 12.2 seconds
> >> command "cargo" "build" "--release" failed with status 101
> >> builder for
> `/gnu/store/x695f07186dwqpw2jk48b62p2s18f5ry-rust-rustscan-2.1.1.drv'
> failed with exit code 1
> >> build of
> /gnu/store/x695f07186dwqpw2jk48b62p2s18f5ry-rust-rustscan-2.1.1.drv failed
> >> View build log at
> '/var/log/guix/drvs/x6/95f07186dwqpw2jk48b62p2s18f5ry-rust-rustscan-2.1.1.drv.gz'.
> >> guix build: error: build of
> `/gnu/store/x695f07186dwqpw2jk48b62p2s18f5ry-rust-rustscan-2.1.1.drv' failed
> >
> > The issue is that the Rust package named 'ring' cannot be built.
> > Since I am not an expert about Rust packaging, I do not know why and
> > how to fix this.  Well, one needs to put their hand in dirty Rust
> > packaging ;-)
>
> Hello,
>
> usually this error ("failed to execute" + "No such file or directory")
> means that some build dependency is missing. In this case the build
> script (build.rs) fails to run "perl
> crypto/fipsmodule/aes/asm/aesni-x86_64.pl" to generate an assembly file.
>
> Solution: add perl to native-inputs.
>
> Best regards,
>
> Tobias
>

[-- Attachment #1.2: Type: text/html, Size: 7376 bytes --]

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

(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)
  #:use-module (gnu packages crates-io)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages python)

  #:use-module ((guix licenses) #:prefix license:))

(define-public rust-text-placeholder-0.4
  (package
    (name "rust-text-placeholder")
    (version "0.4.1")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "text_placeholder" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "0q0iq60dflczvyfp3m4wn3w358yyxmcljmzdb9b5favwnb2c8qcn"))))
    (build-system cargo-build-system)
    (arguments
     `(#:skip-build? #t
       #:cargo-inputs (("rust-serde" ,rust-serde-1)
                       ("rust-serde-json" ,rust-serde-json-1))))
    (home-page "https://github.com/bernardoamc/text-placeholder")
    (synopsis "A flexible text template engine")
    (description "This package provides a flexible text template engine")
    (license (list license:expat license:asl2.0))))

(define-public rust-rlimit-0.8
  (package
    (name "rust-rlimit")
    (version "0.8.3")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "rlimit" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "18vsz3fdj4s8yjp96wwq7wvrlc3vzzsqki8mfpha9m5zr0g8l9zp"))))
    (build-system cargo-build-system)
    (arguments
     `(#:skip-build? #t
       #:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
    (home-page "https://github.com/Nugine/rlimit/")
    (synopsis "Resource limits")
    (description "Resource limits")
    (license license:expat)))

(define-public rust-gcd-2
  (package
    (name "rust-gcd")
    (version "2.3.0")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "gcd" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "06l4fib4dh4m6gazdrzzzinhvcpcfh05r4i4gzscl03vnjhqnx8x"))))
    (build-system cargo-build-system)
    (arguments
     `(#:skip-build? #t))
    (home-page "https://github.com/frewsxcv/rust-gcd")
    (synopsis "Calculate the greatest common divisor")
    (description "Calculate the greatest common divisor")
    (license (list license:expat license:asl2.0))))

(define-public rust-colorful-0.2
  (package
    (name "rust-colorful")
    (version "0.2.2")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "colorful" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1kj7vb4glvwcp75ambq2npf3dv1vjq4zkz12j8ypyzasaii0bbwp"))))
    (build-system cargo-build-system)
    (arguments
     `(#:skip-build? #t))
    (home-page "https://github.com/mellite/colorful")
    (synopsis "Make your terminal output colorful")
    (description "Make your terminal output colorful")
    (license license:expat)))

(define-public rust-cidr-utils-0.5
  (package
    (name "rust-cidr-utils")
    (version "0.5.10")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "cidr-utils" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "0750jbxvdbyyxcqnzsw438158r9drs2g077ymx9r9lv193q3dypx"))))
    (build-system cargo-build-system)
    (arguments
     `(#:skip-build? #t
       #:cargo-inputs (("rust-debug-helper" ,rust-debug-helper-0.3)
                       ("rust-num-bigint" ,rust-num-bigint-0.4)
                       ("rust-num-traits" ,rust-num-traits-0.2)
                       ("rust-once-cell" ,rust-once-cell-1)
                       ("rust-regex" ,rust-regex-1)
                       ("rust-serde" ,rust-serde-1))))
    (home-page "https://magiclen.org/cidr-utils")
    (synopsis
     "This crate provides data structures and functions to deal with IPv4 CIDRs and IPv6 CIDRs.")
    (description
     "This crate provides data structures and functions to deal with IPv4 CIDRs and
IPv6 CIDRs.")
    (license license:expat)))

(define-public rust-rustscan-2
  (package
    (name "rust-rustscan")
    (version "2.1.1")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "rustscan" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1xdxzp4dfa8dcc6srz5apbfxkcm1a1w5d4k7wym4x0ql5kibfb4b"))))
    (build-system cargo-build-system)
    (arguments
     `(#:tests? #f
       #:cargo-inputs (("rust-ansi-term" ,rust-ansi-term-0.12)
                       ("rust-anyhow" ,rust-anyhow-1)
                       ("rust-async-std" ,rust-async-std-1)
                       ("rust-cidr-utils" ,rust-cidr-utils-0.5)
                       ("rust-colored" ,rust-colored-2)
                       ("rust-colorful" ,rust-colorful-0.2)
                       ("rust-dirs" ,rust-dirs-3)
                       ("rust-env-logger" ,rust-env-logger-0.8)
                       ("rust-futures" ,rust-futures-0.3)
                       ("rust-gcd" ,rust-gcd-2)
                       ("rust-itertools" ,rust-itertools-0.9)
                       ("rust-log" ,rust-log-0.4)
                       ("rust-rand" ,rust-rand-0.7)
                       ("rust-rlimit" ,rust-rlimit-0.8)
                       ("rust-serde" ,rust-serde-1)
                       ("rust-serde-derive" ,rust-serde-derive-1)
                       ("rust-shell-words" ,rust-shell-words-1)
                       ("rust-structopt" ,rust-structopt-0.3)
                       ("rust-subprocess" ,rust-subprocess-0.2)
                       ("rust-text-placeholder" ,rust-text-placeholder-0.4)
                       ("rust-toml" ,rust-toml-0.5)
                       ("rust-trust-dns-resolver" ,rust-trust-dns-resolver-0.19))
       #:cargo-development-inputs (("rust-wait-timeout" ,rust-wait-timeout-0.2))))
    (native-inputs (list perl python))
    (home-page "https://github.com/rustscan/rustscan")
    (synopsis "Faster Nmap Scanning with Rust")
    (description "Faster Nmap Scanning with Rust")
    (license license:expat)))


[-- Attachment #3: manifest.scm --]
[-- Type: text/x-scheme, Size: 299 bytes --]

;; (define-module (guix packages manifest))

;; (use-modules (gnu packages))

;; (specifications->manifest '("gcc-toolchain" "make" "git" "emacs" "vim" "tree" "ungoogled-chromium"))
(specifications->manifest '("gcc-toolchain" "make" "git" "emacs" "vim" "tree" "ungoogled-chromium" "rust-rustscan"))

  reply	other threads:[~2023-05-23  8:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  6:51 Howto reference a custom package from a manifest Timothy Washington
2023-05-19 16:15 ` Simon Tournier
     [not found]   ` <CAADtM-bc9FU6B+k5UaJctk3+T2aPO_z2edp=SM5LoZgd5JeNYA@mail.gmail.com>
2023-05-21 16:46     ` Simon Tournier
2023-05-21 20:35       ` Timothy Washington
2023-05-22  8:41         ` issue with packaging 'rustscan' Simon Tournier
2023-05-22  9:56           ` Tobias Kortkamp
2023-05-22 20:21             ` Timothy Washington [this message]
2023-05-22 18:17         ` Howto reference a custom package from a manifest Kaelyn
2023-05-22 20:20           ` Timothy Washington
2023-05-23 16:39             ` Kaelyn
2023-05-24 20:25               ` Timothy Washington
2023-05-24 22:16                 ` Kaelyn
2023-05-26 23:27                   ` Timothy Washington
2023-05-23 16:54             ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-05-24 20:10               ` Timothy Washington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAADtM-aw-+dVmhwjAT5v0HoPQk0LBiEpOhMqdBDrOTgmtZOHNw@mail.gmail.com \
    --to=twashing@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=tobias.kortkamp@gmail.com \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.