Mint: 0.0.4 -> 0.1.0 (#43103)
This commit is contained in:
		
							parent
							
								
									f22cbe5c35
								
							
						
					
					
						commit
						08e79cad4f
					
				@ -5,16 +5,23 @@ class PrefetchJSON
 | 
			
		||||
  JSON.mapping(sha256: String)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
class ShardLock
 | 
			
		||||
  YAML.mapping(
 | 
			
		||||
    version: String,
 | 
			
		||||
    shards: Hash(String, Hash(String, String))
 | 
			
		||||
  )
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
File.open "shards.nix", "w+" do |file|
 | 
			
		||||
  file.puts %({)
 | 
			
		||||
  yaml = YAML.parse(File.read("shard.lock"))
 | 
			
		||||
  yaml["shards"].as_h.each do |key, value|
 | 
			
		||||
    owner, repo = value["github"].as_s.split("/")
 | 
			
		||||
  yaml = ShardLock.from_yaml(File.read("shard.lock"))
 | 
			
		||||
  yaml.shards.each do |key, value|
 | 
			
		||||
    owner, repo = value["github"].split("/")
 | 
			
		||||
    url = "https://github.com/#{value["github"]}"
 | 
			
		||||
    rev = if value["version"]?
 | 
			
		||||
            "v#{value["version"]}"
 | 
			
		||||
          else
 | 
			
		||||
            value["commit"].as_s
 | 
			
		||||
            value["commit"]
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
    sha256 = ""
 | 
			
		||||
 | 
			
		||||
@ -28,21 +28,19 @@ let
 | 
			
		||||
  };
 | 
			
		||||
in
 | 
			
		||||
stdenv.mkDerivation rec {
 | 
			
		||||
  version = "0.0.4";
 | 
			
		||||
  version = "0.1.0";
 | 
			
		||||
  name = "mint-${version}";
 | 
			
		||||
  src = fetchFromGitHub {
 | 
			
		||||
    owner = "mint-lang";
 | 
			
		||||
    repo = "mint";
 | 
			
		||||
    rev = "0.0.4";
 | 
			
		||||
    sha256 = "04zq6qqh2dbqgnywsy6qfpimsr2zg19gs3xls1bphbaygnb2yi3l";
 | 
			
		||||
    rev = "0.1.0";
 | 
			
		||||
    sha256 = "0n9lnkm2k8lv3wcw0jc7bcpgvcjyp3a8cywn0w7ipb22q8cl0n96";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  buildInputs = [ crystal zlib openssl duktape ];
 | 
			
		||||
 | 
			
		||||
  buildPhase = ''
 | 
			
		||||
    mkdir -p $out/bin
 | 
			
		||||
 | 
			
		||||
    mkdir tmp
 | 
			
		||||
    mkdir -p $out/bin tmp
 | 
			
		||||
    cd tmp
 | 
			
		||||
    ln -s ${crystalLib} lib
 | 
			
		||||
    cp -r $src/* .
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user