me
/
guix
Archived
1
0
Fork 0

gnu: Add 9yacc.

* gnu/packages/suckless.scm (9yacc): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Antero Mejr 2023-02-24 03:22:20 +00:00 committed by Ludovic Courtès
parent b924d89fce
commit 344a0d2c11
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 31 additions and 0 deletions

View File

@ -1324,3 +1324,34 @@ environments, where no keyboard is available.")
It also contains the Plan 9 libbio, libregexp, libfmt and libutf libraries.")
(license (list license:expat ;modifications
license:lpl1.02))))) ;original plan9 code
(define-public 9yacc
(package
(inherit lib9)
(name "9yacc")
(arguments
(substitute-keyword-arguments (package-arguments lib9)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'patch 'patch-for-9yacc
(lambda _
(substitute* "yacc/yacc.c"
(("#9/yacc")
(string-append #$output "/lib")))
(substitute* "config.mk"
(("^CFLAGS.*+=.*$")
(string-append "CFLAGS+=-O2 -g -c -DPLAN9PORT "
"-DPREFIX=\\\"" #$output "\\\"\n")))))
(replace 'chdir
(lambda _
(chdir "yacc")))
(delete 'install-include)
(add-after 'install 'install-yaccpar
(lambda _
(install-file "yaccpar" (string-append #$output "/lib"))
(install-file "yaccpars" (string-append #$output "/lib"))))))))
(inputs (list lib9))
(synopsis "Port of Plan 9's yacc parser generator for Unix")
(description
"This package provides a ported version of the Plan 9 yacc parser
generator.")))