-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
28 lines (25 loc) · 818 Bytes
/
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
{
description = "JPL -- JSON Processing Language";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
project_name = "jpl-hs";
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
eachSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
hpkgs = pkgs.haskell.packages.ghc98;
});
in
rec {
packages = eachSystem ({hpkgs, ...}: {
default = hpkgs.callCabal2nix project_name ./. { };
});
devShells = eachSystem ({pkgs, hpkgs, system, ...}: {
default = pkgs.haskell.lib.addBuildTools packages.${system}.default
(with hpkgs; [ haskell-language-server cabal-install ]);
});
};
}