mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-05 09:58:50 +03:00
29 lines
959 B
Ruby
Executable File
29 lines
959 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
# Take those from https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs
|
|
$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"
|
|
}
|
|
|
|
for pkg, ver in $elm_packages
|
|
system "cabal2nix https://github.com/elm-lang/#{pkg} --revision refs/tags/#{ver} --jailbreak > packages/#{pkg}.nix"
|
|
end
|
|
|
|
File.open("packages/release.nix", 'w') do |file|
|
|
file.puts "# This file is auto-generated by ./update-elm.rb."
|
|
file.puts "# Please, do not modify it by hand!"
|
|
file.puts "{ callPackage }:"
|
|
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
|