Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages install index: Nix package manager and pixi package manager #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pages/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,62 @@ cd /usr/ports/devel/fpm
make install clean
```

## Nix package manager
[![Nix package](https://repology.org/badge/version-for-repo/nix_unstable/fortran-fpm.svg)](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/package-management/fortran-fpm/default.nix)

The latest version of fpm on the unstable version on Nix which backports back into the latest stable version of Nix after a while.

As a persistent package use [nix profile]
```{code-block} bash
nix profile install fortran-fpm
```

As temporarly package via [nix-shell]
```{code-block} bash
nix-shell -p fortran-fpm
```

There are much more options you can do with the Nix package manager such use via [nix flake].
for example:

```{code-block} bash
{
description = "A Nix-flake-based fortran-fpm development environment";

inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
fortran-fpm
];
};
});
};
}
```

[Nix](https://nixos.org/)


## Pixi package manager
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/fpm)](https://github.com/conda-forge/fpm-feedstock)
The [Pixi] package manager takes the fpm package from [Conda](https://anaconda.org/conda-forge/fpm)).

```{code-block} bash
pixi global install fpm
```

[Pixi]: https://pixi.sh


## {fab}`windows` WinGet

Expand Down