14 # this is a fork version of fetk (http://www.fetk.org/)
15 # which is maintained by apbs team
16 fetk = stdenv.mkDerivation (finalAttrs: {
20 src = fetchFromGitHub {
21 owner = "Electrostatics";
23 rev = "refs/tags/${finalAttrs.version}";
24 hash = "sha256-uFA1JRR05cNcUGaJj9IyGNONB2hU9IOBPzOj/HucNH4=";
32 "-DBLAS_LIBRARIES=${blas}/lib"
37 env = lib.optionalAttrs stdenv.cc.isClang {
38 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
48 description = "Fork of the Finite Element ToolKit from fetk.org";
49 homepage = "https://github.com/Electrostatics/FETK";
50 changelog = "https://github.com/Electrostatics/FETK/releases/tag/${finalAttrs.version}";
51 license = licenses.lgpl21Plus;
52 maintainers = with maintainers; [ natsukium ];
53 platforms = platforms.unix;
57 stdenv.mkDerivation (finalAttrs: {
61 src = fetchFromGitHub {
62 owner = "Electrostatics";
64 rev = "refs/tags/v${finalAttrs.version}";
65 hash = "sha256-2DnHU9hMDl4OJBaTtcRiB+6R7gAeFcuOUy7aI63A3gQ=";
69 # ImportFETK.cmake downloads source and builds fetk
70 substituteInPlace CMakeLists.txt \
71 --replace "include(ImportFETK)" "" \
72 --replace 'import_fetk(''${FETK_VERSION})' ""
74 # U was removed in python 3.11 because it had no effect
75 substituteInPlace tools/manip/inputgen.py \
76 --replace '"rU"' '"r"'
88 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
95 "-DPYTHON_VERSION=${python3.version}"
96 "-DAPBS_LIBS=mc;maloc"
97 "-DCMAKE_MODULE_PATH=${fetk}/share/fetk/cmake;"
101 env = lib.optionalAttrs stdenv.cc.isClang {
102 NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
108 description = "Software for biomolecular electrostatics and solvation calculations";
109 mainProgram = "apbs";
110 homepage = "https://www.poissonboltzmann.org/";
111 changelog = "https://github.com/Electrostatics/apbs/releases/tag/v${finalAttrs.version}";
112 license = licenses.bsd3;
113 maintainers = with maintainers; [ natsukium ];
114 platforms = platforms.unix;