2023-04-12 12:48:02 +00:00
|
|
|
{ lib, newScope, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
callPackage = newScope self;
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
self = with lib; {
|
|
|
|
inherit callPackage;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
fetchegg = { pname, version, sha256, ... }:
|
|
|
|
fetchurl {
|
|
|
|
inherit sha256;
|
|
|
|
url =
|
|
|
|
"https://code.call-cc.org/egg-tarballs/5/${pname}/${pname}-${version}.tar.gz";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
eggDerivation = callPackage ./eggDerivation.nix { };
|
|
|
|
|
|
|
|
chicken = callPackage ./chicken.nix {
|
|
|
|
bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
chickenEggs = recurseIntoAttrs (mapAttrs (pname:
|
|
|
|
eggData@{ version, synopsis, dependencies, license, ... }:
|
|
|
|
self.eggDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
src = self.fetchegg (eggData // { inherit pname; });
|
|
|
|
buildInputs = map (x: self.chickenEggs.${x}) dependencies;
|
|
|
|
meta.homepage =
|
|
|
|
"https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=tree;f=${pname}/${version}";
|
|
|
|
meta.description = synopsis;
|
|
|
|
meta.license = (licenses // {
|
|
|
|
"bsd-2-clause" = licenses.bsd2;
|
|
|
|
"bsd-3-clause" = licenses.bsd3;
|
|
|
|
"public-domain" = licenses.publicDomain;
|
|
|
|
}).${license} or license;
|
|
|
|
}) (importTOML ./deps.toml));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
egg2nix = callPackage ./egg2nix.nix { };
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
in lib.recurseIntoAttrs self
|