Skip to content

Commit 358000c

Browse files
committed
Update nix/README.md
1 parent fd95d6d commit 358000c

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

nix/README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,43 @@ respective `master` branch and OpenPFC is built from the local source, run:
3434
nix develop
3535
```
3636

37-
This will create a shell environment with the latest source code for both projects.
37+
This will create a shell environment with the latest source code for both
38+
projects. Inside the shell, you can build the project using the following
39+
commands:
40+
41+
```bash
42+
cmake -S . -B build
43+
cmake --build build
44+
```
3845

3946
### Building Specific Releases
4047

41-
To build a specific release of `OpenPFC` with a specific version of `HeFFTe`, use the `nix build` command with arguments. For example:
48+
To build a specific release of `OpenPFC` with a specific version of `HeFFTe`,
49+
use the `nix build` command. There are two main build targets:
50+
51+
- `#openpfc-dev`: The default target, which can also be invoked with `nix
52+
build`. This builds the development version of `OpenPFC`.
53+
- `#openpfc`: Builds the release version of `OpenPFC`.
54+
55+
For example:
4256

4357
```bash
44-
nix build .#default --arg version "0.1.1" --arg heffteVersion "0.2.1"
58+
nix build #openpfc
4559
```
4660

47-
This command will build `OpenPFC` version `0.1.1` with `HeFFTe` version `0.2.1`.
61+
or equivalently for the development version:
62+
63+
```bash
64+
nix build #openpfc-dev
65+
```
66+
67+
When building, tagged versions are used, which are defined in the following files:
68+
69+
- `nix/openpfc/versions`
70+
- `nix/heffte/versions`
71+
72+
This approach allows constructing immutable builds for all versions simply by
73+
changing the version numbers in these files.
4874

4975
### Why Use Nix?
5076

0 commit comments

Comments
 (0)