reddit-pub/flake.nix

62 lines
1.4 KiB
Nix
Raw Normal View History

2021-11-24 19:26:58 +02:00
{
description = "A very basic flake";
inputs = {
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2022-04-20 20:27:30 +03:00
outputs = { self, nixpkgs, flake-utils }:
2021-11-24 19:26:58 +02:00
{
overlay = final: prev: {
haskellPackages = prev.haskellPackages.override ( old: {
overrides = final.lib.composeExtensions ( old.overrides or (_: _: {})) (f: p: {
reddit-pub = f.callPackage ./. {};
});
} );
};
}
//
flake-utils.lib.eachSystem ["x86_64-linux" "x86_64-darwin"] ( system:
let
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
hp = pkgs.haskellPackages;
in
rec {
2022-02-10 18:07:49 +02:00
packages.reddit-pub = pkgs.haskell.lib.justStaticExecutables hp.reddit-pub;
packages.reddit-pub-dhall = pkgs.dhallPackages.callPackage ./dhall.nix {};
2021-11-24 19:26:58 +02:00
defaultPackage = packages.reddit-pub;
2022-02-10 18:07:49 +02:00
2021-11-24 19:26:58 +02:00
devShell =
hp.shellFor {
packages = h: [h.reddit-pub];
withHoogle = true;
buildInputs = with pkgs; [
dhall-lsp-server
entr
cabal-install
hp.hlint
stylish-haskell
ghcid
rrdtool
jq
sqlite-interactive
sqlite-interactive
hp.graphmod
2022-02-10 18:07:49 +02:00
hp.dhall-nixpkgs
2022-04-20 20:27:30 +03:00
hp.haskell-language-server
2021-11-24 19:26:58 +02:00
];
};
}
);
}