2022-10-28 21:29:26 +03:00
|
|
|
{
|
|
|
|
inputs =
|
|
|
|
{
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2022-10-29 17:40:12 +03:00
|
|
|
npmlock2nix.url = "github:nix-community/npmlock2nix";
|
|
|
|
npmlock2nix.flake = false;
|
2022-09-14 01:49:40 +03:00
|
|
|
ps-tools.follows = "purs-nix/ps-tools";
|
|
|
|
purs-nix.url = "github:purs-nix/purs-nix/ps-0.15";
|
2022-10-28 22:16:02 +03:00
|
|
|
utils.url = "github:ursi/flake-utils";
|
2022-09-14 01:49:40 +03:00
|
|
|
};
|
|
|
|
|
2022-10-28 22:16:02 +03:00
|
|
|
outputs = { utils, ... }@inputs:
|
2022-10-28 22:25:49 +03:00
|
|
|
utils.apply-systems
|
|
|
|
{
|
|
|
|
inherit inputs;
|
|
|
|
# Limited by ps-tools
|
|
|
|
systems = [ "x86_64-linux" "x86_64-darwin" ];
|
|
|
|
}
|
|
|
|
({ pkgs, system, ... }:
|
|
|
|
let
|
2022-10-29 17:40:12 +03:00
|
|
|
npm = import inputs.npmlock2nix { inherit pkgs; };
|
2022-10-28 22:25:49 +03:00
|
|
|
ps-tools = inputs.ps-tools.legacyPackages.${system};
|
|
|
|
purs-nix = inputs.purs-nix { inherit system; };
|
|
|
|
ps =
|
|
|
|
purs-nix.purs
|
|
|
|
{
|
2022-10-29 03:13:54 +03:00
|
|
|
dir = ./.;
|
|
|
|
|
2022-10-28 22:25:49 +03:00
|
|
|
dependencies =
|
|
|
|
with purs-nix.ps-pkgs;
|
|
|
|
[
|
|
|
|
prelude
|
2022-10-30 01:51:50 +03:00
|
|
|
debug
|
2022-10-29 03:13:54 +03:00
|
|
|
aff
|
2022-11-02 05:01:43 +03:00
|
|
|
affjax-node
|
2022-11-02 03:16:20 +03:00
|
|
|
argonaut-codecs
|
|
|
|
argonaut-generic
|
2022-10-29 03:13:54 +03:00
|
|
|
effect
|
2022-11-02 05:01:43 +03:00
|
|
|
httpure
|
2022-10-30 04:11:19 +03:00
|
|
|
node-buffer
|
2022-10-28 22:25:49 +03:00
|
|
|
node-process
|
2022-10-30 04:11:19 +03:00
|
|
|
node-streams-aff
|
2022-11-02 05:01:43 +03:00
|
|
|
test-unit
|
|
|
|
parsing
|
2022-10-28 22:25:49 +03:00
|
|
|
];
|
2022-09-14 01:49:40 +03:00
|
|
|
|
2022-10-29 17:40:12 +03:00
|
|
|
foreign."Affjax.Node".node_modules = npm.node_modules { src = ./.; } + /node_modules;
|
2022-10-29 03:13:54 +03:00
|
|
|
|
2022-10-28 22:25:49 +03:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
apps.default = {
|
|
|
|
type = "app";
|
|
|
|
program = "${packages.default}/bin/purs-eval";
|
|
|
|
};
|
2022-09-14 01:49:40 +03:00
|
|
|
|
2022-10-28 22:25:49 +03:00
|
|
|
packages = with ps.modules.Main; {
|
|
|
|
default = app { name = "purs-eval"; };
|
|
|
|
bundle = bundle { };
|
2022-10-30 04:14:35 +03:00
|
|
|
output = output { };
|
2022-10-28 22:25:49 +03:00
|
|
|
};
|
2022-09-14 01:49:40 +03:00
|
|
|
|
2022-10-28 23:27:31 +03:00
|
|
|
|
|
|
|
checks.test = ps.test.check { };
|
|
|
|
|
2022-10-28 22:25:49 +03:00
|
|
|
devShells.default = pkgs.mkShell {
|
2022-10-28 23:27:31 +03:00
|
|
|
packages = with pkgs; [
|
2022-10-28 22:25:49 +03:00
|
|
|
nodejs
|
|
|
|
(ps.command { })
|
|
|
|
ps-tools.for-0_15.purescript-language-server
|
|
|
|
purs-nix.esbuild
|
|
|
|
purs-nix.purescript
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2022-09-14 01:49:40 +03:00
|
|
|
}
|