help-guix
[Top][All Lists]
Advanced

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

Re: Packaging Idris2


From: Csepp
Subject: Re: Packaging Idris2
Date: Sat, 20 Aug 2022 20:42:38 +0200

Pierre-Henry Fröhring <contact@phfrohring.com> writes:

> 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

I'm pretty sure Lendvai Attila has a WIP package that was supposed to be
submitted as a patch "soon", which was like a year ago.

Anyways, there are definitely already Idris 2 patches floating around
the mailing list so I'd prefer if discussion was moved there.
I'm also interested in getting it packaged, but building it takes a lot
of time.
The Scheme bootstrap seed can be generated with Idris 1, true.  But
compiling Idris 2 with Idris 1 takes such an ungodly amount of time and
RAM that expecting people to do so is maybe not a great idea.  I
certainly will not be working on that.  Last time I built it I needed at
least 16 gigs of swap.  I have better use cases for my SSD.



reply via email to

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