52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
|
{
|
||
|
description = "rauhala.info";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
easy-hls = {
|
||
|
url = "github:jkachmar/easy-hls-nix";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils, easy-hls }:
|
||
|
{
|
||
|
overlay = final: prev: {
|
||
|
build-rauhala-info = final.haskellPackages.build-rauhala-info;
|
||
|
rauhala-info = final.callPackage ./rauhala.info { site = final.build-rauhala-info; };
|
||
|
haskellPackages = prev.haskellPackages.override ( old: {
|
||
|
overrides = final.lib.composeExtensions ( old.overrides or (_: _: {})) (f: p: {
|
||
|
build-rauhala-info = f.callPackage ./site {};
|
||
|
});
|
||
|
} );
|
||
|
};
|
||
|
}
|
||
|
//
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
|
||
|
hp = pkgs.haskellPackages;
|
||
|
hls = easy-hls.defaultPackage.${system};
|
||
|
in
|
||
|
rec {
|
||
|
packages = { inherit (pkgs) build-rauhala-info rauhala-info; };
|
||
|
applications.build-rauhala-info = flake-utils.lib.mkApp {
|
||
|
drv = packages.build-rauhala-info;
|
||
|
exePath = "/bin/site";
|
||
|
};
|
||
|
defaultPackage = packages.rauhala-info;
|
||
|
defaultApp = applications.build-rauhala-info;
|
||
|
devShell = hp.shellFor {
|
||
|
packages = h: [h.build-rauhala-info];
|
||
|
buildInputs = with pkgs; [
|
||
|
ghcid
|
||
|
cabal-install
|
||
|
stylish-haskell
|
||
|
entr
|
||
|
hls
|
||
|
];
|
||
|
};
|
||
|
});
|
||
|
}
|