regenerate shell.nix
This commit is contained in:
parent
15739b2313
commit
6f452209dd
1 changed files with 32 additions and 35 deletions
59
shell.nix
59
shell.nix
|
@ -1,38 +1,35 @@
|
||||||
# shell.nix
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
||||||
|
|
||||||
let
|
let
|
||||||
project = import ./default.nix;
|
|
||||||
in
|
|
||||||
project.shellFor {
|
|
||||||
# ALL of these arguments are optional.
|
|
||||||
|
|
||||||
# List of packages from the project you want to work on in
|
inherit (nixpkgs) pkgs;
|
||||||
# the shell (default is all the projects local packages).
|
|
||||||
#packages = ps: with ps; [
|
|
||||||
# pkga
|
|
||||||
# pkgb
|
|
||||||
#];
|
|
||||||
|
|
||||||
# Builds a Hoogle documentation index of all dependencies,
|
f = { mkDerivation, base, directory, filepath, hakyll, HTTP, lib
|
||||||
# and provides a "hoogle" command to search the index.
|
, time
|
||||||
withHoogle = false;
|
}:
|
||||||
|
mkDerivation {
|
||||||
# Some common tools can be added with the `tools` argument
|
pname = "nek0-blog";
|
||||||
tools = {
|
version = "0.1.0.0";
|
||||||
cabal = "latest";
|
src = ./.;
|
||||||
hakyll = "latest";
|
isLibrary = false;
|
||||||
|
isExecutable = true;
|
||||||
|
executableHaskellDepends = [
|
||||||
|
base directory filepath hakyll HTTP time
|
||||||
|
];
|
||||||
|
homepage = "https://nek0.eu";
|
||||||
|
description = "My blog";
|
||||||
|
license = "unknown";
|
||||||
|
hydraPlatforms = lib.platforms.none;
|
||||||
};
|
};
|
||||||
# See overlays/tools.nix for more details
|
|
||||||
|
|
||||||
# Some you may need to get some other way.
|
haskellPackages = if compiler == "default"
|
||||||
buildInputs = [ (import <nixpkgs> {}).git ];
|
then pkgs.haskellPackages
|
||||||
|
else pkgs.haskell.packages.${compiler};
|
||||||
|
|
||||||
# Sellect cross compilers to include.
|
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
|
||||||
#crossPlatforms = ps: with ps; [
|
|
||||||
# ghcjs # Adds support for `js-unknown-ghcjs-cabal build` in the shell
|
|
||||||
# # mingwW64 # Adds support for `x86_64-W64-mingw32-cabal build` in the shell
|
|
||||||
#];
|
|
||||||
|
|
||||||
# Prevents cabal from choosing alternate plans, so that
|
drv = variant (haskellPackages.callPackage f {});
|
||||||
# *all* dependencies are provided by Nix.
|
|
||||||
exactDeps = true;
|
in
|
||||||
}
|
|
||||||
|
if pkgs.lib.inNixShell then drv.env else drv
|
||||||
|
|
Loading…
Reference in a new issue