2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-11-19 00:13:47 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-17 02:12:59 +00:00
|
|
|
, crystal
|
2020-11-19 00:13:47 +00:00
|
|
|
}:
|
2021-10-17 02:12:59 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
let
|
2020-12-29 15:07:52 +00:00
|
|
|
generic =
|
2021-10-17 02:12:59 +00:00
|
|
|
{ version, sha256 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
crystal.buildCrystalPackage {
|
|
|
|
pname = "shards";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crystal-lang";
|
2020-12-29 15:07:52 +00:00
|
|
|
repo = "shards";
|
|
|
|
rev = "v${version}";
|
2020-11-19 00:13:47 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
# we cannot use `make` or `shards` here as it would introduce a cyclical dependency
|
2020-11-19 00:13:47 +00:00
|
|
|
format = "crystal";
|
|
|
|
shardsFile = ./shards.nix;
|
|
|
|
crystalBinaries.shards.src = "./src/shards.cr";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
# tries to execute git which fails spectacularly
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-19 00:13:47 +00:00
|
|
|
description = "Dependency manager for the Crystal language";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
inherit (crystal.meta) homepage platforms;
|
|
|
|
};
|
2020-12-29 15:07:52 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
in
|
|
|
|
rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
shards_0_15 = generic {
|
|
|
|
version = "0.15.0";
|
2021-03-23 19:22:30 +00:00
|
|
|
sha256 = "sha256-/C6whh5RbTBkFWqpn0GqyVe0opbrklm8xPv5MIG99VU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-11-19 00:13:47 +00:00
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
shards_0_16 = generic {
|
|
|
|
version = "0.16.0";
|
|
|
|
sha256 = "sha256-go8sL4djIDGNwb7FsCcATONnMYahHY8qJUDyUiPLRUY=";
|
|
|
|
};
|
|
|
|
|
|
|
|
shards = shards_0_16;
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|