;; shell.nix { pkgs ? import { } }: let # This version of egg2nix includes a few fixes for C5 egg file compat. # See https://github.com/DerGuteMoritz/egg2nix/commits/chicken-5 # Also, the egg2nix version available via nixpkgs was lagging a bit # behind upstream, see https://github.com/NixOS/nixpkgs/pull/119085 egg2nix = pkgs.chickenPackages_5.egg2nix.overrideAttrs (_: { src = pkgs.fetchFromGitHub { owner = "DerGuteMoritz"; repo = "egg2nix"; rev = "7a42985b2eff7d120be2cec65493ad52084b4e44"; sha256 = "1pzfmw6wlr0rlg167rdzr5w1x2pg4g5nszajwr1m6ra6k4pcksc1"; }; }); eggs = import ./eggs.nix { inherit pkgs; inherit (pkgs) stdenv; }; in pkgs.mkShell { buildInputs = with pkgs.chickenPackages_5; [ chicken egg2nix ] ++ builtins.attrValues eggs; } ;; example.egg ((synopsis "An egg2nix example") (author "Moritz Heidkamp") (components) (dependencies matchable clojurian (comparse "3"))) ;; eggs.nix is generated from example.egg via egg2nix. ;; To bootstrap using the above shell.nix: ;; ;; echo '{ ... }: { }' > eggs.nix ;; nix-shell --run 'egg2nix example.egg > eggs.nix' ;; ;; Then load via nix-shell and try ;; ;; csi -R comparse