diff options
author | Fabian Kirchner <kirchner@posteo.de> | 2023-10-02 14:41:18 +0200 |
---|---|---|
committer | Fabian Kirchner <kirchner@posteo.de> | 2023-10-02 14:41:28 +0200 |
commit | e4a6ee2dbd9dfdd76bb77b647e13487fa2299d48 (patch) | |
tree | c5538db457cce1fe7d68ca8e472b700152917a27 /default.nix | |
parent | 24700382f2e1f9b1dac1de3e8170294cf0c818d4 (diff) |
add minimal haskell boilerplate
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/default.nix b/default.nix index 5359062..08799f6 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,25 @@ -{ pkgs ? import <nixpkgs> { - overlays = [ (import ./pkgs) ]; - } -}: -pkgs.callPackage ./anissue.nix { } +{ pkgs ? import <nixpkgs> { } }: + +let + + haskellPackages = pkgs.haskellPackages.override { + overrides = self: super: { + anissue = super.callCabal2nix "anissue" ./. {}; + }; + }; + +in + +rec { + inherit (haskellPackages) anissue; + shell = haskellPackages.shellFor { + packages = _: [ anissue ]; + buildInputs = [ + haskellPackages.cabal-install + haskellPackages.ormolu + ]; + shellHook = '' + HISTFILE=${pkgs.lib.escapeShellArg ./.}/.history; export HISTFILE + ''; + }; +} |