nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 36 lines 1.0 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, mpi, python3, petsc }: 2 3stdenv.mkDerivation rec { 4 pname = "precice"; 5 version = "2.4.0"; 6 7 src = fetchFromGitHub { 8 owner = "precice"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "0qmwdxpbmy4dvjxav3dls18qns734j0yfvxvjrh1nnkk36qhfp3q"; 12 }; 13 14 cmakeFlags = [ 15 "-DPRECICE_PETScMapping=OFF" 16 "-DBUILD_SHARED_LIBS=ON" 17 "-DPYTHON_LIBRARIES=${python3.libPrefix}" 18 "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}" 19 ]; 20 21 NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [ "-D_GNU_SOURCE" ]; 22 23 nativeBuildInputs = [ cmake gcc ]; 24 buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]; 25 26 meta = { 27 description = "preCICE stands for Precise Code Interaction Coupling Environment"; 28 homepage = "https://precice.org/"; 29 license = with lib.licenses; [ gpl3 ]; 30 maintainers = with lib.maintainers; [ Scriptkiddi ]; 31 mainProgram = "binprecice"; 32 platforms = lib.platforms.unix; 33 }; 34} 35 36