2020-11-19 00:13:47 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, crystal_0_34
|
|
|
|
, crystal_0_35
|
|
|
|
}:
|
|
|
|
let
|
2020-12-29 15:07:52 +00:00
|
|
|
generic =
|
|
|
|
{ version, sha256, crystal }:
|
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
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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-11-19 00:13:47 +00:00
|
|
|
shards_0_11 = generic {
|
|
|
|
version = "0.11.1";
|
|
|
|
sha256 = "05qnhc23xbmicdl4fwyxfpcvd8jq4inzh6v7jsjjw4n76vzb1f71";
|
|
|
|
crystal = crystal_0_34;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
shards_0_12 = generic {
|
|
|
|
version = "0.12.0";
|
|
|
|
sha256 = "0dginczw1gc5qlb9k4b6ldxzqz8n97jrrnjvj3mm9wcdbc9j6h3c";
|
|
|
|
crystal = crystal_0_35;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
shards = shards_0_12;
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|