generate-packages-json.nix 632 Bytes
Newer Older
1 2 3 4 5 6 7 8
#!/usr/bin/env nix-shell
#!nix-shell ./generate-packages-json.nix --run 'exit'
{ pkgs ? import ./pinned.nix { } }:
let
  easy-dhall = import (
    pkgs.fetchFromGitHub {
      owner = "justinwoo";
      repo = "easy-dhall-nix";
9
      rev = "90957969850a44481c6e150350c56e8b53b29e1e";
10 11 12 13 14 15 16 17 18 19 20 21 22 23
      sha256 = "12v4ql1nm1famz8r80k1xkkdgj7285vy2vn16iili0qwvz3i98ah";
    }
  ) {
    inherit pkgs;
  };
in
pkgs.mkShell {
  buildInputs = [ easy-dhall.dhall-simple easy-dhall.dhall-json-simple ];

  shellHook = ''
    dhall-to-json --file packages.dhall --output ./.psc-package/local/.set/packages.json
    echo "generated packages.json"
  '';
}