;; egg2nix.nix { chickenPackages_5, fetchFromGitHub }: # 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 chickenPackages_5.egg2nix.overrideAttrs (_: { src = fetchFromGitHub { owner = "DerGuteMoritz"; repo = "egg2nix"; rev = "7a42985b2eff7d120be2cec65493ad52084b4e44"; sha256 = "1pzfmw6wlr0rlg167rdzr5w1x2pg4g5nszajwr1m6ra6k4pcksc1"; }; }) ;; example.egg ;; See paste above on how to convert this into eggs.nix ((synopsis "An egg2nix example with foreign dependency") (author "Moritz Heidkamp") (components) (dependencies breadline)) ;; eggs-with-foreign-deps.nix { pkgs }: let eggs = import ./eggs.nix { inherit pkgs; inherit (pkgs) stdenv; }; in eggs // { breadline = eggs.breadline.overrideAttrs (old: { buildInputs = old.buildInputs ++ [ pkgs.readline ]; }); } ;; shell.nix { pkgs ? import { } }: let egg2nix = pkgs.callPackage ./egg2nix.nix { }; eggs = import ./eggs-with-foreign-deps.nix { inherit pkgs; }; in pkgs.mkShell { buildInputs = with pkgs.chickenPackages_5; [ chicken egg2nix ] ++ builtins.attrValues eggs; }