• Justin Woo's avatar
    use psc-package-nix for project nix building · 9d2f747c
    Justin Woo authored
    * uses scripts in ./nix/ to generate packages.json and purs-packages.nix
    * build-purs now builds with dependencies in nix store
    * PURS_IDE_SOURCES set in nix shell, so those are directly usable from latest versions of purescript-langauge-server and psc-ide-emacs
    * regular psc-package usage is still supported
    9d2f747c
purs-project.nix 542 Bytes
#!/usr/bin/env nix-shell
{ pkgs ? import ./pinned.nix { } }:
let
  packagesJson = ../.psc-package/local/.set/packages.json;
  inputNames = (pkgs.lib.importJSON ../psc-package.json).depends;
  pursPackages = import ./purs-packages.nix { inherit pkgs; };
  getUnquotedSourceGlob = x: ''${x.src}/src/**/*.purs'';
  unquotedSourceGlobs = map getUnquotedSourceGlob (builtins.attrValues pursPackages);
  quote = x: ''"${x}"'';
  sourceGlobs = map quote unquotedSourceGlobs;
in
{
  inherit packagesJson inputNames sourceGlobs unquotedSourceGlobs;
}