hledger-time/flake.nix

45 lines
1.1 KiB
Nix

{
description = "hledger-time";
inputs = {
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem ["x86_64-linux" "x86_64-darwin"] ( system:
let
pkgs = nixpkgs.legacyPackages.${system};
hp = pkgs.haskellPackages.override ( old: {
overrides = pkgs.lib.composeExtensions (old.overrides or (_: _: {})) (f: p: {
hledger-time = f.callPackage ./. {};
});
});
in
rec {
packages = { inherit (hp) hledger-time; };
defaultPackage = packages.hledger-time;
apps.hledger-time = {
type = "app";
program = "${hp.hledger-time}/bin/hledger-time";
};
devShell = hp.shellFor {
packages = h: [h.hledger-time];
withHoogle = false;
buildInputs = with pkgs; [
entr
cabal-install
hp.hlint
stylish-haskell
ghcid
haskell-language-server
hp.graphmod
];
};
}
);
}