Ultimos cambios OF v2202

master v2202
parent f148108b81
commit ad25efe945

@ -1,12 +1,15 @@
{ {
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1687709756,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,18 +20,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1672505534, "lastModified": 1687886075,
"narHash": "sha256-ntaHfT53P4DtP3nW2mTmq5MQP3gqeut+ByPLHRkipcc=", "narHash": "sha256-PeayJDDDy+uw1Ats4moZnRdL1OFuZm1Tj+KiHlD67+o=",
"owner": "bgamari", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "48dcea17d21e1b7ebcda2baa9fa2ea1beef00a3d", "rev": "a565059a348422af5af9026b5174dc5c0dcefdae",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "bgamari", "id": "nixpkgs",
"ref": "wip/vtk-egg-info", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"openfoam": { "openfoam": {
@ -49,6 +50,21 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"openfoam": "openfoam" "openfoam": "openfoam"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

@ -3,7 +3,7 @@
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:bgamari/nixpkgs/wip/vtk-egg-info"; #inputs.nixpkgs.url = "github:bgamari/nixpkgs/wip/vtk-egg-info";
inputs.openfoam = { inputs.openfoam = {
url = "https://develop.openfoam.com/Development/openfoam/-/archive/OpenFOAM-v2212/openfoam-OpenFOAM-v2212.tar.gz"; url = "https://develop.openfoam.com/Development/openfoam/-/archive/OpenFOAM-v2212/openfoam-OpenFOAM-v2212.tar.gz";

@ -1,7 +1,7 @@
{ {
stdenv, src, stdenv, src,
bash, m4, flex, bison, bash, m4, flex, bison,
fftw, mpi, scotch, boost, cgal, zlib fftw, mpi, scotch, boost, cgal, zlib, pkg-config, gmp, cmake, python3
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -9,8 +9,8 @@ stdenv.mkDerivation {
inherit src; inherit src;
nativeBuildInputs = [ bash m4 flex bison ]; nativeBuildInputs = [ bash m4 flex bison pkg-config cmake ];
buildInputs = [ fftw mpi scotch boost cgal zlib ]; buildInputs = [ fftw mpi scotch boost cgal zlib gmp ];
patches = [ ./fix-bash.patch ]; patches = [ ./fix-bash.patch ];
postPatch = '' postPatch = ''
@ -24,52 +24,11 @@ stdenv.mkDerivation {
do do
substituteInPlace $f --replace /bin/bash ${bash}/bin/bash substituteInPlace $f --replace /bin/bash ${bash}/bin/bash
done done
cp ../bashrc etc/bashrc
''; '';
configurePhase = ''
set -x
build="$(pwd)"
export FOAM_APP=$build/applications
export FOAM_SOLVERS=$build/applications/solvers
export FOAM_APPBIN=$build/platforms/linux64Gcc/bin
export FOAM_LIBBIN=$build/platforms/linux64Gcc/lib
export FOAM_EXT_LIBBIN=$build/platforms/linux64Gcc/lib
export FOAM_MPI=openmpi-system
export FOAM_RUN=$build/run
export FOAM_SRC=$build/src
export FOAM_ETC=$build/etc
export FOAM_USER_APPBIN=$build/platforms/linux64Gcc/bin
export FOAM_USER_LIBBIN=$build/platforms/linux64Gcc/lib
export FOAM_EXTRA_CXXFLAGS="-DFOAM_CONFIGURED_PROJECT_DIR=\\\"${placeholder "out"}\\\""
export MPI_ARCH_PATH=/usr/include/openmpi
export WM_ARCH=linux64
export WM_LABEL_SIZE=32
export WM_LABEL_OPTION=Int32
export WM_COMPILER=Gcc
export WM_COMPILER_LIB_ARCH=64
export WM_COMPILE_OPTION=Opt
export WM_DIR=$build/wmake
export WM_OPTIONS=linux64Gcc
export WM_PRECISION_OPTION=DP
export WM_PROJECT=OpenFOAM
export WM_PROJECT_DIR=$build
export WM_PROJECT_USER_DIR=$build/debian/tmp
export WM_PROJECT_VERSION="$(bin/foamEtcFile -show-api)"
export WM_NCOMPPROCS=$CORES
export gperftools_install=$build/platforms/linux64Gcc
export WM_MPLIB=SYSTEMOPENMPI
unset FOAMY_HEX_MESH
bin/tools/foamConfigurePaths \
-boost boost-system \
-cgal cgal-system \
-fftw fftw-system \
-kahip kahip-none \
-scotch scotch-system
'';
buildPhase = '' buildPhase = ''
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$build/platforms/linux64Gcc/lib/openmpi-system:$build/platforms/linux64Gcc/lib:$build/platforms/linux64Gcc/lib/dummy" \ source etc/bashrc
PATH="$PATH:$build/wmake" \
./Allwmake -j$CORES -q ./Allwmake -j$CORES -q
''; '';
installPhase = '' installPhase = ''

Loading…
Cancel
Save