Skip to content

Instantly share code, notes, and snippets.

@srhb
Created October 6, 2019 20:04
Show Gist options
  • Save srhb/746a718eb090c4c077445180e14de189 to your computer and use it in GitHub Desktop.
Save srhb/746a718eb090c4c077445180e14de189 to your computer and use it in GitHub Desktop.
{ pkgs ? import <nixpkgs> {} }:
let
drv = pkgs.haskellPackages.callCabal2nix "test-proj" ./. {};
shell = pkgs.haskellPackages.shellFor {
name = "test-proj-shell";
packages = p: [
drv
];
buildInputs = with pkgs; [
haskellPackages.ghcid
cabal-install
];
};
in
if pkgs.lib.inNixShell then shell else drv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment