lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.09-beta 26 lines 626 B view raw
1#!/usr/bin/env ruby 2 3require 'json' 4 5system("elm-package install -y") 6depsSrc = JSON.parse(File.read("elm-stuff/exact-dependencies.json")) 7deps = Hash[ depsSrc.map { |pkg, ver| 8 url = "https://github.com/#{pkg}/archive/#{ver}.tar.gz" 9 sha256 = `nix-prefetch-url #{url}` 10 11 [ pkg, { version: ver, 12 sha256: sha256.strip 13 } 14 ] 15} ] 16 17File.open("package.nix", 'w') do |file| 18 file.puts "{" 19 for pkg, info in deps 20 file.puts " \"#{pkg}\" = {" 21 file.puts " version = \"#{info[:version]}\";" 22 file.puts " sha256 = \"#{info[:sha256]}\";" 23 file.puts " };" 24 end 25 file.puts "}" 26end