Update, reindent infrastructure files

* guix.scm: Define guile-ts-next to use newer commit "correctly"
* manifest.scm: Define guile-hall-next to use newer commit "correctly"
This commit is contained in:
Juliana Rat 2023-11-05 18:45:51 -05:00
parent 5ab58f9248
commit b27cfd7bc3
2 changed files with 204 additions and 244 deletions

342
guix.scm
View file

@ -1,170 +1,180 @@
(use-modules (gnu packages)
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo)
(gnu packages tree-sitter)
(guix build-system gnu)
(guix download)
(guix gexp)
(guix transformations)
((guix licenses)
#:prefix license:)
(guix packages)
(srfi srfi-1))
(gnu packages autotools)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages texinfo)
(gnu packages tree-sitter)
(guix build-system gnu)
(guix download)
(guix gexp)
(guix git-download)
(guix transformations)
((guix licenses)
#:prefix license:)
(guix packages)
(srfi srfi-1))
(define guile-ts-transform
(options->transformation
'((with-commit . "guile-ts=266453a"))))
(define guile-ts-next
(let ((commit "266453a"))
(package
(inherit guile-ts)
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Z572/guile-ts")
(commit commit)))
(file-name (git-file-name (package-name guile-ts) commit))
(sha256
(base32
"1s65kpwhsphbjlggpc6gy1wbap85yjzdb69xfvs8j204w24smjps")))))))
(package
(name "sloth")
(version "0.1-dev")
(source
(local-file
(dirname (current-filename))
#:recursive? #t
#:select? (λ (file stat)
(not (any (λ (my-string)
(string-contains file my-string))
(list ".git" ".dir-locals.el" "guix.scm"))))))
(build-system gnu-build-system)
(arguments
(list
#:make-flags
#~(list "GUILE_AUTO_COMPILE=0")
#:phases
#~(modify-phases %standard-phases
(delete 'strip)
(add-before 'configure 'hall-build
(λ _ (system* "hall" "build" "-x")))
(add-after 'hall-build 'autoreconf
(λ _ (system* "autoreconf" "-vif")))
(add-after 'install 'hall-wrap-binaries
(λ _
(use-modules (ice-9 ftw))
(define (guile-compiled-dir out version)
(string-append out "/lib/guile/"
version
"/site-ccache"))
(define (guile-uncompiled-dir out version)
(string-append out
"/share/guile/site"
(if (string-null? version) ""
"/")
version))
(define (guile-dep-path env modules path)
(list env ":" 'prefix
(cons modules
(map (λ (input)
(string-append input path))
;; TODO: figure out how to put these in a list shared
;; with inputs because DRY
(list #$guile-config
#$guile-ncurses
#$(guile-ts-transform guile-ts))))))
(define bin (string-append #$output "/bin/"))
(define site (guile-uncompiled-dir #$output ""))
(define version (caddr (scandir site)))
(wrap-program (string-append bin "sloth")
(guile-dep-path
"GUILE_LOAD_PATH"
(guile-uncompiled-dir #$output version)
(guile-uncompiled-dir "" version))
(guile-dep-path
"GUILE_LOAD_COMPILED_PATH"
(guile-compiled-dir #$output version)
(guile-compiled-dir "" version))
(list "TREE_SITTER_GRAMMAR_PATH" ":" '=
(map (λ (input)
(string-append input "/lib/tree-sitter"))
;; TODO: figure out how to put these in a list shared
;; with inputs because DRY
(list #$tree-sitter-bash
#$tree-sitter-bibtex
#$tree-sitter-c
#$tree-sitter-c-sharp
#$tree-sitter-clojure
#$tree-sitter-cmake
#$tree-sitter-cpp
#$tree-sitter-css
#$tree-sitter-dockerfile
#$tree-sitter-elixir
#$tree-sitter-elm
#$tree-sitter-go
#$tree-sitter-gomod
#$tree-sitter-haskell
#$tree-sitter-heex
#$tree-sitter-html
#$tree-sitter-java
#$tree-sitter-javascript
#$tree-sitter-json
#$tree-sitter-julia
#$tree-sitter-lua
#$tree-sitter-markdown
#$tree-sitter-markdown-gfm
#$tree-sitter-meson
#$tree-sitter-ocaml
#$tree-sitter-org
#$tree-sitter-php
#$tree-sitter-plantuml
#$tree-sitter-python
#$tree-sitter-r
#$tree-sitter-racket
#$tree-sitter-ruby
#$tree-sitter-rust
#$tree-sitter-scala
#$tree-sitter-scheme
#$tree-sitter-typescript)))))))))
(native-inputs (list autoconf
automake
guile-hall
pkg-config
texinfo))
(inputs (list guile-3.0
guile-config
guile-ncurses
(guile-ts-transform guile-ts)
tree-sitter-bash
tree-sitter-bibtex
tree-sitter-c
tree-sitter-c-sharp
tree-sitter-clojure
tree-sitter-cmake
tree-sitter-cpp
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-elixir
tree-sitter-elm
tree-sitter-go
tree-sitter-gomod
tree-sitter-haskell
tree-sitter-heex
tree-sitter-html
tree-sitter-java
tree-sitter-javascript
tree-sitter-json
tree-sitter-julia
tree-sitter-lua
tree-sitter-markdown
tree-sitter-markdown-gfm
tree-sitter-meson
tree-sitter-ocaml
tree-sitter-org
tree-sitter-php
tree-sitter-plantuml
tree-sitter-python
tree-sitter-r
tree-sitter-racket
tree-sitter-ruby
tree-sitter-rust
tree-sitter-scala
tree-sitter-scheme
tree-sitter-typescript))
(synopsis "Text editor based on tree-sitter")
(description
"TODO")
(home-page "https://git.solarpunk.moe/Sloth/sloth")
(license license:gpl3+))
(name "sloth")
(version "0.1-dev")
(source
(local-file
(dirname (current-filename))
#:recursive? #t
#:select? (λ (file stat)
(not (any (λ (my-string)
(string-contains file my-string))
(list ".git" ".dir-locals.el" "guix.scm"))))))
(build-system gnu-build-system)
(arguments
(list
#:make-flags
#~(list "GUILE_AUTO_COMPILE=0")
#:phases
#~(modify-phases %standard-phases
(delete 'strip)
(add-before 'configure 'hall-build
(λ _ (system* "hall" "build" "-x")))
(add-after 'hall-build 'autoreconf
(λ _ (system* "autoreconf" "-vif")))
(add-after 'install 'hall-wrap-binaries
(λ _
(use-modules (ice-9 ftw))
(define (guile-compiled-dir out version)
(string-append out "/lib/guile/"
version
"/site-ccache"))
(define (guile-uncompiled-dir out version)
(string-append out
"/share/guile/site"
(if (string-null? version) ""
"/")
version))
(define (guile-dep-path env modules path)
(list env ":" 'prefix
(cons modules
(map (λ (input)
(string-append input path))
;; TODO: figure out how to put these in a list shared
;; with inputs because DRY
(list #$guile-config
#$guile-ncurses
#$guile-ts-next)))))
(define bin (string-append #$output "/bin/"))
(define site (guile-uncompiled-dir #$output ""))
(define version (caddr (scandir site)))
(wrap-program (string-append bin "sloth")
(guile-dep-path
"GUILE_LOAD_PATH"
(guile-uncompiled-dir #$output version)
(guile-uncompiled-dir "" version))
(guile-dep-path
"GUILE_LOAD_COMPILED_PATH"
(guile-compiled-dir #$output version)
(guile-compiled-dir "" version))
(list "TREE_SITTER_GRAMMAR_PATH" ":" '=
(map (λ (input)
(string-append input "/lib/tree-sitter"))
;; TODO: figure out how to put these in a list shared
;; with inputs because DRY
(list #$tree-sitter-bash
#$tree-sitter-bibtex
#$tree-sitter-c
#$tree-sitter-c-sharp
#$tree-sitter-clojure
#$tree-sitter-cmake
#$tree-sitter-cpp
#$tree-sitter-css
#$tree-sitter-dockerfile
#$tree-sitter-elixir
#$tree-sitter-elm
#$tree-sitter-go
#$tree-sitter-gomod
#$tree-sitter-haskell
#$tree-sitter-heex
#$tree-sitter-html
#$tree-sitter-java
#$tree-sitter-javascript
#$tree-sitter-json
#$tree-sitter-julia
#$tree-sitter-lua
#$tree-sitter-markdown
#$tree-sitter-markdown-gfm
#$tree-sitter-meson
#$tree-sitter-ocaml
#$tree-sitter-org
#$tree-sitter-php
#$tree-sitter-plantuml
#$tree-sitter-python
#$tree-sitter-r
#$tree-sitter-racket
#$tree-sitter-ruby
#$tree-sitter-rust
#$tree-sitter-scala
#$tree-sitter-scheme
#$tree-sitter-typescript)))))))))
(native-inputs (list autoconf
automake
guile-hall
pkg-config
texinfo))
(inputs (list guile-3.0
guile-config
guile-ncurses
guile-ts-next
tree-sitter-bash
tree-sitter-bibtex
tree-sitter-c
tree-sitter-c-sharp
tree-sitter-clojure
tree-sitter-cmake
tree-sitter-cpp
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-elixir
tree-sitter-elm
tree-sitter-go
tree-sitter-gomod
tree-sitter-haskell
tree-sitter-heex
tree-sitter-html
tree-sitter-java
tree-sitter-javascript
tree-sitter-json
tree-sitter-julia
tree-sitter-lua
tree-sitter-markdown
tree-sitter-markdown-gfm
tree-sitter-meson
tree-sitter-ocaml
tree-sitter-org
tree-sitter-php
tree-sitter-plantuml
tree-sitter-python
tree-sitter-r
tree-sitter-racket
tree-sitter-ruby
tree-sitter-rust
tree-sitter-scala
tree-sitter-scheme
tree-sitter-typescript))
(synopsis "Text editor based on tree-sitter")
(description
"TODO")
(home-page "https://git.solarpunk.moe/Sloth/sloth")
(license license:gpl3+))

View file

@ -5,86 +5,36 @@
;; Usage: guix shell -[CNW]m manifest.scm
(use-modules (gnu packages autotools)
(gnu packages base)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages readline)
(gnu packages texinfo)
(gnu packages version-control)
(guix build-system gnu)
(guix git-download)
((guix licenses)
#:prefix license:)
(guix packages))
(gnu packages base)
(gnu packages guile)
(gnu packages guile-xyz)
(gnu packages pkg-config)
(gnu packages readline)
(gnu packages texinfo)
(gnu packages version-control)
(guix build-system gnu)
(guix git-download)
((guix licenses)
#:prefix license:)
(guix packages))
(define guile-hall-next
(package
(name "guile-hall")
(version "0.4.1-next")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/a-sassmannshausen/guile-hall")
(commit "9ca0c3e")))
(file-name (git-file-name name version))
(sha256
(base32 "0fi7isi5wq6awssk08zj4scifrb9g1g1027id5j87awb29q22jlj"))))
(build-system gnu-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(add-after 'install 'hall-wrap-binaries
(lambda _
(use-modules (ice-9 ftw))
(define (compiled-dir out version)
(string-append out "/lib/guile/"
version
"/site-ccache"))
(define (uncompiled-dir out version)
(string-append out
"/share/guile/site"
(if (string-null? version) ""
"/")
version))
(define (dep-path env modules path)
(list env ":"
'prefix
(cons modules
(map (lambda (input)
(string-append input path))
(list #$guile-config)))))
(define bin (string-append #$output "/bin/"))
(define site (uncompiled-dir #$output ""))
(define version (caddr (scandir site)))
(wrap-program (string-append bin "hall")
(dep-path
"GUILE_LOAD_PATH"
(uncompiled-dir #$output version)
(uncompiled-dir "" version))
(dep-path
"GUILE_LOAD_COMPILED_PATH"
(compiled-dir #$output version)
(compiled-dir "" version))))))))
(native-inputs (list autoconf
automake
pkg-config
texinfo))
(inputs (list guile-3.0))
(propagated-inputs (list guile-config))
(synopsis "Guile project tooling")
(description
"Hall is a command-line application and a set of Guile libraries that
allow you to quickly create and publish Guile projects. It allows you to
transparently support the GNU build system, manage a project hierarchy &
provides tight coupling to Guix.")
(home-page "https://gitlab.com/a-sassmannshausen/guile-hall")
(license license:gpl3+)))
(let ((commit "9ca0c3e"))
(package
(inherit guile-hall)
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/a-sassmannshausen/guile-hall")
(commit commit)))
(file-name (git-file-name (package-name guile-hall) commit))
(sha256
(base32 "0fi7isi5wq6awssk08zj4scifrb9g1g1027id5j87awb29q22jlj")))))))
(packages->manifest
(list coreutils
git
guile-3.0
guile-hall-next
guile-readline))
git
guile-3.0
guile-hall-next
guile-readline))