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

14
flake.lock generated
View File

@@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1648632716,
"narHash": "sha256-kCmnDeiaMsdhfnNKjxdOzwRh2H6eQb8yWAL+nNabC/Y=",
"lastModified": 1666393929,
"narHash": "sha256-Tet6WIaK0NaeNmr+0ayIkHEauuKde+Tv3X+giSQB6wE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "710fed5a2483f945b14f4a58af2cd3676b42d8c8",
"rev": "7a0b1f3b9549507ba45339178221e6494f5ab6d7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
@@ -24,11 +24,11 @@
},
"utils": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {

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 = {