refactor devShell in the flake

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-22 07:34:00 +05:30
parent 31132065c0
commit 33bf0a9f6f
2 changed files with 16 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
description = "My personal website";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs.url = github:nixos/nixpkgs/release-22.05;
utils.url = github:numtide/flake-utils;
};
@@ -25,17 +25,22 @@
phases = "unpackPhase buildPhase";
nativeBuildInputs = [ site ];
buildPhase = (pkgs.lib.concatStringsSep "\n" vars ) + ''
log=$(site build)
mkdir -p $out
cp -r \_site/* $out
'';
};
in
rec {
devShell = with pkgs; mkShell {
devShell = with pkgs.haskellPackages; shellFor {
packages = _: [ site ];
withHoogle = true;
buildInputs = [
cabal-install
haskell-language-server
(haskellPackages.ghcWithPackages (h: with h; [ hakyll pandoc ]))
ghcid
];
nativeBuildInputs = with pkgs; [
zlib
];
};
packages = {