[bug#79005,v3] gnu: Add dialogc.
Commit Message
Hello Andreas,
> Hello Adam,
>
> in the dialogc package, you can write "python" instead of "python-3",
> since it has become the standard version now.
Cool! I didn't know that before.
>
> The license is bsd-2, not bsd-3.
>
> I would use a phase instead of a snippet: This is not written down in
> the documentation, but we tend to use snippets when we want to modify
> the source itself (often, removing non-free parts); here the change is
> merely to adapt to the Guix build, and there is no real need to modify
> the source as distributed with "guix build dialogc -S".
> Actually this will make the recipe easier: You could simply move the
> substitution into the "with-directory-excursion" of the build phase.
Right, I've revised the patch with all the changes.
> Where do you take the base version "1a-01" from? Normally this should be
> the latest released version; here I do not see any release, so maybe we
> should use "0" instead?
I took it from `dialogc --version`. While it hasn't been officially
tagged yet, I thought it would be best to build from the most recent
commit. There's a bit more context here, if you're interested:
https://intfiction.org/t/dialog-version-naming/73515/3
The revised patch is attached.
From ad3adbf76b1f7512399d7bebb8cb6353986427c8 Mon Sep 17 00:00:00 2001
Message-ID: <ad3adbf76b1f7512399d7bebb8cb6353986427c8.1762071684.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sun, 13 Jul 2025 16:30:50 +0800
Subject: [PATCH v3] gnu: Add dialogc.
* gnu/packages/game-development.scm (dialogc): New variable.
Change-Id: Id02c124814854785a73d8ff7e1739158a7d03faf
---
gnu/packages/game-development.scm | 49 +++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
@@ -95,6 +95,7 @@ (define-module (gnu packages game-development)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages games)
#:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
@@ -121,6 +122,7 @@ (define-module (gnu packages game-development)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages networking)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages pulseaudio)
@@ -319,6 +321,53 @@ (define-public deutex
DeuTex has functions such as merging wads, etc.")
(license license:gpl2+)))
+(define-public dialogc
+ (let ((commit "68476f9f3b1ca2db15615e508837ca721e0759ab")
+ (revision "0"))
+ (package
+ (name "dialogc")
+ (version (git-version "1a-01" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Dialog-IF/dialog")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1gm6fb86chq74fh2llmmgji6fwylk0xd53fmij6l9x348nvw1bkn"))))
+ (build-system gnu-build-system)
+ (native-inputs (list frotz-dumb-terminal perl python))
+ (arguments
+ (list
+ #:test-target "test"
+ #:parallel-tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'set-install-prefix
+ (lambda _
+ (setenv "PREFIX" #$output)))
+ (replace 'build
+ (lambda _
+ (with-directory-excursion "src"
+ (substitute* "Makefile"
+ (("cp dialogc" all)
+ (string-append "install -d ${PREFIX}/bin\n\t" all))
+ (("/usr/local") "${PREFIX}"))
+ (invoke "make"))))
+ (replace 'install
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (install-file "src/dialogc" bin)
+ (install-file "src/dgdebug" bin)))))))
+ (synopsis "Dialog interactive fiction compiler")
+ (description
+ "Dialog is a domain-specific language for creating works
+of interactive fiction. It is heavily inspired by Inform 7 and Prolog.")
+ (home-page "https://github.com/Dialog-IF/dialog")
+ (license license:bsd-2))))
+
(define-public go-codeberg-org-anaseto-gruid-sdl
(package
(name "go-codeberg-org-anaseto-gruid-sdl")
base-commit: 28b5d5c9db66d48a663f95fb18bb1a53ab1f2b0b
--
2.51.2