I started doing it for myself, since I wanted to play with racket and building it from source was a fun way to get started. The snap packaging is actually very simple (too simple in fact, it needs some improvements).
I have not published the snap anywhere yet. I think the racket community should request the racket snap name and do that if there is desire to provide an official snap package. In the meantime I will explore racket, improve packaging and share updates once in a while.
I can be found on twitter (@zygoon), where I'm happy to respond to any questions in case I miss a notification from discourse.
Something appears to have gone wrong with the files in src/cs/c/ChezScheme/pb/boot/pb. Just deleting cs/c/ChezScheme/pb may solve the problem, or it may be that files in src/ChezScheme/boot/pb have gone wrong (where those files would be the starting content for src/cs/c/ChezScheme/pb/boot/pb).
This issue is on master, and not in the snapshot. I'm guessing that the snapshot will not have these issues.
That said, the problem seems to be that the git repo in src/ChezScheme/boot/bp is somehow out of sync. I did git checkout master in that sub-repo which leaves only README.md, and I get the following error when running make cs: missing input file: "ChezScheme/boot/pb/petite.boot". IIRC this used to bootstrap from nothing?
That checkout need to be a different branch than master. The easiest solution is to delete src/ChezScheme/boot/bp and run make pb-fetch in the Racket checkout root.
FYI, if building for a distro, you can use rktboot to generate the native bootfiles directly, without going through pb. That's especially true if your bootstrapping policies (like Guix's) require self-hosting the bootstrap whenever possible, rather than cross-compiling from another architecture.
You will find that the name is reserved, because snapcraft auto-reserved names related to package names and popular git repositories, to avoid confusion and name squatting.
Let me know if you need help.
Registering the name does not make the package available, so you can safely do that now.
Registering the name racket gives you a top-level application under the same name. To have other top-level names related to racket apps like raco, you have to follow a different process (automatic aliases). This will make snapd install an alias raco that points to racket.raco and really runs raco. Since those share the same top-level namespace of all command line apps, this process requires a request on the snapcraft forum, community vote and clash check. This only affects automatically providing the aliases, you can have any number of apps under the racket snap name, but they are all called racket.$app-name. Users can set up any aliases they want locally with snap alias, the forum process just makes this automatic upon installation.
Cool, let me know if you want to try the build process.
You can stick the file I've pasted in the earlier post in this thread, install snapcraft (sudo snap install --classic --candidate snapcraft and then just run snapcraft. I made the packaging to use snapcraft 7.x features and snapcraft 7 is still in the candidate release phase.
Let me know if you want to give this a try or if you get stuck on anything.
New issue when building against the latest snapshot. The issue happens during make install-bc and I'm 99% sure that it is due to the fact that DESTDIR is different than the configured prefix. It also may be the case that this is an interaction with --enable-shared. I can reproduce the issue on master by running the following:
pushd racket/src
./configure --enable-bc --enable-shared --prefix=/usr
make bc
make install-bc DESTDIR=/tmp/test-racket-destdir
For reference the configure is run with the following options.
Just to confirm, I've now built Racket from 71772696941191c7d231d0ea8daf51e58801aeaa on top of current Guix and all is well. I haven't tried cross-compilation or platforms without native code backends yet: I hope to soon, but I didn't have that working with the old build scripts, either, so it's not a regression in any case.
Everything working on my end as of the latest snapshot.
I am also testing the main tree ebuild (@xgqt is not on racket discourse yet apparently, will ping separately) and I'm seeing an error related to missing install option for the chez boot files when calling make unix-install-boot-files in src/cs/c. I'm not sure what the importance of this is but it breaks the build. Looking at build.zuo it seems that this operation may be done by default now and only blocked if no-install is enabled?
make: Entering directory '/var/tmp/portage/dev-scheme/racket-8.6/work/racket-8.5.0.8/src/cs/c'
make: *** No rule to make target 'unix-install-boot-files'. Stop.
make: Leaving directory '/var/tmp/portage/dev-scheme/racket-8.6/work/racket-8.5.0.8/src/cs/c'
Racket version <= 8.5 by default was not installing Chez boot files.
As far as I remember I think I needed them for embedding Racket in one of my personal projects and when I found out that wasn't the default I patched the install script (ebuild) adding a command to install boot files when building the Chez Scheme Racket version (ref: repo/gentoo.git - Official Gentoo ebuild repository).
If Racket still does not install Chez's boot files by default could anybody tell if there is a method to install them via make somehow still of if they have to be copied "manually"?
Because as @tgbugs pointed out the make call (make -C "${S}"/cs/c DESTDIR="${ED}" unix-install-boot-files) does not seem to work.
Btw, if anybody wonders the default function in ebuild scripts calls looks something like this: make --jobs=7 --load-average=6 DESTDIR=/var/tmp/portage/dev-scheme/racket-8.5/image install, where jobs and load-average are controlled by user's configuration and the DESTDIR variable contains a temporary directory which is copied onto the running system after src_install is done.