-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
51 lines (46 loc) · 1.49 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
{
description = "Scarf Gateway Nix Flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/171068ed83c5d45e376e5155525f8c07fe2354b4";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [self.overlay];
});
in {
overlay = final: prev: {};
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
{
# Etag changes during test, and giving false negative result. So not running test nix.
gateway = pkgs.haskell.lib.dontCheck (pkgs.haskellPackages.callCabal2nix "gateway" ./. {});
generate-changelog = pkgs.github-changelog-generator;
default = self.packages.${system}.gateway;
}
);
devShells = forAllSystems(system:
let
pkgs = nixpkgsFor.${system};
libs = with pkgs; [
pcre
zlib
openssl
];
in {
default = pkgs.mkShell {
packages = [];
buildInputs = with pkgs; [
cabal-install
haskell.compiler.ghc94
ghcid
] ++ libs;
shellHook = "export PS1='[$PWD]\n❄ '";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
};
});
};
}