generate-purs-packages.nix 588 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/env nix-shell
#!nix-shell ./generate-purs-packages.nix --run 'exit'
{ pkgs ? import ./pinned.nix { } }:
let
  psc-package-nix = import ./psc-package-nix.nix { inherit pkgs; };
  purs-project = import ./purs-project.nix { inherit pkgs; };
  generatePursPackages = import "${psc-package-nix}/nix/generate-purs-packages.nix" {
    inherit pkgs;
    inherit (purs-project) packagesJson inputNames;
  };
in
pkgs.mkShell {
  buildInputs = [ generatePursPackages ];

  shellHook = ''
    generate-purs-packages > ./nix/purs-packages.nix
    echo "generated purs-packages.nix"
  '';
}