#{ stdenv, fetchgit, cmake, gfortran, pkg-config, openblas, hwloc, scotch, lapack } : { pkgs ? import {} }: pkgs.stdenv.mkDerivation rec { name = "pastix"; version = "6.4.0"; src = pkgs.fetchgit { url = "https://gitlab.inria.fr/solverstack/${name}"; rev = "v${version}"; fetchSubmodules = true; hash = "sha256-dbxGIRUSUQPTdGnYE+Lj+MX+/oGVOFhU4uu43LZuavY="; }; enableParallelBuilding = true; nativeBuildInputs = with pkgs; [ cmake pkg-config gfortran ]; scotch = pkgs.scotch.overrideAttrs (finalAttrs: previousAttrs: { cmakeFlags = [ "-DINTSIZE=64 -DBUILD_SHARED_LIBS=ON" ]; }); starpu = pkgs.callPackage ./package-starpu.nix { }; buildInputs = [ pkgs.openblas pkgs.hwloc scotch starpu pkgs.lapack-ilp64 pkgs.python3 ]; # postPatch = '' # substituteInPlace doc/*.sh \ # --replace "#!/bin/bash" "" # ''; configurePhase = '' cmake \ -B ./build \ -DCMAKE_INSTALL_PREFIX=$out \ -DCMAKE_BUILD_TYPE=Release \ -DPASTIX_WITH_STARPU=ON \ -DPASTIX_WITH_CUDA=OFF \ -DPASTIX_ORDERING_SCOTCH=ON \ -DPASTIX_INT64=ON \ -DPASTIX_WITH_MPI=OFF \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_C_FLAGS="-fopenmp" \ . ''; buildPhase = '' cd ./build make ''; }