diff options
Diffstat (limited to 'pkgs/update-lock')
-rwxr-xr-x | pkgs/update-lock | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/update-lock b/pkgs/update-lock new file mode 100755 index 0000000..8690241 --- /dev/null +++ b/pkgs/update-lock @@ -0,0 +1,9 @@ +#!/usr/bin/ruby +require "json" + +dir = File.dirname $0 +lock = JSON.parse(File.read(File.expand_path "#{dir}/../flake.lock")) +lock.merge!({"nodes" => lock["nodes"] + .filter {|k| ["nixpkgs", "root"].include? k } + .merge({"root" => {"inputs" => {"nixpkgs" => "nixpkgs"}}})}) +File.write "#{dir}/flake.lock", JSON.pretty_generate(lock)+"\n" |