This change enables the following ways to interact with this project:
interactive project development shell with
If you have nix, you get a shell in an environment with all dependencies set up by running
in this project's top-level directory.
You can then e.g.
pytest on the project
python session, where
gitlab_time_report as well as any dependencies can be
imported and used.
I've also included
poetry itself, but haven't yet tried to what extent it's usable like that.
fully automatic development environment with
once in this project's top-level directory.
From then on, most features of the
nix-shell environment above will be available
without having to explicitly launch
cd into the project.
control pinned versions with
nix run nixpkgs.niv -c niv update
to update the
poetry2nix versions used by the above.
(There's no need to permanently install niv for that.
While the versions were pinned using
niv itself is not needed to use them.)
nix/sources.json can be modified manually.
There should be no need to modify
Getting this project usable on NixOS using was non-trivial for me: Just using
poetry naïvely lead to matplotlib not finding some of this native library (C++ I believe) dependencies at runtime. Simply listing those to the
shell.nix didn't resolve that issue.
Thus I decided to try poetry2nix, but I had to tinker around to get that working.
To achieve reproducible results across systems and time, I decided to pin the nixpkgs version.
To enable easy updating of the pinned version, I tried
niv init itself pinned the
Also pinning the
poetry2nix version seemed prudent.
Despite all the version pinning,
this does work on
but not on
nixos-20.03 where the build of one of the dependencies fails.
As I believe all other relevant things to be pinned, I guess it's a difference in the