nixpkgs/pkgs/by-name/el/elmerfem/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

82 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, gfortran
, mpi
, blas
, liblapack
, pkg-config
, libGL
, libGLU
, opencascade-occt_7_6
, libsForQt5
, tbb
, vtkWithQt5
}:
let
opencascade-occt = opencascade-occt_7_6;
in
stdenv.mkDerivation rec {
pname = "elmerfem";
version = "unstable-2023-09-18";
src = fetchFromGitHub {
owner = "elmercsc";
repo = pname;
rev = "0fcced06f91c93f44557efd6a5f10b2da5c7066c";
hash = "sha256-UuARDYW7D3a4dB6I86s2Ed5ecQxc+Y/es3YIeF2VyTc=";
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [
cmake
gfortran
pkg-config
libsForQt5.wrapQtAppsHook
];
buildInputs = [
mpi
blas
liblapack
libsForQt5.qtbase
libsForQt5.qtscript
libsForQt5.qwt
libGL
libGLU
opencascade-occt
tbb
vtkWithQt5
];
preConfigure = ''
patchShebangs ./
'';
storepath = placeholder "out";
cmakeFlags = [
"-DELMER_INSTALL_LIB_DIR=${storepath}/lib"
"-DWITH_OpenMP:BOOLEAN=TRUE"
"-DWITH_MPI:BOOLEAN=TRUE"
"-DWITH_QT5:BOOLEAN=TRUE"
"-DWITH_OCC:BOOLEAN=TRUE"
"-DWITH_VTK:BOOLEAN=TRUE"
"-DWITH_ELMERGUI:BOOLEAN=TRUE"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_OpenGL_GL_PREFERENCE=GLVND"
];
meta = with lib; {
homepage = "https://elmerfem.org";
description = "Finite element software for multiphysical problems";
platforms = platforms.unix;
maintainers = with maintainers; [ wulfsta broke ];
license = licenses.lgpl21;
};
}