2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-11-17 00:14:12 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-14 19:25:15 +00:00
|
|
|
, crystal
|
2020-11-17 00:14:12 +00:00
|
|
|
}:
|
2021-10-14 19:25:15 +00:00
|
|
|
|
2020-11-17 00:14:12 +00:00
|
|
|
let
|
2020-12-22 04:08:01 +00:00
|
|
|
generic =
|
2022-03-28 11:04:27 +00:00
|
|
|
{ version, hash }:
|
2016-12-21 08:23:01 +00:00
|
|
|
|
2020-11-17 00:14:12 +00:00
|
|
|
crystal.buildCrystalPackage {
|
|
|
|
pname = "shards";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crystal-lang";
|
2020-12-22 04:08:01 +00:00
|
|
|
repo = "shards";
|
|
|
|
rev = "v${version}";
|
2022-03-28 11:04:27 +00:00
|
|
|
inherit hash;
|
2020-11-17 00:14:12 +00:00
|
|
|
};
|
2016-12-21 08:23:01 +00:00
|
|
|
|
2020-12-22 04:08:01 +00:00
|
|
|
# we cannot use `make` or `shards` here as it would introduce a cyclical dependency
|
2020-11-17 00:14:12 +00:00
|
|
|
format = "crystal";
|
|
|
|
shardsFile = ./shards.nix;
|
|
|
|
crystalBinaries.shards.src = "./src/shards.cr";
|
2020-04-19 07:52:58 +00:00
|
|
|
|
2020-11-17 00:14:12 +00:00
|
|
|
# tries to execute git which fails spectacularly
|
|
|
|
doCheck = false;
|
2020-04-19 07:52:58 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2020-11-17 00:14:12 +00:00
|
|
|
description = "Dependency manager for the Crystal language";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
inherit (crystal.meta) homepage platforms;
|
|
|
|
};
|
2020-12-22 04:08:01 +00:00
|
|
|
};
|
2016-12-21 08:23:01 +00:00
|
|
|
|
2020-12-22 04:08:01 +00:00
|
|
|
in
|
|
|
|
rec {
|
2022-03-28 11:04:27 +00:00
|
|
|
shards_0_17 = generic {
|
2022-12-31 02:14:03 +00:00
|
|
|
version = "0.17.2";
|
|
|
|
hash = "sha256-2HpoMgyi8jnWYiBHscECYiaRu2g0mAH+dCY1t5m/l1s=";
|
2021-10-14 19:25:15 +00:00
|
|
|
};
|
|
|
|
|
2022-03-28 11:04:27 +00:00
|
|
|
shards = shards_0_17;
|
2016-12-21 08:23:01 +00:00
|
|
|
}
|