2015-08-13 12:50:59 +01:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
|
|
|
# Take those from https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs
|
2016-05-18 11:30:38 +01:00
|
|
|
$elm_version = "0.17"
|
|
|
|
$elm_packages = { "elm-compiler" => "0.17",
|
|
|
|
"elm-package" => "0.17",
|
|
|
|
"elm-make" => "0.17",
|
|
|
|
"elm-reactor" => "0.17",
|
|
|
|
"elm-repl" => "0.17"
|
2015-08-13 12:50:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for pkg, ver in $elm_packages
|
|
|
|
system "cabal2nix https://github.com/elm-lang/#{pkg} --revision refs/tags/#{ver} --jailbreak > #{pkg}.nix"
|
|
|
|
end
|
|
|
|
|
|
|
|
File.open("release.nix", 'w') do |file|
|
2016-05-30 00:11:26 +01:00
|
|
|
file.puts "# This file is auto-generated by ./update-elm.rb."
|
|
|
|
file.puts "# Please, do not modify it by hand!"
|
2016-02-17 13:56:37 +00:00
|
|
|
file.puts "{ callPackage }:"
|
2015-08-13 12:50:59 +01:00
|
|
|
file.puts "{"
|
|
|
|
file.puts " version = \"#{$elm_version}\";"
|
|
|
|
file.puts " packages = {"
|
|
|
|
for pkg, ver in $elm_packages
|
|
|
|
file.puts " #{pkg} = callPackage ./#{pkg}.nix { };"
|
|
|
|
end
|
|
|
|
file.puts " };"
|
|
|
|
file.puts "}"
|
|
|
|
end
|