tl;dr I wanted to poke around with something while I was bored; I don't recommend that we merge this at all, but I decided to push it up in case anyone else was interested in taking a look.
This is more of an experiment than anything else; I don't think it's something that we'll necessarily ever want to merge, but I wanted to see how difficult it would be to get something up and running with IOHK's haskell.nix build framework.
There are a bunch of caveats here, but the quickstart is basically:
Enter the development shell with either nix develop or nix-shell (depending on whether your Nix installation supports Flakes or not)
That'll probably take a little while to build, but when it's finished it should drop you into a sandbox with GHC 8.10.5, cabal-install-3.4.0.0, haskell-language-server-1.3.0.0, and a GHC package DB loaded up with all of the project's dependencies (this allows someone to drop into a REPL with ghci and have access to all of the libraries instantly).
The value proposition here is threefold:
The project can now be built with nix build .#pg-client:lib:pg-client in a way that's fully hermetic, down to the C libraries
CI builds can be much more aggressively cached, and these caches can be shared with developers
i.e. CI can upload cached artifacts for all of the dependencies, so in an ideal scenario no one should have to rebuild anything on a fresh checkout
The cached development environment from (2) can include all of the project's development dependencies, including a working Hoogle server
tl;dr I wanted to poke around with something while I was bored; I don't recommend that we merge this at all, but I decided to push it up in case anyone else was interested in taking a look.
This is more of an experiment than anything else; I don't think it's something that we'll necessarily ever want to merge, but I wanted to see how difficult it would be to get something up and running with IOHK's
haskell.nix
build framework.There are a bunch of caveats here, but the quickstart is basically:
jkachmar/haskell-nix
nix develop
ornix-shell
(depending on whether your Nix installation supports Flakes or not)That'll probably take a little while to build, but when it's finished it should drop you into a sandbox with GHC 8.10.5,
cabal-install-3.4.0.0
,haskell-language-server-1.3.0.0
, and a GHC package DB loaded up with all of the project's dependencies (this allows someone to drop into a REPL withghci
and have access to all of the libraries instantly).The value proposition here is threefold:
nix build .#pg-client:lib:pg-client
in a way that's fully hermetic, down to the C libraries