Helper Packages
NixKraken uses several packages to perform actions related to GitKraken configuration handling. Because GitKraken's configuration files also store mutable application state, they cannot be written directly by Nix. Instead, these packages are used to safely read, modify, and write to the JSON configuration files without destroying the state.
Packages are written in Python and are dynamically exported using the packagesFromDirectoryRecursive function. Adding a directory under pkgs with a package.nix will automatically make a package (named after the directory) available for use.
TIP
When you enter a Nix development shell, the packages are available as their gk--prefixed counterparts:
$ nix develop # ...or nix-shell
$ gk-configure # pkgs/configure/default.nix
$ gk-decrypt # pkgs/decrypt/default.nix
$ gk-encrypt # pkgs/encrypt/default.nix
$ gk-login # pkgs/login/default.nix
$ gk-theme # pkgs/theme/default.nixBuild Packages
Packages are exposed as Flake outputs inside the packages output. To build them, use following commands:
# Using new Nix commands
$ nix build '.#<package-name>'# ...or with classic Nix commands
$ nix-build ./pkgs -A <package-name># You can also build all packages at once with classic Nix commands
$ nix-build ./pkgsTo run the packages, either execute the binary stored in result/bin after a successful build or use nix run instead of nix build and nix-build.