{ pkgs }: self: super: let default-derivation = { name, version-prefix, version, check-inputs, ... }: pkgs.stdenv.mkDerivation rec { inherit name version; checkInputs = map (p: pkgs."${p}") check-inputs; doCheck = true; src = fetchTarball { url = "https://git.euandreh.xyz/${name}/snapshot/${name}-${version-prefix}${version}.tar.gz"; }; makeFlags = [ # This shouldn't be necessary, but # the `stdenv.mkDerivation' environment doesn't provide a c99 variable "CC=cc" ]; meta = with pkgs.lib; { description = readFile "${src}/description"; longDescription = readFile "${src}/long-description"; homepage = "https://${name}.euandreh.xyz"; changelog = "https://${name}.euandreh.xyz/CHANGELOG.html"; downloadPage = "https://${name}.euandreh.xyz/#releases"; license = licenses.agpl3; platforms = platforms.unix; }; }; in { xyz-euandreh = pkgs.lib.fold ({ name, ... }@project: acc: acc // { "${name}" = default-derivation project; }) { } (builtins.fromJSON (builtins.readFile ./packages.json)).packages; }