Skip to content

Commit

Permalink
Switch to nixos-unstable and add ParMmg to Nix flake
Browse files Browse the repository at this point in the history
The unstable channel has hypre and nn packaged now, so providing them as external flakes is unnecessary.
  • Loading branch information
mk3z committed Jul 16, 2024
1 parent 401bfa1 commit 9262a2e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 89 deletions.
93 changes: 21 additions & 72 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 18 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Elmer FEM";

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

flake-utils.url = "github:numtide/flake-utils";

Expand All @@ -13,25 +13,23 @@
inputs.nixpkgs.follows = "nixpkgs";
};

hypre = {
url = "github:mk3z/hypre";
inputs.nixpkgs.follows = "nixpkgs";
};

csa = {
url = "github:mk3z/csa-c";
inputs.nixpkgs.follows = "nixpkgs";
};

nn = {
url = "github:mk3z/nn-c";
inputs.nixpkgs.follows = "nixpkgs";
};

mmg = {
url = "github:mk3z/mmg/develop";
inputs.nixpkgs.follows = "nixpkgs";
};

parmmg = {
url = "github:mk3z/parmmg/develop";
inputs = {
nixpkgs.follows = "nixpkgs";
mmg.follows = "mmg";
};
};
};

outputs = {
Expand All @@ -45,10 +43,9 @@
system: let
pkgs = nixpkgs.legacyPackages.${system};
mumps = inputs.mumps.packages.${system}.default;
hypre = inputs.hypre.packages.${system}.default;
csa = inputs.csa.packages.${system}.default;
nn = inputs.nn.packages.${system}.default;
mmg = inputs.mmg.packages.${system}.default;
parmmg = inputs.parmmg.packages.${system}.default;

basePkg = {
name,
Expand Down Expand Up @@ -171,13 +168,13 @@
buildInputs = with pkgs;
[
hdf5-mpi
hypre
nn
scalapack
]
++ [
csa
hypre
mumps
nn
];

cmakeFlags = [
Expand All @@ -196,13 +193,17 @@
"-DWITH_ScatteredDataInterpolator:BOOL=TRUE"
"-DCSA_LIBRARY=${csa}/lib/libcsa.a"
"-DCSA_INCLUDE_DIR=${csa}/include"
"-DNN_INCLUDE_DIR=${nn}/include"
"-DNN_LIBRARY=${nn}/lib/libnn.a"
"-DNN_INCLUDE_DIR=${pkgs.nn}/include"
"-DNN_LIBRARY=${pkgs.nn}/lib/libnn.a"

"-DWITH_MMG:BOOL=TRUE"
"-DMMG_INCLUDE_DIR=${mmg}/include"
"-DMMG_LIBRARY=${mmg}/lib/libmmg.so"

"-DWITH_PARMMG:BOOL=TRUE"
"-DPARMMG_INCLUDE_DIR=${parmmg}/include"
"-DPARMMG_LIBRARY=${parmmg}/lib/libparmmg.so"

"-DWITH_GridDataReader:BOOL=TRUE"

"-DWITH_Trilinos:BOOL=FALSE"
Expand Down

0 comments on commit 9262a2e

Please sign in to comment.