shards: refactor and 0.11.0 -> {0.11.1, 0.12.0}

This commit is contained in:
Fabián Heredia Montiel 2020-11-16 18:14:12 -06:00 committed by Peter Hoeg
parent bc029589d4
commit 085da94ace
2 changed files with 54 additions and 25 deletions

View file

@ -1,30 +1,56 @@
{ stdenv, fetchFromGitHub, crystal }:
{ stdenv
, fetchFromGitHub
, crystal_0_34
, crystal_0_35
}:
crystal.buildCrystalPackage rec {
pname = "shards";
version = "0.10.0";
let
generic = (
{ version
, sha256
, crystal
}:
src = fetchFromGitHub {
owner = "crystal-lang";
repo = "shards";
rev = "v${version}";
sha256 = "1bjy3hcdqq8769bx73f3pwn26rnkj23dngyfbw4iv32bw23x1d49";
crystal.buildCrystalPackage {
pname = "shards";
inherit version;
src = fetchFromGitHub {
owner = "crystal-lang";
repo = "shards";
rev = "v${version}";
inherit sha256;
};
# we cannot use `make` here as it would introduce a dependency on itself
format = "crystal";
shardsFile = ./shards.nix;
crystalBinaries.shards.src = "./src/shards.cr";
# tries to execute git which fails spectacularly
doCheck = false;
meta = with stdenv.lib; {
description = "Dependency manager for the Crystal language";
license = licenses.asl20;
maintainers = with maintainers; [ peterhoeg ];
inherit (crystal.meta) homepage platforms;
};
}
);
in rec {
shards_0_11 = generic {
version = "0.11.1";
sha256 = "05qnhc23xbmicdl4fwyxfpcvd8jq4inzh6v7jsjjw4n76vzb1f71";
crystal = crystal_0_34;
};
# we cannot use `make` here as it would introduce a dependency on itself
format = "crystal";
shardsFile = ./shards.nix;
crystalBinaries.shards.src = "./src/shards.cr";
# tries to execute git which fails spectacularly
doCheck = false;
meta = with stdenv.lib; {
description = "Dependency manager for the Crystal language";
license = licenses.asl20;
maintainers = with maintainers; [ peterhoeg ];
inherit (crystal.meta) homepage platforms;
shards_0_12 = generic {
version = "0.12.0";
sha256 = "0dginczw1gc5qlb9k4b6ldxzqz8n97jrrnjvj3mm9wcdbc9j6h3c";
crystal = crystal_0_35;
};
shards = shards_0_12;
}

View file

@ -11825,7 +11825,10 @@ julia_15 = callPackage ../development/compilers/julia/1.5.nix {
shallot = callPackage ../tools/misc/shallot { };
shards = callPackage ../development/tools/build-managers/shards { };
inherit (callPackage ../development/tools/build-managers/shards { })
shards_0_11
shards_0_12
shards;
shellcheck = callPackage ../development/tools/shellcheck {};