-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
59 lines (52 loc) · 1.58 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = "difficult-purescript-nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = { self, nixpkgs, flake-parts, treefmt-nix, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
flake-parts.flakeModules.easyOverlay
treefmt-nix.flakeModule
];
perSystem = { config, pkgs, lib, system, ... }:
rec {
legacyPackages = {
purescriptPackages = import ./pkgs { inherit pkgs lib; };
};
packages = builtins.removeAttrs
self.legacyPackages.${system}.purescriptPackages
[ "lib" ]
;
checks = {
statix = pkgs.runCommand "statix"
{
nativeBuildInputs = [ pkgs.statix ];
}
''
cd ${self}
statix check
touch $out
'';
packages = pkgs.runCommand "all-packages"
{
ps = builtins.attrValues self.packages.${system};
}
''
echo $ps
touch $out
'';
};
treefmt.config = {
projectRootFile = "flake.nix";
programs.nixpkgs-fmt.enable = true;
};
overlayAttrs = {
inherit (self.legacyPackages.${system}) purescriptPackages;
};
};
};
}