Mint: 0.0.4 -> 0.1.0 (#43103)

This commit is contained in:
Michael Fellinger 2018-07-06 11:32:08 +02:00 committed by xeji
parent f22cbe5c35
commit 08e79cad4f
2 changed files with 15 additions and 10 deletions

View file

@ -5,16 +5,23 @@ class PrefetchJSON
JSON.mapping(sha256: String) JSON.mapping(sha256: String)
end end
class ShardLock
YAML.mapping(
version: String,
shards: Hash(String, Hash(String, String))
)
end
File.open "shards.nix", "w+" do |file| File.open "shards.nix", "w+" do |file|
file.puts %({) file.puts %({)
yaml = YAML.parse(File.read("shard.lock")) yaml = ShardLock.from_yaml(File.read("shard.lock"))
yaml["shards"].as_h.each do |key, value| yaml.shards.each do |key, value|
owner, repo = value["github"].as_s.split("/") owner, repo = value["github"].split("/")
url = "https://github.com/#{value["github"]}" url = "https://github.com/#{value["github"]}"
rev = if value["version"]? rev = if value["version"]?
"v#{value["version"]}" "v#{value["version"]}"
else else
value["commit"].as_s value["commit"]
end end
sha256 = "" sha256 = ""

View file

@ -28,21 +28,19 @@ let
}; };
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.0.4"; version = "0.1.0";
name = "mint-${version}"; name = "mint-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mint-lang"; owner = "mint-lang";
repo = "mint"; repo = "mint";
rev = "0.0.4"; rev = "0.1.0";
sha256 = "04zq6qqh2dbqgnywsy6qfpimsr2zg19gs3xls1bphbaygnb2yi3l"; sha256 = "0n9lnkm2k8lv3wcw0jc7bcpgvcjyp3a8cywn0w7ipb22q8cl0n96";
}; };
buildInputs = [ crystal zlib openssl duktape ]; buildInputs = [ crystal zlib openssl duktape ];
buildPhase = '' buildPhase = ''
mkdir -p $out/bin mkdir -p $out/bin tmp
mkdir tmp
cd tmp cd tmp
ln -s ${crystalLib} lib ln -s ${crystalLib} lib
cp -r $src/* . cp -r $src/* .