From 84c974564fc67974cf8aa07d2e5318e53efa79ff Mon Sep 17 00:00:00 2001 From: Vieta <94648307+yVieta@users.noreply.github.com> Date: Sat, 25 May 2024 18:55:40 +0200 Subject: [PATCH 1/2] pages_install_index: add Nix --- pages/install/index.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pages/install/index.md b/pages/install/index.md index 1352c0f31..003e995c0 100644 --- a/pages/install/index.md +++ b/pages/install/index.md @@ -194,6 +194,31 @@ 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) + +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 +``` + +[Nix](https://nixos.org/) + +## Pixi package manager +The [Pixi] package manager takes the package from [Conda](https://anaconda.org/conda-forge/fpm)). + +```{code-block} bash +pixi global install fpm +``` + +[Pixi]: https://pixi.sh + + ## {fab}`windows` WinGet From e566e51e5356dc9f55f0423570aac8eaabbca3e4 Mon Sep 17 00:00:00 2001 From: Vieta <94648307+yVieta@users.noreply.github.com> Date: Sat, 25 May 2024 19:14:25 +0200 Subject: [PATCH 2/2] pages_install_index: add pixi --- pages/install/index.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/pages/install/index.md b/pages/install/index.md index 003e995c0..b2a6c4526 100644 --- a/pages/install/index.md +++ b/pages/install/index.md @@ -197,6 +197,8 @@ 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 @@ -207,10 +209,40 @@ As temporarly package via [nix-shell] 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 -The [Pixi] package manager takes the package from [Conda](https://anaconda.org/conda-forge/fpm)). +[![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 @@ -219,7 +251,6 @@ pixi global install fpm [Pixi]: https://pixi.sh - ## {fab}`windows` WinGet [![winget package](https://repology.org/badge/version-for-repo/winget/fpm-fortran-package-manager.svg)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/f/FortranLang/fpm)