diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-06-25 12:08:47 +0200 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-06-25 12:08:47 +0200 |
commit | ae0f8943268c42b1985f3b8a0c5bcf2102ed3a87 (patch) | |
tree | eb93f8e5837eca7375b76c71748d5809a435d8c2 /flake.nix | |
download | zk-visual-ae0f8943268c42b1985f3b8a0c5bcf2102ed3a87.tar.gz zk-visual-ae0f8943268c42b1985f3b8a0c5bcf2102ed3a87.zip |
Add initial files
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..32b480d --- /dev/null +++ b/flake.nix @@ -0,0 +1,46 @@ +{ + description = "org-zk's description"; + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + }; + outputs = inputs@{ self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system: + let + overlays = [ ]; + pkgs = + import nixpkgs { inherit system overlays; config.allowBroken = true; }; + project = returnShellEnv: + pkgs.haskellPackages.developPackage { + inherit returnShellEnv; + name = "org-zk"; + root = ./.; + withHoogle = false; + overrides = self: super: with pkgs.haskell.lib; { + # Use callCabal2nix to override Haskell dependencies here + # cf. https://tek.brick.do/K3VXJd8mEKO7 + }; + modifier = drv: + pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages; + [ + # Specify your build/dev dependencies here. + cabal-fmt + cabal-install + ghcid + haskell-language-server + ormolu + pkgs.nixpkgs-fmt + ]); + }; + in + { + # Used by `nix build` & `nix run` (prod exe) + defaultPackage = project false; + + # Used by `nix develop` (dev shell) + devShell = project true; + }); +} |