From fb5636483871fbafe9b286b377c339c8ddf8b4f8 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 7 Feb 2019 18:42:36 +0100 Subject: initial commit --- shell.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 shell.nix (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..4d7e83a --- /dev/null +++ b/shell.nix @@ -0,0 +1,35 @@ +{ compiler ? "default" }: let + + stockholm = import ; + inherit (stockholm.systems.${lib.krops.getHostName}) config pkgs; + inherit (stockholm) lib; + + haskellPackages = + if compiler == "default" + then pkgs.haskellPackages + else pkgs.haskell.packages.${compiler}; + + drv = haskellPackages.callPackage (import ./.) {}; + +in + + lib.overrideDerivation drv.env (oldAttrs: { + + buildInputs = [ + pkgs.flameshot + ]; + + shellHook = '' + pkg_name=${lib.escapeShellArg (builtins.baseNameOf (toString ./.))} + + WORKDIR=${lib.escapeShellArg (toString ./.)} + CACHEDIR=$HOME/tmp/$pkg_name + HISTFILE=$CACHEDIR/bash_history + + mkdir -p "$CACHEDIR" + + export SHELL=/run/current-system/sw/bin/bash + + cd "$WORKDIR" + ''; + }) -- cgit v1.2.3