Skip to content

Commit

Permalink
Add build instructions for Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
mk3z committed Aug 6, 2024
1 parent b77508e commit cd940b7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ image:https://zenodo.org/badge/DOI/10.5281/zenodo.7892181.svg?style=social&label
http://www.nic.funet.fi/pub/sci/physics/elmer/bin/windows[Windows Installers],
http://www.nic.funet.fi/pub/sci/physics/elmer/bin/VirtualMachines/[VirtualBox VM]
* Ubuntu Launchpad: https://launchpad.net/~elmer-csc-ubuntu/+archive/ubuntu/elmer-csc-ppa[PPA]
* Compilation: https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/Ubuntu.md[Linux/Ubuntu], https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/Windows-msys2.md[Windows/msys2], https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/macOS.md[macOS]
* Compilation: https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/Ubuntu.md[Linux/Ubuntu], https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/nix.md[Nix], https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/Windows-msys2.md[Windows/msys2], https://github.com/ElmerCSC/elmerfem/blob/devel/compilation_instructions/macOS.md[macOS]
* Docker: https://github.com/ElmerCSC/elmerfem/blob/devel/docker/elmer.dockerfile[GitHub], nwrichmond/elmerice: https://hub.docker.com/r/nwrichmond/elmerice/[Docker Hub]
// * unifem/Elmer-desktop: https://github.com/unifem/Elmer-desktop[GitHub]
// * CoSci-LLC/docker-elmerice: https://hub.docker.com/repository/docker/coscillc/elmerice[Docker Hub], https://github.com/CoSci-LLC/docker-elmerice[GitHub]
Expand Down
27 changes: 27 additions & 0 deletions compilation_instructions/nix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Compilation of Elmer under Nix

## Compiling from upstream

The Nix flake exposes three different derivations (packages) that can be built using `nix build github:ElmerCSC/elmerfem#<version>`.

### `default`
Barebones Elmer with OpenMP and MPI support.

### `gui`
Elmer with GUI.

### `ice`
Elmer/ICE

Specifying no version builds the `default` derivation.

After building, the binaries are accessible under `result/bin`.

## Compiling from a local repository

In the local Elmer repository run `nix build` or `nix build .#<version>`.

## Verbose output

By default `nix build` only shows one line of the build output at once.
To enable more verbose output, add the `-L` flag to the end of the build command.

0 comments on commit cd940b7

Please sign in to comment.