-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
44 lines (39 loc) · 1.27 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
{
description = "Sync Taskwarrior tasks with Habitica";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
haskellPackages = pkgs.haskell.packages.ghc902;
taskwarrior-habitica-bridge = haskellPackages.callCabal2nix "taskwarrior-habitica-bridge" self {};
projectGhc = haskellPackages.ghcWithHoogle (_:
taskwarrior-habitica-bridge.getBuildInputs.haskellBuildInputs
);
in
{
packages = { inherit taskwarrior-habitica-bridge; };
defaultPackage = taskwarrior-habitica-bridge;
apps.taskwarrior-habitica-bridge = {
type = "app";
program = "${taskwarrior-habitica-bridge}/bin/task2habitica";
};
defaultApp = self.apps.${system}.taskwarrior-habitica-bridge;
devShell = pkgs.mkShell {
buildInputs = with haskellPackages; [
# Haskell tooling
projectGhc
cabal2nix
cabal-install
haskell-language-server
];
};
}
);
}