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