help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Idris2


From: Pierre-Henry Fröhring
Subject: Re: Packaging Idris2
Date: Sat, 20 Aug 2022 02:11:33 +0200
User-agent: Evolution 3.38.3-1

Well, I went from a `guix shell --container' up to `make test' passing ;
assuming a `chez-scheme' backend (no `node' nor `racket'). It boils down
to a shell session looking like:

┌────
│ $ cd ~/src/
│ $ git clone git@github.com:idris-lang/Idris2.git
│ $ cd Idris2
│ $ ./build_idris
└────
Listing 1: session

I guess that an idea would be to « translate » this session into a Guix
Package. What's the best option here? To torture the `gnu-build-system'
until it accepts to build Idris2 or should I take the
`trivial-build-system' route?
Thank you.
― PHF

┌────
│ #! /usr/bin/env bash
│ set -euo pipefail
│ IFS=$'\n\t'
│ 
│ cat <<'EOF' >manifest.scm
│ (specifications->manifest
│  '("gcc@12.1.0"
│    "chez-scheme"
│    "gmp"
│    "coreutils"
│    "bash"
│    "make"
│    "findutils"
│    "git"
│    "diffutils"
│    "glibc"
│    "sed"
│    "gawk"
│    "binutils"))
│ EOF
│ 
│ cat <<'EOF' >build_idris_in_container
│ set -euo pipefail
│ IFS=$'\n\t'
│ 
│ echo 'Idris build configuration'
│ set -x
│ export PREFIX=/tmp/idris2
│ export SCHEME=chez-scheme
│ export CC=gcc
│ export INTERACTIVE=''
│ set +x
│ echo
│ 
│ echo 'PATHS configuration'
│ set -x
│ export LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib:$PREFIX/lib
│ export PATH=$PATH:$PREFIX/bin
│ set +x
│ echo
│ 
│ echo 'Bootstrap'
│ make bootstrap
│ echo
│ 
│ echo 'Install'
│ make install
│ echo
│ 
│ echo 'Self-host'
│ make clean
│ make all
│ make install
│ echo
│ 
│ echo 'Test'
│ make test
│ echo
│ 
│ echo 'Clean'
│ rm -v manifest.scm
│ rm -v build_idris_in_container
│ echo
│ EOF
│ 
│ guix shell -C -m manifest.scm -- bash ./build_idris_in_container
└────
Listing 2: build_idris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]