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