Thanks very much for the advice, it's much appreciated.  It combined
with the manuals and the packages repos got me to a working build.

I'm including it here in case it helps anybody else in future:


(define-module (my-packages zasm)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix licenses)
  #:use-module (gnu packages compression))

(define-public zasm
  (package
   (name "zasm")
   (version "4.4.17")
   (source (origin
   (method git-fetch)
   (uri
    (git-reference
     (url "https://github.com/Megatokio/zasm.git";)
     (commit version)
     (recursive? #t)))
   (file-name (git-file-name name version))
   (sha256
    (base32
     "1pk5lm3vafxxwxmylk1ia382z7h5zm1dskdac72z1hzacrimihml"))))
   (build-system gnu-build-system)
   (inputs (list zlib))
   (arguments
    `(#:phases
      (modify-phases %standard-phases
    (delete 'configure)
    (delete 'check)
    (replace 'install
     (lambda* (#:key outputs #:allow-other-keys)
;; The package's Makefile doesn't provide an "install"
;; rule so do it by ourselves.
(let* ((bin (string-append
    (assoc-ref outputs "out")
    "/bin"))
      (package-name ,name))
 (install-file package-name bin)))))))

   (synopsis "Z80, 8080 and Z180 assembler")
   (description "zasm is an assembler for the Z80 CPU. It can also
assemble code for
the extended instruction set of the Z180 / Hitachi HD64180, as well as
code limited to the Intel 8080 e.g. for CP/M. zasm can also assemble
native 8080 assembler source.")
   (home-page "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";)
   (license bsd-2)))

On Thu, 13 Feb 2025 at 20:32, Tobias Geerinckx-Rice <m...@tobias.gr> wrote:
>
> …as for use-modules: yes, (USE-MODULES LIST) is a thing, but *not* as an 
> argument to DEFINE-MODULE:
>
>   (define-module NAME [KEYWORD-ARGUMENT…])
>
> vs.
>
>   (define-module NAME)
>   (use-modules LIST)
>
> By nesting USE-MODULES *within* the sweet embrace of DEFINE-MODULES, you were 
> attempting to combine the two, into an unholy abomination that means nothing.
>
> I know, it's confusing, but just treat it as an opaque rule until you get 
> used to it.
>
> Kind regards,
>
> T G-R
>
> Sent on the go.  Excuse or enjoy my brevity.

Reply via email to