diff --git a/README.md b/README.md index 8c92051664d8be7d2f1c4cf1f6f3af1f15669f1f..3dbd483864a5358cc4ed3e36c101f6954cd2ad08 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,20 @@ **batsched** is a set of [Batsim]-compatible algorithms implemented in C++. -## Install -### For [Nix] users -``` bash -# Up-to-date version -nix-env -iA batsched-master -f 'https://github.com/oar-team/nur-kapack/archive/master.tar.gz' -# Latest release -nix-env -iA batsched -f 'https://github.com/oar-team/nur-kapack/archive/master.tar.gz' -``` +## Development setup prerequisites +1. Install Nix with the `nix` command and nix `flakes` enabled. + This can be done via [nix-portable](https://github.com/DavHau/nix-portable) or with a [full install](https://nixos.org/download) + [configuration](https://nixos.wiki/wiki/Flakes#Other_Distros.2C_without_Home-Manager). -### Manually -``` bash -git clone https://framagit.org/batsim/batsched.git -mkdir -p batsched/build -cd batsched/build -cmake .. -make -make install -``` +## Dev workflow 1 (pure build every time) +1. Hack some input files. +2. (if you have added new files to Git that are needed to compile batsched, you must `git add` them) +3. Build batsched via `nix`: `nix build .#batsched` from the git repository's root. +4. Use the `batsched` that has been compiled. It is available in `./result/bin/batsched` -Up-to-date dependencies and versions are fully defined in [batsched's CI nix recipe](./release.nix). -Here is a quick (and probably outdated) list: -- decent clang/gcc and cmake -- zmq (C and C++) -- redox (hiredis + libev) -- [loguru] -- [intervalset] -- decent boost, gmp, rapidjson... - -[Batsim]: https://framagit.org/batsim/batsim/ -[intervalset]: https://framagit.org/batsim/intervalset -[loguru]: https://github.com/emilk/loguru -[Nix]: https://nixos.org/nix/ +## Dev workflow 2 (iterative builds) +1. Hack some input files. +2. Enter a shell that you'll use to compile batsched: `nix develop .#batsched`. + In this shell you can compile batsched how you'd do without Nix: + - `meson setup build` once + - then `ninja -C build` everytime you want to compile batsched +3. Use the `batsched` that has been compiled. It is available in `./build/batsched`