Skip to content

Draft: Minimal Changes Necessary to Use a Nix Flake

Andrew Fontaine requested to merge afontaine-nixify into master

This allows the creation of a nix development shell where ruby and system dependencies are managed by nix.

Yarn dependencies are left alone because:

  1. There is already a yarn.lock file.
  2. Yarn dependencies are installed locally to the node_modules folder.
  3. The need to compile native modules for yarn dependencies is low.

(Mostly) thanks to that second point, the benefit of managing node dependencies via nix are low. Instead, we ensure node and yarn are installed via nix, which is similar to how asdf manages yarn and node today.

The benefit of using nix for managing ruby gems is that it creates an isolated gemset specific to this project, so the ability to conflict with system ruby gems are low (same as asdf), but also allows us to declaratively define ruby gem configuration in the even that a specific gem requires building native modules that rely on system libraries, such as nokogiri. Any configuration present specifically overrides the configuration in the default gem config.

This also declares all the depencies listed in the GDK setup document, which is probably unnecessary, but I'm not sure which belongs to gitlab and which belongs elsewhere.

Edited by Andrew Fontaine

Merge request reports