Added docker tests. Renamed .scm files so guix wont run them on guix pull.

This commit is contained in:
retropikzel 2024-10-11 08:40:12 +03:00
parent 86a481d452
commit 4213bfb17f
7 changed files with 32 additions and 5 deletions

5
Dockerfile.alpine Normal file
View File

@ -0,0 +1,5 @@
FROM alpine:latest
RUN apk add guix
RUN mkdir -p ${HOME}/.config/guix
RUN echo "(cons (channel (name 'snow-fort) (url \"https://gitea.scheme.org/Rinne/snow-fort-guix-channel.git\")) %default-channels)" > ${HOME}/.config/guix/channels.scm
RUN guix-daemon & guix pull

5
Dockerfile.debian Normal file
View File

@ -0,0 +1,5 @@
FROM debian:stable-slim
RUN apt update && apt install -y guix
RUN mkdir -p ${HOME}/.config/guix
RUN echo "(cons (channel (name 'snow-fort) (url \"https://gitea.scheme.org/Rinne/snow-fort-guix-channel.git\")) %default-channels)" > ${HOME}/.config/guix/channels.scm
RUN guix-daemon & guix pull

View File

@ -1,15 +1,21 @@
TMPDIR=/tmp/snow-fort-guix-channel
build: repo.scm
gosh -r7 get-package-urls.scm > ${TMPDIR}/package-urls.txt
mkdir -p ${TMPDIR}/hashes
gosh -r7 get-package-urls.r7rs-scm > ${TMPDIR}/package-urls.txt
sh ensure-hashes.sh ${TMPDIR}/hashes ${TMPDIR}/package-urls.txt
mkdir -p packages
gosh -r7 build.scm ${TMPDIR}
gosh -r7 build.r7r-scm ${TMPDIR}
repo.scm:
wget https://snow-fort.org/s/repo.scm
test-debian:
docker build . -f Dockerfile.debian
test-alpine:
docker build . -f Dockerfile.alpine
clean:
rm -rf packages

View File

@ -39,6 +39,12 @@ Run:
## Using packages
### Note about dependencies
When package has dependency on any (scheme ...) or (srfi ...) library it is **not** installed
alongside the package. The reasons are that first comes from the implementation and second might
have multiple implementation or come from the implementation. See the part about installing
srfi-libraries for more details.
### Guix shell
@ -56,6 +62,11 @@ For example with Guile:
guile --r7rs -L ${GUIX_PROFILE}/share/snow
### Installing SRFI libraries
SRFI libraries are not yet packaged into this channel. See related
[issue](https://gitea.scheme.org/Rinne/snow-fort-guix-channel/issues/2).

View File

@ -46,9 +46,9 @@
(define module-definition
'(define-module (snow-fort)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module ((guix packages) #:select (package origin base32))
#:use-module (guix build-system copy)
#:use-module (guix download)))
#:use-module ((guix download) #:select (url-fetch))))
(define snow-library->guix-library
(lambda (lib version url sha-256 license)

View File

@ -1,4 +1,4 @@
(define-module (snow-fort) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix build-system copy) #:use-module (guix download))
(define-module (snow-fort) #:use-module (guix licenses) #:use-module ((guix packages) #:select (package origin base32)) #:use-module (guix build-system copy) #:use-module ((guix download) #:select (url-fetch)))
(define-public snow-chibi-math-linalg (package (name "snow-chibi-math-linalg") (version "0.3") (source (origin (method url-fetch) (uri "https://snow-fort.org/s/gmail.com/alexshinn/chibi/math/linalg/0.3/chibi-math-linalg-0.3.tgz") (sha256 (base32 "1c4li62xpcl7jd9kanc4nd2d2jnwh0ji1wxdlzrnb136s2c3hy2m")))) (build-system copy-build-system) (arguments (list #:install-plan ''(("chibi/" "share/snow/chibi/")))) (synopsis "") (description "") (home-page "") (license (non-copyleft "")) (propagated-inputs (list snow-chibi-assert snow-chibi-optional))))