all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help: No matching package
@ 2021-07-25  9:32 phodina
  0 siblings, 0 replies; only message in thread
From: phodina @ 2021-07-25  9:32 UTC (permalink / raw)
  To: help-guix@gnu.org

Greetings,
I want to package a Rust crate `calculate` available on Gitlab. So I created the package description and defined also another one `decimal`.

Package `rust-decimal` build correctly.
However, when I want to build `calculate` package it complains that the crate is not available.

starting phase `build'
error: no matching package named `decimal` found

As the crate is not available on crates.io I had to substitute the dependency in Cargo.toml.

The crate is listed in #:cargo-inputs. I'm wondering about what I'm doing wrong?

Source code is listed below.

Kind regards
Petr

---
(define-public rust-calculate-0.7
  (package
    (name "rust-calculate")
    (version "9f975c504bf6d1a2bcf44992866233f49afaeb29")
    (source
      (origin
        (method git-fetch)
	(uri (git-reference
              (url "https://gitlab.redox-os.org/redox-os/calc")
              (commit version)))
	(file-name (git-file-name name version))
        (sha256
          (base32
            "0vmpn2j38h2hh0rhmvbq6yhpw4ibym5370p6142ch470fbqs4jf1"))))
    (build-system cargo-build-system)
    (arguments
      `(#:cargo-inputs
	(("rust-atty" ,rust-atty-0.2)
	 ("rust-clap" ,rust-clap-2)
	 ("rust-decimal" ,rust-decimal-2)
	 ("rust-liner" ,rust-liner-0.5)
	 ("rust-num" ,rust-num-0.3)
	 ("rust-rand" ,rust-rand-0.7))
	#:phases
	 (modify-phases %standard-phases
			(add-after 'unpack 'fix-decimal-dependency
				   (lambda _
				     (substitute* "Cargo.toml"
						 (("^decimal.*") "decimal = \"*\"\n")))
				   ))))
    (home-page
      "https://gitlab.redox-os.org/redox-os/calc")
    (synopsis
      "Rust library for parsing and processing arithmetic expressions")
    (description
      "calc is a Rust library for tokenizing and evaluating arithmetic expressions with a command line application of the same name included.
")
    (license license:expat))) ; MIT

(define-public rust-decimal-2
  (package
    (name "rust-decimal")
    (version "2.1.0")
    (source
      (origin
        (method git-fetch)
	(uri (git-reference
              (url "https://github.com/alkis/decimal")
              (commit version)))
	(file-name (git-file-name name version))
        (sha256
          (base32
            "1g6f7vqri5cqlca9a6vcdqgymvkxsff1061cdcfia30s552876dk"))))
    (build-system cargo-build-system)
    (arguments
      `(#:cargo-inputs
	 (("rust-bitflags" ,rust-bitflags-1)
	  ("rust-libc" ,rust-libc-0.2)
	  ("rust-ord-subset" ,rust-ord-subset-3)
	  ("rust-rustc-serialize" ,rust-rustc-serialize-0.3)
	  ("rust-serde" ,rust-serde-1)
	  ("rust-serde-json" ,rust-serde-json-1))))
    (home-page
      "https://github.com/alkis/decimal")
    (synopsis
      "Decimal Floating Point arithmetic for rust")
    (description
      "The library provides d128 which is a 128-bit decimal floating point number. You can use it as other primitive numbers in Rust. All operators are overloaded to allow ergonomic use of this type.")
    (license license:asl2.0)))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-25  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25  9:32 Help: No matching package phodina

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.