Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GitLab-time-report
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Diese GitLab Instanz ist nicht für den produktiven Einsatz gedacht!
Bitte https://gitlab.ost.ch benutzen!
Diese Instanz ist nur nuch zur Datenmigration online.

Vielen Dank für euer Verständnis.

  • ifs
  • gitlab-time-report
  • GitLab-time-report
  • Merge requests
  • !2

Merged
Created Jul 01, 2020 by Raphael Das Gupta@raphael.dasguptaOwner

nixify project

  • Overview 0
  • Commits 6
  • Pipelines 1
  • Changes 4

This change enables the following ways to interact with this project:

interactive project development shell with nix-shell

If you have nix, you get a shell in an environment with all dependencies set up by running

nix-shell

in this project's top-level directory. You can then e.g. run pytest on the project or start a 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 lorri and dirvenv

If you also have lorri and direnv working, simply run

direnv enable

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 nix-shell: Simply cd into the project.

control pinned versions with niv

E.g., use

nix run nixpkgs.niv -c niv update

to update the nixpkgs and poetry2nix versions used by the above. (There's no need to permanently install niv for that. While the versions were pinned using niv, niv itself is not needed to use them.)

Alternatively, nix/sources.json can be modified manually. There should be no need to modify nix/sources.nix.

motivation

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 buildInputs of 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. niv init itself pinned the niv version. Also pinning the poetry2nix version seemed prudent.

caveat

Despite all the version pinning, this does work on nixos-unstable, 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 nix version.

Edited Jul 01, 2020 by Raphael Das Gupta
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: nix