Skip to content

Getting started

Installation

  1. Install Nix.

    Tip

    We recommend getting the Multi-user installation for compatibility.

  2. Install Makes:

    nix-env -if https://github.com/fluidattacks/makes/archive/24.02.tar.gz
    

Usage

Using the CLI

The Makes command has the following syntax:

m <repo> <job>

where:

  • <repo> is a GitHub, GitLab or local repository.
  • <job> is a Makes job that exists within the referenced repository. If no job is specified, Makes displays all available jobs.

Example:

m github:fluidattacks/makes@main
m gitlab:fluidattacks/makes-example-2@main
m /path/to/local/repo

Makes is powered by Nix. This means that it is able to run on any of the Nix's supported platforms.

We have thoroughly tested it in x86_64 hardware architectures running Linux and MacOS (darwin) machines.

Using the container

A Makes container can be found in the container registry.

You can use it to run Makes on any service that supports containers, including most CI/CD providers.

Example:

# .github/workflows/dev.yml
name: Makes CI
on: [push, pull_request]
jobs:
  helloWorld:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
      - uses: docker://ghcr.io/fluidattacks/makes/amd64:24.02
        name: helloWorld
        with:
          args: m . /helloWorld 1 2 3
1
2
3
4
5
# .gitlab-ci.yml
/helloWorld:
  image: ghcr.io/fluidattacks/makes/amd64:24.02
  script:
    - m . /helloWorld 1 2 3
1
2
3
4
5
6
7
8
# .travis.yml
os: linux
language: nix
nix: 2.3.12
install: nix-env -if https://github.com/fluidattacks/makes/archive/24.02.tar.gz
jobs:
  include:
    - script: m . /helloWorld 1 2 3

Importing via Nix

You can also import Makes from Nix:

let
  # Import the framework
  makes = import "${builtins.fetchTarball {
    sha256 = ""; # Tarball sha256
    url = "https://api.github.com/repos/fluidattacks/makes/tarball/24.02";
  }}/src/args/agnostic.nix" { };
in
# Use the framework
makes.makePythonEnvironment {
  pythonProjectDir = ./.;
  pythonVersion = "3.11";
}

Most functions documented in the api/extensions section are available.

For a detailed list check out Makes' agnostic args.

Want to get your hands dirty?

Jump right into our hands-on example!