I am running NixOS 20.03 and would like to install Gerbil Scheme. Currently, only 0.15.1 is available, but 0.16 is available in unstable. I honestly considering just jumping to unstable, but I thought this would be a good time to stretch my nix muscles a little, so I am trying to write an overlay.
Here’s my overlay.nix, the vars are basically verbatim from what’s in the unstable nixpkgs:
self: super:
{
gerbil = super.gerbil.overrideAttrs ( oldAttrs: rec {
version = "0.16";
git-version = version;
src = self.fetchFromGitHub {
owner = "vyzo";
repo = "gerbil";
rev = "v${version}";
sha256 = "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f";
};
});
}
and my shell.nix:
{ nixpkgs ? import <nixpkgs> { overlays = [(import ./overlay.nix)]; } }:
nixpkgs.mkShell {
buildInputs = [nixpkgs.gerbil];
}
When I run this, it appears to run correctly, it mentioned unpacking source archive /nix/store/3bhsqprh02qr5aana5bdz20ysb53hdbz-source
, and when I checked that directory it does appear to have the correct version source: (define (gerbil-version-string) "v0.16")
. However once it finishes building, and the shell launches, it loads gerbil 0.15.1!
[nix-shell:~/work/gerbil]$ gxi
Gerbil v0.15.1 on Gambit v4.9.3
[nix-shell:~/work/gerbil]$ which gxi
/nix/store/n0fwpf0r83xdy48wx7d1sxmf4kdv6p8z-gerbil-0.16/bin/gxi
That nix store link appears to be correct based on the build output from when I ran nix-shell
so it appears to have build 0.15.1 or 0.15.1 has otherwise leaked into the build. Does anyone have any idea for how I may proceed?