forked from voidlizard/hbs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
82 lines (64 loc) · 1.96 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description = "hbs2";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# haskell-flake-utils.url = "github:ivanovs-4/haskell-flake-utils";
haskell-flake-utils.url = "github:ivanovs-4/haskell-flake-utils/master";
hspup.url = "github:voidlizard/hspup";
hspup.inputs.nixpkgs.follows = "nixpkgs";
fixme.url = "github:voidlizard/fixme";
fixme.inputs.nixpkgs.follows = "nixpkgs";
suckless-conf.url = "github:voidlizard/suckless-conf";
suckless-conf.inputs.nixpkgs.follows = "nixpkgs";
saltine = {
url = "github:tel/saltine/3d3a54cf46f78b71b4b55653482fb6f4cee6b77d";
flake = false;
};
};
outputs = { self, nixpkgs, haskell-flake-utils, ... }@inputs:
haskell-flake-utils.lib.simpleCabalProject2flake {
inherit self nixpkgs;
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
name = "hbs2";
haskellFlakes = with inputs; [
suckless-conf
];
packageNames = [
"hbs2"
"hbs2-peer"
"hbs2-core"
"hbs2-storage-simple"
"hbs2-git"
];
packageDirs = {
"hbs2" = "./hbs2";
"hbs2-tests" = "./hbs2-tests";
"hbs2-core" = "./hbs2-core";
"hbs2-storage-simple" = "./hbs2-storage-simple";
"hbs2-peer" = "./hbs2-peer";
};
hpPreOverrides = {pkgs, ...}: final: prev: with pkgs; {
saltine = prev.callCabal2nix "saltine" inputs.saltine { inherit (pkgs) libsodium; };
};
packagePostOverrides = { pkgs }: with pkgs; with haskell.lib; [
disableExecutableProfiling
disableLibraryProfiling
dontBenchmark
dontCoverage
dontDistribute
dontHaddock
dontHyperlinkSource
doStrip
enableDeadCodeElimination
justStaticExecutables
dontCheck
];
shellExtBuildInputs = {pkgs}: with pkgs; [
haskellPackages.haskell-language-server
haskellPackages.cbor-tool
pkg-config
inputs.hspup.packages.${pkgs.system}.default
inputs.fixme.packages.${pkgs.system}.default
];
};
}