/nur-kapack

Nix expressions related to HPC and Distributed Systems research domains

Primary LanguageNixMIT LicenseMIT

CI build status Cachix Cache

NUR-Kapack repository

NUR-Kapack contains Nix package definitions of the software we work on in the DataMove team: OAR, the Batsim ecosystem, Melissa... This is part of Nix User Repository.

Packages of released versions defined in this repository are built regularly on CI and stored on a Cachix binary cache. You can use it to just fetch prebuilt binaries instead of rebuilding them with the following command.

# Install cachix
nix-env -iA cachix -f https://cachix.org/api/v1/install

# Enable our binary cache for your builds
cachix use capack

Interactive usage

You can enter shells that contain some of our packages with nix run.

# Essential Batsim tools in a single shell (latest release of each tool)
nix run -f https://github.com/oar-team/nur-kapack/archive/master.tar.gz batsim batsched pybatsim batexpe

# The same, but with latest commit on master branch of each tool
nix run -f https://github.com/oar-team/nur-kapack/archive/master.tar.gz batsim-master batsched-master pybatsim-master batexpe-master

You can also install packages in your Nix profile with nix-env.

# Install Batsim latest release in your profile
nix-env -f https://github.com/oar-team/nur-kapack/archive/master.tar.gz -iA batsim

Usage from Nix expressions

You can write Nix expression to define environments that use our packages. Assuming that you have a file named shell.nix that has the following content, you can enter the defined shell by calling nix-shell.

{ kapack ? import
    (fetchTarball "https://github.com/oar-team/nur-kapack/archive/master.tar.gz")
  {}
}:

kapack.pkgs.mkShell rec {
  name = "tuto-env";
  buildInputs = [
    kapack.batsim
    kapack.batsched
    kapack.pybatsim
    kapack.batexpe
  ];
}

If you want to pin the NUR-Kapack version you use, you can do one of the following.

  • Use a pinned tarball from GitHub such as https://github.com/oar-team/nur-kapack/archive/2518733fefc28290ecffe44c3234eb2a36b731cd.tar.gz
  • Use Nix Flakes

Usage à la NUR

As NUR-Kapack is a NUR, you can use our packages as it is done with other NURs. Please refer to the official NUR documentation for this usage.