ImplicitCAD/default.nix
Richard Marko d963072261 Add nix support files
`default.nix` for building the project with `nix-build` using systems
`<nixpkgs>` and default compiler.

`shell.nix` to allow usage of `nix-shell` to enter development shell.

`default.nix` uses `withImplicitSnap = false` default.

To build with `implicitsnap` use

```
nix-build --arg withImplicitSnap true
```

`shell.nix` enables `withImplicitSnap` by default and can be overriden with

```
nix-shell --arg withImplicitSnap false
```
2020-07-10 16:13:17 +02:00

8 lines
289 B
Nix

{ pkgs ? import <nixpkgs> {}, withImplicitSnap ? false }:
let
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
in
if withImplicitSnap
then pkgs.haskellPackages.callCabal2nixWithOptions "implicit" src "-fimplicitsnap" { }
else pkgs.haskellPackages.callCabal2nix "implicit" src { }