gerbilPackages-unstable.gerbil-utils: 2020-05-17 -> 2020-08-02

Better version support for Gerbil packages.
Use passthru for meta-information used by other packages.
This commit is contained in:
Francois-Rene Rideau 2020-06-03 16:04:51 -04:00
parent 0d99266e5e
commit cc894c6d91
2 changed files with 17 additions and 11 deletions

View File

@ -13,21 +13,26 @@ rec {
# Use this function to create a Gerbil library. See gerbil-utils as an example.
gerbilPackage = {
pname, version, src, meta, package,
git-version ? "", version-path ? "config/version.ss",
pname, version, src, meta, gerbil-package,
git-version ? "", version-path ? "",
gerbil ? pkgs.gerbil-unstable,
gambit-params ? pkgs.gambit-support.stable-params,
gerbilInputs ? [],
buildInputs ? [],
softwareName ? "" } :
softwareName ? ""} :
let buildInputs_ = buildInputs; in
gccStdenv.mkDerivation rec {
inherit src meta pname version;
passthru = { inherit gerbil-package version-path ;};
buildInputs = [ gerbil ] ++ gerbilInputs ++ buildInputs_;
postPatch = ''
set -e ;
if [ -n "${version-path}" ] ; then
echo '(import :clan/utils/version)\n(register-software "${softwareName}" "${git-version}")\n' > "${version-path}"
if [ -n "${version-path}.ss" ] ; then
echo -e '(import :clan/versioning${builtins.concatStringsSep ""
(map (x : if x.passthru.version-path != ""
then " :${x.passthru.gerbil-package}/${x.passthru.version-path}" else "")
gerbilInputs)
})\n(register-software "${softwareName}" "v${git-version}")\n' > "${passthru.version-path}.ss"
fi
patchShebangs . ;
'';

View File

@ -2,17 +2,18 @@
gerbil-support.gerbilPackage {
pname = "gerbil-utils";
version = "unstable-2020-05-17";
git-version = "33ef720";
package = "clan";
version = "unstable-2020-08-02";
git-version = "0.2-21-g7e7d053";
gerbil-package = "clan";
gerbil = gerbil-unstable;
gambit-params = gambit-support.unstable-params;
version-path = "";
version-path = "version";
softwareName = "Gerbil-utils";
src = fetchFromGitHub {
owner = "fare";
repo = "gerbil-utils";
rev = "33ef720799ba98dc9eec773c662f070af4bac016";
sha256 = "0dsb97magbxzjqqfzwq4qwf7i80llv0s1dsy9nkzkvkq8drxlmqf";
rev = "7e7d053ec5e78cc58d38cb03baf554d83b31b0c6";
sha256 = "078vqdcddfavqq0d9pw430iz1562cgx1ck3fw6dpwxjkyc6m4bms";
};
meta = {
description = "Gerbil Clan: Community curated Collection of Common Utilities";