Subject: [bug#65934] [PATCH] gnu: Add smithforth.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 05 Oct 2023 14:46:57 +0200

Hi,

"B. Wilson" <[email-masked]> skribis:

> * gnu/packages/forth (smithforth): New variable.

[…]

> +(define-public smithforth
> +  (package
> +    (name "smithforth")
> +    (version "220711")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (string-append "https://dacvs.neocities.org/SF/SForth"
> +                            version "dmp.txt"))
> +        (sha256
> +          (base32 "0a39pv7529llsa3f48fmvwvlcp3f9v8qkn5ziw2l6kxf0qvli3lm"))))
> +    (build-system trivial-build-system)
> +    (inputs
> +     `(("system.fs"
> +        ,(origin
> +           (method url-fetch)
> +           (uri (string-append "https://dacvs.neocities.org/SF/system"
> +                               version "fs.txt"))
> +           (sha256
> +            (base32
> +             "17v1pp64s6n8q8w3kg48nd7zdcx2208y4svr5fpfms5lkyzg7z1m"))))))

Is this a binary VM image dump?

If so, is there source available, a way to bootstrap it?

> +    (native-inputs (list xxd))
> +    (arguments
> +     `(#:modules ((guix build utils))
> +       #:builder
> +       (begin
> +         (use-modules (guix build utils)
> +                      (ice-9 textual-ports))
> +         (let* ((sforth.dmp (assoc-ref %build-inputs "source"))
> +                (system.fs  (assoc-ref %build-inputs "system.fs"))

Please use a gexp here for #:builder and instead of the (assoc-ref …)
expressions above, use:

  #~(begin
      ;; …
      (let* ((sforth.dmp #$(package-source this-package))
             (system.fs #$(origin …)))
        …))

> +    (home-page "https://dacvs.neocities.org/SF/")
> +    (synopsis "Forth programming language for x86-64 desktop computers")

Please add a ‘supported-systems’ field so the package is clearly marked
as unsupported on architectures other than x86_64.

Thanks,
Ludo’.