uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
30
pkgs/applications/science/chemistry/avogadro/default.nix
Normal file
30
pkgs/applications/science/chemistry/avogadro/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl, cmake, qt4, zlib, eigen, openbabel, pkg-config, libGLU, libGL, libX11, doxygen }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avogadro";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/avogadro/avogadro-${version}.tar.bz2";
|
||||
sha256 = "050ag9p4vg7jg8hj1wqfv7lsm6ar2isxjw2vw85s49vsl7g7nvzy";
|
||||
};
|
||||
|
||||
buildInputs = [ qt4 eigen zlib openbabel libGL libGLU libX11 ];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config doxygen ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h";
|
||||
|
||||
patches = [
|
||||
(fetchurl {
|
||||
url = "https://data.gpo.zugaina.org/fusion809/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch";
|
||||
sha256 = "1p113v19z3zwr9gxj2k599f8p97a8rwm93pa4amqvd0snn31mw0k";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Molecule editor and visualizer";
|
||||
maintainers = with maintainers; [ danielbarter ];
|
||||
platforms = platforms.mesaPlatforms;
|
||||
};
|
||||
}
|
||||
49
pkgs/applications/science/chemistry/avogadro2/default.nix
Normal file
49
pkgs/applications/science/chemistry/avogadro2/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, eigen, avogadrolibs, molequeue, hdf5
|
||||
, openbabel, qttools, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
avogadroI18N = fetchFromGitHub {
|
||||
owner = "OpenChemistry";
|
||||
repo = "avogadro-i18n";
|
||||
rev = "3b8a86cc37e988b043d1503d2f11068389b0aca3";
|
||||
sha256 = "9wLY7/EJyIZYnlUAMsViCwD5kGc1vCNbk8vUhb90LMQ=";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "avogadro2";
|
||||
version = "1.95.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenChemistry";
|
||||
repo = "avogadroapp";
|
||||
rev = version;
|
||||
sha256 = "9GnsxQsMuik6CPDmJbJPF0/+LXbZHf/JLevpSsMEoP0=";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
cp -r ${avogadroI18N} avogadro-i18n
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
avogadrolibs
|
||||
molequeue
|
||||
eigen
|
||||
hdf5
|
||||
qttools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ openbabel ];
|
||||
|
||||
qtWrapperArgs = [ "--prefix PATH : ${openbabel}/bin" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Molecule editor and visualizer";
|
||||
maintainers = with maintainers; [ sheepforce ];
|
||||
homepage = "https://github.com/OpenChemistry/avogadroapp";
|
||||
platforms = platforms.mesaPlatforms;
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
57
pkgs/applications/science/chemistry/chemtool/default.nix
Normal file
57
pkgs/applications/science/chemistry/chemtool/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, libX11
|
||||
, gtk2
|
||||
, fig2dev
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "chemtool";
|
||||
version = "1.6.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ruby.chemie.uni-freiburg.de/~martin/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "hhYaBGE4azNKX/sXzfCUpJGUGIRngnL0V0mBNRTdr8s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||
buildInputs = [
|
||||
libX11
|
||||
gtk2
|
||||
fig2dev
|
||||
];
|
||||
|
||||
# Workaround build on -fno-common toolchains like upstream gcc-10.
|
||||
# Otherwise built fails as:
|
||||
# ld: inout.o:/build/chemtool-1.6.14/ct1.h:279: multiple definition of
|
||||
# `outtype'; draw.o:/build/chemtool-1.6.14/ct1.h:279: first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}")
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://ruby.chemie.uni-freiburg.de/~martin/chemtool/";
|
||||
description = "Draw chemical structures";
|
||||
longDescription = ''
|
||||
Chemtool is a program for drawing organic molecules. It runs under the X
|
||||
Window System using the GTK widget set.
|
||||
|
||||
Most operations in chemtool can be accomplished using the mouse - the
|
||||
first (usually the left) button is used to select or place things, the
|
||||
middle button modifies properties (e.g. reverses the direction of a bond),
|
||||
and the right button is used to delete objects.
|
||||
|
||||
The program offers essentially unlimited undo/redo, two text fonts plus
|
||||
symbols, seven colors, drawing at several zoom scales, and square and
|
||||
hexagonal backdrop grids for easier alignment.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
121
pkgs/applications/science/chemistry/cp2k/default.nix
Normal file
121
pkgs/applications/science/chemistry/cp2k/default.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python3, gfortran, blas, lapack
|
||||
, fftw, libint, libvori, libxc, mpi, gsl, scalapack, openssh, makeWrapper
|
||||
, libxsmm, spglib, which, pkg-config
|
||||
, enableElpa ? false
|
||||
, elpa
|
||||
} :
|
||||
|
||||
let
|
||||
cp2kVersion = "psmp";
|
||||
arch = "Linux-x86-64-gfortran";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "cp2k";
|
||||
version = "9.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cp2k";
|
||||
repo = "cp2k";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-P9RwZmrE1E0UTQVasQxWAqa3LBLyJNGeJo8T6u5WWcw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3 which openssh makeWrapper pkg-config ];
|
||||
buildInputs = [
|
||||
gfortran
|
||||
fftw
|
||||
gsl
|
||||
libint
|
||||
libvori
|
||||
libxc
|
||||
libxsmm
|
||||
spglib
|
||||
scalapack
|
||||
blas
|
||||
lapack
|
||||
] ++ lib.optional enableElpa elpa;
|
||||
|
||||
propagatedBuildInputs = [ mpi ];
|
||||
propagatedUserEnvPkgs = [ mpi ];
|
||||
|
||||
makeFlags = [
|
||||
"ARCH=${arch}"
|
||||
"VERSION=${cp2kVersion}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools exts/dbcsr/tools/build_utils exts/dbcsr/.cp2k
|
||||
substituteInPlace exts/build_dbcsr/Makefile \
|
||||
--replace '/usr/bin/env python3' '${python3}/bin/python' \
|
||||
--replace 'SHELL = /bin/sh' 'SHELL = bash'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cat > arch/${arch}.${cp2kVersion} << EOF
|
||||
CC = mpicc
|
||||
CPP =
|
||||
FC = mpif90
|
||||
LD = mpif90
|
||||
AR = ar -r
|
||||
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \
|
||||
-D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \
|
||||
-D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"}
|
||||
CFLAGS = -fopenmp
|
||||
FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
|
||||
-ftree-vectorize -funroll-loops -msse2 \
|
||||
-std=f2008 \
|
||||
-fopenmp -ftree-vectorize -funroll-loops \
|
||||
-I${libxc}/include -I${libxsmm}/include \
|
||||
-I${libint}/include ${lib.optionalString enableElpa "$(pkg-config --variable=fcflags elpa)"}
|
||||
LIBS = -lfftw3 -lfftw3_threads \
|
||||
-lscalapack -lblas -llapack \
|
||||
-lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \
|
||||
-lint2 -lstdc++ -lvori \
|
||||
-lgomp -lpthread -lm \
|
||||
-fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"}
|
||||
LDFLAGS = \$(FCFLAGS) \$(LIBS)
|
||||
EOF
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
export HYDRA_IFACE=lo # Fix to make mpich run in a sandbox
|
||||
export OMPI_MCA_rmaps_base_oversubscribe=1
|
||||
export CP2K_DATA_DIR=data
|
||||
|
||||
mpirun -np 2 exe/${arch}/libcp2k_unittest.${cp2kVersion}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/cp2k
|
||||
|
||||
cp exe/${arch}/* $out/bin
|
||||
|
||||
for i in cp2k cp2k_shell graph; do
|
||||
wrapProgram $out/bin/$i.${cp2kVersion} \
|
||||
--set-default CP2K_DATA_DIR $out/share/cp2k
|
||||
done
|
||||
|
||||
wrapProgram $out/bin/cp2k.popt \
|
||||
--set-default CP2K_DATA_DIR $out/share/cp2k \
|
||||
--set OMP_NUM_THREADS 1
|
||||
|
||||
cp -r data/* $out/share/cp2k
|
||||
'';
|
||||
|
||||
passthru = { inherit mpi; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Quantum chemistry and solid state physics program";
|
||||
homepage = "https://www.cp2k.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/science/chemistry/d-seams/default.nix
Normal file
33
pkgs/applications/science/chemistry/d-seams/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ clangStdenv, fetchFromGitHub, catch2, rang, fmt, libyamlcpp, cmake
|
||||
, eigen, lua, luaPackages, liblapack, blas, lib, boost, gsl }:
|
||||
|
||||
clangStdenv.mkDerivation rec {
|
||||
version = "1.0.1";
|
||||
pname = "d-SEAMS";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "d-SEAMS";
|
||||
repo = "seams-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "03zhhl9vhi3rhc3qz1g3zb89jksgpdlrk15fcr8xcz8pkj6r5b1i";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake lua luaPackages.luafilesystem ];
|
||||
buildInputs = [ fmt rang libyamlcpp eigen catch2 boost gsl liblapack blas ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"d-SEAMS: Deferred Structural Elucidation Analysis for Molecular Simulations";
|
||||
longDescription = ''
|
||||
d-SEAMS, is a free and open-source postprocessing engine for the analysis
|
||||
of molecular dynamics trajectories, which is specifically able to
|
||||
qualitatively classify ice structures in both strong-confinement and bulk
|
||||
systems. The engine is in C++, with extensions via the Lua scripting
|
||||
interface.
|
||||
'';
|
||||
homepage = "https://dseams.info";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.HaoZeke ];
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/science/chemistry/dkh/default.nix
Normal file
32
pkgs/applications/science/chemistry/dkh/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, gfortran, fetchFromGitHub, cmake } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dkh";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "psi4";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256= "1wb4qmb9f8rnrwnnw1gdhzx1fmhy628bxfrg56khxy3j5ljxkhck";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gfortran
|
||||
cmake
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
hardeningDisable = [
|
||||
"format"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Arbitrary-order scalar-relativistic Douglas-Kroll-Hess module";
|
||||
license = licenses.lgpl3Only;
|
||||
homepage = "https://github.com/psi4/dkh";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
}
|
||||
22
pkgs/applications/science/chemistry/element/default.nix
Normal file
22
pkgs/applications/science/chemistry/element/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "element";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gennaro-tedesco";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "gjdcNvYNnxb6hOE/MQjTezZeYGBWTr4E8/Pt8YQv3lY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "A4g2rQTaYrA4/0rqldUv7iuibzNINEvx9StUnaN2/Yg=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "The periodic table on the command line";
|
||||
homepage = "https://github.com/gennaro-tedesco/element";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.j0hax ];
|
||||
};
|
||||
}
|
||||
40
pkgs/applications/science/chemistry/ergoscf/default.nix
Normal file
40
pkgs/applications/science/chemistry/ergoscf/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, blas, lapack } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ergoscf";
|
||||
version = "3.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.ergoscf.org/source/tarfiles/ergo-${version}.tar.gz";
|
||||
sha256 = "1s50k2gfs3y6r5kddifn4p0wmj0yk85wm5vf9v3swm1c0h43riix";
|
||||
};
|
||||
|
||||
buildInputs = [ blas lapack ];
|
||||
|
||||
patches = [ ./math-constants.patch ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./test
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-linalgebra-templates"
|
||||
"--enable-performance"
|
||||
] ++ lib.optional stdenv.isx86_64 "--enable-sse-intrinsics";
|
||||
|
||||
LDFLAGS = "-lblas -llapack";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
OMP_NUM_THREADS = 2; # required for check phase
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Quantum chemistry program for large-scale self-consistent field calculations";
|
||||
homepage = "http://www.ergoscf.org";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/source/dft/functionals.h b/source/dft/functionals.h
|
||||
index fde49ba..f7a61fc 100644
|
||||
--- a/source/dft/functionals.h
|
||||
+++ b/source/dft/functionals.h
|
||||
@@ -59,6 +59,14 @@
|
||||
#define EXTERN_C
|
||||
#endif
|
||||
|
||||
+#ifndef M_PI
|
||||
+#define M_PI 3.14159265358979323846
|
||||
+#endif
|
||||
+
|
||||
+#ifndef M_SQRT2
|
||||
+#define M_SQRT2 1.41421356237309504880
|
||||
+#endif
|
||||
+
|
||||
typedef ergo_real real;
|
||||
|
||||
#if defined(FUNC_PRECISION) && FUNC_PRECISION == 1
|
||||
22
pkgs/applications/science/chemistry/gwyddion/codegen.patch
Normal file
22
pkgs/applications/science/chemistry/gwyddion/codegen.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- gwyddion-2.55.orig/configure 2019-11-04 01:25:31.000000000 -0800
|
||||
+++ gwyddion-2.55/configure 2020-03-20 18:49:43.860452655 -0700
|
||||
@@ -18560,7 +18560,7 @@
|
||||
fi
|
||||
if test "x$embed_pygtk" = xno; then
|
||||
if test "x$PYGTK_CODEGENDIR" = 'x'; then
|
||||
- PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
|
||||
+ PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
|
||||
fi
|
||||
else
|
||||
# Some silly OSes want to remove pygtk2. We can build pygwy without
|
||||
--- gwyddion-2.55.orig/configure.ac 2019-11-04 01:25:16.000000000 -0800
|
||||
+++ gwyddion-2.55/configure.ac 2020-03-20 18:52:55.042724547 -0700
|
||||
@@ -270,7 +270,7 @@
|
||||
[embed_pygtk=yes; pygwy_warn=" (embedded pygtk2)"])
|
||||
if test "x$embed_pygtk" = xno; then
|
||||
if test "x$PYGTK_CODEGENDIR" = 'x'; then
|
||||
- PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
|
||||
+ PYGTK_CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
|
||||
fi
|
||||
else
|
||||
# Some silly OSes want to remove pygtk2. We can build pygwy without
|
||||
72
pkgs/applications/science/chemistry/gwyddion/default.nix
Normal file
72
pkgs/applications/science/chemistry/gwyddion/default.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ lib, stdenv, fetchurl, gtk2, pkg-config, fftw, file,
|
||||
pythonSupport ? false, python2Packages,
|
||||
gnome2,
|
||||
openexrSupport ? true, openexr,
|
||||
libzipSupport ? true, libzip,
|
||||
libxml2Support ? true, libxml2,
|
||||
libwebpSupport ? true, libwebp,
|
||||
# libXmu is not used if libunique is.
|
||||
libXmuSupport ? false, xorg,
|
||||
libxsltSupport ? true, libxslt,
|
||||
fitsSupport ? true, cfitsio,
|
||||
zlibSupport ? true, zlib,
|
||||
libuniqueSupport ? true, libunique,
|
||||
libpngSupport ? true, libpng,
|
||||
openglSupport ? !stdenv.isDarwin
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python2Packages) pygtk pygobject2 python;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gwyddion";
|
||||
version = "2.60";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz";
|
||||
sha256 = "sha256-38PIardlOzDrVKWvV4AiQlecTYmwYegtzRya713Au/Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config file ];
|
||||
|
||||
buildInputs = with lib;
|
||||
[ gtk2 fftw ] ++
|
||||
optional openglSupport gnome2.gtkglext ++
|
||||
optional openexrSupport openexr ++
|
||||
optional libXmuSupport xorg.libXmu ++
|
||||
optional fitsSupport cfitsio ++
|
||||
optional libpngSupport libpng ++
|
||||
optional libxsltSupport libxslt ++
|
||||
optional libxml2Support libxml2 ++
|
||||
optional libwebpSupport libwebp ++
|
||||
optional zlibSupport zlib ++
|
||||
optional libuniqueSupport libunique ++
|
||||
optional libzipSupport libzip;
|
||||
|
||||
propagatedBuildInputs = with lib;
|
||||
optionals pythonSupport [ pygtk pygobject2 python gnome2.gtksourceview ];
|
||||
|
||||
# This patch corrects problems with python support, but should apply cleanly
|
||||
# regardless of whether python support is enabled, and have no effects if
|
||||
# it is disabled.
|
||||
patches = [ ./codegen.patch ];
|
||||
meta = {
|
||||
homepage = "http://gwyddion.net/";
|
||||
|
||||
description = "Scanning probe microscopy data visualization and analysis";
|
||||
|
||||
longDescription = ''
|
||||
A modular program for SPM (scanning probe microscopy) data
|
||||
visualization and analysis. Primarily it is intended for the
|
||||
analysis of height fields obtained by scanning probe microscopy
|
||||
techniques (AFM, MFM, STM, SNOM/NSOM) and it supports a lot of
|
||||
SPM data formats. However, it can be used for general height
|
||||
field and (greyscale) image processing, for instance for the
|
||||
analysis of profilometry data or thickness maps from imaging
|
||||
spectrophotometry.
|
||||
'';
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
maintainers = [ lib.maintainers.cge ];
|
||||
};
|
||||
}
|
||||
62
pkgs/applications/science/chemistry/jmol/default.nix
Normal file
62
pkgs/applications/science/chemistry/jmol/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, unzip
|
||||
, makeDesktopItem
|
||||
, jre
|
||||
}:
|
||||
|
||||
let
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "jmol";
|
||||
exec = "jmol";
|
||||
desktopName = "JMol";
|
||||
genericName = "Molecular Modeler";
|
||||
mimeTypes = [
|
||||
"chemical/x-pdb"
|
||||
"chemical/x-mdl-molfile"
|
||||
"chemical/x-mol2"
|
||||
"chemical/seq-aa-fasta"
|
||||
"chemical/seq-na-fasta"
|
||||
"chemical/x-xyz"
|
||||
"chemical/x-mdl-sdf"
|
||||
];
|
||||
categories = [ "Graphics" "Education" "Science" "Chemistry" ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "14.32.45";
|
||||
pname = "jmol";
|
||||
|
||||
src = let
|
||||
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
||||
in fetchurl {
|
||||
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
||||
sha256 = "sha256-9bcOwORHLZfn95RFur4JdP3Djpq8K8utnWIsniqKAI4=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -i -e "4s:.*:command=${jre}/bin/java:" -e "10s:.*:jarpath=$out/share/jmol/Jmol.jar:" -e "11,21d" jmol
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/jmol" "$out/bin"
|
||||
|
||||
${unzip}/bin/unzip jsmol.zip -d "$out/share/"
|
||||
|
||||
cp *.jar jmol.sh "$out/share/jmol"
|
||||
cp -r ${desktopItem}/share/applications $out/share
|
||||
cp jmol $out/bin
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Java 3D viewer for chemical structures";
|
||||
homepage = "https://sourceforge.net/projects/jmol";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.lgpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ mounium ] ++ teams.sage.members;
|
||||
};
|
||||
}
|
||||
9
pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
Executable file
9
pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=ChemAxon License Manager
|
||||
Exec=@out@/bin/LicenseManager
|
||||
Icon=LicenseManager
|
||||
Categories=Education;Science;Chemistry;
|
||||
StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
|
||||
Comment=License manager for ChemAxon software like MarvinSketch
|
||||
10
pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
Executable file
10
pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=MarvinSketch
|
||||
Exec=@out@/bin/msketch %f
|
||||
Icon=MarvinSketch
|
||||
MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
|
||||
Categories=Education;Science;Chemistry;
|
||||
StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
|
||||
Comment=Molecular modelling, analysis and structure drawing program
|
||||
10
pkgs/applications/science/chemistry/marvin/MarvinView.desktop
Executable file
10
pkgs/applications/science/chemistry/marvin/MarvinView.desktop
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=MarvinView
|
||||
Exec=@out@/bin/mview %f
|
||||
Icon=MarvinView
|
||||
Comment=Molecule viewing program
|
||||
MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
|
||||
Categories=Education;Science;Chemistry;
|
||||
StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
|
||||
48
pkgs/applications/science/chemistry/marvin/default.nix
Normal file
48
pkgs/applications/science/chemistry/marvin/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, jre }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "marvin";
|
||||
version = "22.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
name = "marvin-${version}.deb";
|
||||
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
|
||||
sha256 = "sha256-dmG2p4KqzjLuuVw+wPWaxVoqOqba8Tx5l44PauWpqv4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
|
||||
unpackPhase = ''
|
||||
dpkg-deb -x $src opt
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
wrapBin() {
|
||||
makeWrapper $1 $out/bin/$(basename $1) \
|
||||
--set INSTALL4J_JAVA_HOME "${jre}" \
|
||||
--prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
|
||||
}
|
||||
cp -r opt $out
|
||||
mkdir -p $out/bin $out/share/pixmaps $out/share/applications
|
||||
for name in LicenseManager MarvinSketch MarvinView; do
|
||||
wrapBin $out/opt/chemaxon/marvinsuite/$name
|
||||
ln -s {$out/opt/chemaxon/marvinsuite/.install4j,$out/share/pixmaps}/$name.png
|
||||
done
|
||||
for name in cxcalc cxtrain evaluate molconvert mview msketch; do
|
||||
wrapBin $out/opt/chemaxon/marvinsuite/bin/$name
|
||||
done
|
||||
${concatStrings (map (name: ''
|
||||
substitute ${./. + "/${name}.desktop"} $out/share/applications/${name}.desktop --subst-var out
|
||||
'') [ "LicenseManager" "MarvinSketch" "MarvinView" ])}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A chemical modelling, analysis and structure drawing program";
|
||||
homepage = "https://chemaxon.com/products/marvin";
|
||||
maintainers = with maintainers; [ fusion809 ];
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
47
pkgs/applications/science/chemistry/molden/default.nix
Normal file
47
pkgs/applications/science/chemistry/molden/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, stdenv, fetchurl, which, gfortran, libGLU, xorg } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.3";
|
||||
pname = "molden";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.science.ru.nl/Molden//molden${version}.tar.gz";
|
||||
sha256 = "02qi16pz2wffn3cc47dpjqhfafzwfmb79waw4nnhfyir8a4h3cq1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ which ];
|
||||
buildInputs = [ gfortran libGLU xorg.libX11 xorg.libXmu ];
|
||||
|
||||
patches = [ ./dont_register_file_types.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./makefile --replace '-L/usr/X11R6/lib' "" \
|
||||
--replace '-I/usr/X11R6/include' "" \
|
||||
--replace '/usr/local/' $out/ \
|
||||
--replace 'sudo' "" \
|
||||
--replace '-C surf depend' '-C surf' \
|
||||
--replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
|
||||
|
||||
substituteInPlace ambfor/makefile --replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
|
||||
|
||||
sed -in '/^# DO NOT DELETE THIS LINE/q;' surf/Makefile
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Display and manipulate molecular structures";
|
||||
homepage = "http://www3.cmbi.umcn.nl/molden/";
|
||||
license = {
|
||||
fullName = "Free for academic/non-profit use";
|
||||
url = "http://www3.cmbi.umcn.nl/molden/CopyRight.html";
|
||||
free = false;
|
||||
};
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/makefile b/makefile
|
||||
index 58a9e74..64615b6 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -32,8 +32,6 @@ os :=
|
||||
ifeq ($(uname), Linux)
|
||||
os := $(shell head -n 1 /etc/issue | cut -d" " -f1)
|
||||
ifeq ($(os), Ubuntu)
|
||||
- EXTEN = exten
|
||||
- EXTENZ = exten2
|
||||
LIBSG = -L/usr/X11R6/lib -lGLU -lGL -lX11 -lm
|
||||
endif
|
||||
ifeq ($(os), Debian)
|
||||
@@ -278,7 +276,7 @@ LIBSOGL = -lglut -lGLU -lGL -lXmu -lX11 -lm
|
||||
#
|
||||
#LIBSG = -L/usr/X11R6/lib -Wl,-framework -Wl,GLUT -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa -lGLU -lGL -lXmu -lX11 -lm
|
||||
|
||||
-all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf $(EXTEN)
|
||||
+all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
|
||||
xwin.o: xwin.c rots.h
|
||||
xwingl.o: xwin.c rots.h
|
||||
|
||||
@@ -344,5 +342,5 @@ exten:
|
||||
exten2:
|
||||
./register_extension.sh /usr/local/bin
|
||||
|
||||
-install: $(EXTENZ)
|
||||
+install:
|
||||
sudo install -t /usr/local/bin -m 755 molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
|
||||
75
pkgs/applications/science/chemistry/octopus/default.nix
Normal file
75
pkgs/applications/science/chemistry/octopus/default.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ lib, stdenv, fetchFromGitLab, gfortran, perl, procps
|
||||
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
|
||||
, python3
|
||||
, enableFma ? stdenv.hostPlatform.fmaSupport
|
||||
, enableFma4 ? stdenv.hostPlatform.fma4Support
|
||||
, enableAvx ? stdenv.hostPlatform.avx2Support
|
||||
, enableAvx512 ? stdenv.hostPlatform.avx512Support
|
||||
}:
|
||||
|
||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "octopus";
|
||||
version = "11.4";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "octopus-code";
|
||||
repo = "octopus";
|
||||
rev = version;
|
||||
sha256 = "1z423sjpc4ajjy3s7623z3rfwmp2hgis7iiiy8gb5apw73k33dyv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl
|
||||
procps
|
||||
autoreconfHook
|
||||
gfortran
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libyaml
|
||||
libxc
|
||||
blas
|
||||
lapack
|
||||
gsl
|
||||
fftw
|
||||
netcdf
|
||||
arpack
|
||||
(python3.withPackages (ps: [ ps.pyyaml ]))
|
||||
];
|
||||
|
||||
configureFlags = with lib; [
|
||||
"--with-yaml-prefix=${libyaml}"
|
||||
"--with-blas=-lblas"
|
||||
"--with-lapack=-llapack"
|
||||
"--with-fftw-prefix=${fftw.dev}"
|
||||
"--with-gsl-prefix=${gsl}"
|
||||
"--with-libxc-prefix=${libxc}"
|
||||
"--enable-openmp"
|
||||
] ++ optional enableFma "--enable-fma3"
|
||||
++ optional enableFma4 "--enable-fma4"
|
||||
++ optional enableAvx "--enable-avx"
|
||||
++ optional enableAvx512 "--enable-avx512";
|
||||
|
||||
doCheck = false;
|
||||
checkTarget = "check-short";
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
patchShebangs testsuite/oct-run_testsuite.sh
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Real-space time dependent density-functional theory code";
|
||||
homepage = "https://octopus-code.org";
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
license = with licenses; [ gpl2Only asl20 lgpl3Plus bsd3 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 276ae4e..5e56176 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1304,9 +1304,9 @@ if (LINALG STREQUAL "MKL")
|
||||
endif ()
|
||||
else ()
|
||||
if (ADDRMODE EQUAL 64)
|
||||
- set (libpath "${MKLROOT}/lib/intel64")
|
||||
+ set (libpath "${MKLROOT}/lib")
|
||||
elseif (ADDRMODE EQUAL 32)
|
||||
- set (libpath "${MKLROOT}/lib/ia32")
|
||||
+ set (libpath "${MKLROOT}/lib")
|
||||
endif ()
|
||||
endif ()
|
||||
set (MKL_LIBRARY_PATH ${libpath} CACHE PATH "location of MKL libraries." FORCE)
|
||||
@@ -1380,7 +1380,7 @@ if (LINALG STREQUAL "MKL")
|
||||
find_library (LIBMKL_BLACS NAMES "mkl_blacs_intelmpi_ilp64"
|
||||
PATHS ${MKL_LIBRARY_PATH} NO_DEFAULT_PATH)
|
||||
elseif (MPI_IMPLEMENTATION STREQUAL "mpich")
|
||||
- find_library (LIBMKL_BLACS NAMES "mkl_blacs_ilp64"
|
||||
+ find_library (LIBMKL_BLACS NAMES "mkl_blacs_intelmpi_ilp64"
|
||||
PATHS ${MKL_LIBRARY_PATH} NO_DEFAULT_PATH)
|
||||
endif ()
|
||||
105
pkgs/applications/science/chemistry/openmolcas/default.nix
Normal file
105
pkgs/applications/science/chemistry/openmolcas/default.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl
|
||||
, blas-ilp64, hdf5-cpp, python3, texlive
|
||||
, armadillo, libxc, makeWrapper
|
||||
# Note that the CASPT2 module is broken with MPI
|
||||
# See https://gitlab.com/Molcas/OpenMolcas/-/issues/169
|
||||
, enableMpi ? false
|
||||
, mpi, globalarrays
|
||||
} :
|
||||
|
||||
assert blas-ilp64.isILP64;
|
||||
assert lib.elem blas-ilp64.passthru.implementation [ "openblas" "mkl" ];
|
||||
|
||||
let
|
||||
python = python3.withPackages (ps : with ps; [ six pyparsing numpy h5py ]);
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "openmolcas";
|
||||
version = "22.02";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "Molcas";
|
||||
repo = "OpenMolcas";
|
||||
# The tag keeps moving, fix a hash instead
|
||||
rev = "f8df69cf87b241a15ebc82d72a8f9a031a385dd4"; # 2022-02-10
|
||||
sha256 = "0p2xj8kgqdk5kb1jv5k77acbiqkbl2sh971jnz9p00cmbh556r6a";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Required to handle openblas multiple outputs
|
||||
./openblasPath.patch
|
||||
# Required for MKL builds
|
||||
./MKL-MPICH.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl
|
||||
gfortran
|
||||
cmake
|
||||
texlive.combined.scheme-minimal
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
blas-ilp64.passthru.provider
|
||||
hdf5-cpp
|
||||
python
|
||||
armadillo
|
||||
libxc
|
||||
] ++ lib.optionals enableMpi [
|
||||
mpi
|
||||
globalarrays
|
||||
];
|
||||
|
||||
passthru = lib.optionalAttrs enableMpi { inherit mpi; };
|
||||
|
||||
cmakeFlags = [
|
||||
"-DOPENMP=ON"
|
||||
"-DLINALG=OpenBLAS"
|
||||
"-DTOOLS=ON"
|
||||
"-DHDF5=ON"
|
||||
"-DFDE=ON"
|
||||
"-DEXTERNAL_LIBXC=${libxc}"
|
||||
] ++ lib.optionals (blas-ilp64.passthru.implementation == "openblas") [
|
||||
"-DOPENBLASROOT=${blas-ilp64.passthru.provider.dev}" "-DLINALG=OpenBLAS"
|
||||
] ++ lib.optionals (blas-ilp64.passthru.implementation == "mkl") [
|
||||
"-DMKLROOT=${blas-ilp64.passthru.provider}" "-DLINALG=MKL"
|
||||
] ++ lib.optionals enableMpi [
|
||||
"-DGA=ON"
|
||||
"-DMPI=ON"
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString enableMpi ''
|
||||
export GAROOT=${globalarrays};
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
# The Makefile will install pymolcas during the build grrr.
|
||||
mkdir -p $out/bin
|
||||
export PATH=$PATH:$out/bin
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mv $out/pymolcas $out/bin
|
||||
find $out/Tools -type f -exec mv \{} $out/bin \;
|
||||
rm -r $out/Tools
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Wrong store path in shebang (no Python pkgs), force re-patching
|
||||
sed -i "1s:/.*:/usr/bin/env python:" $out/bin/pymolcas
|
||||
patchShebangs $out/bin
|
||||
|
||||
wrapProgram $out/bin/pymolcas --set MOLCAS $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Advanced quantum chemistry software package";
|
||||
homepage = "https://gitlab.com/Molcas/OpenMolcas";
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
license = licenses.lgpl21Only;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "pymolcas";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 276ae4e2..db13e6e3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1507,7 +1507,6 @@ if (LINALG STREQUAL "OpenBLAS")
|
||||
NAMES openblas
|
||||
PATHS ${OPENBLASROOT}
|
||||
PATH_SUFFIXES lib
|
||||
- NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if (NOT LIBOPENBLAS)
|
||||
77
pkgs/applications/science/chemistry/pymol/default.nix
Normal file
77
pkgs/applications/science/chemistry/pymol/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, makeDesktopItem
|
||||
, python3
|
||||
, python3Packages
|
||||
, netcdf
|
||||
, glew
|
||||
, glm
|
||||
, freeglut
|
||||
, libpng
|
||||
, libxml2
|
||||
, tk
|
||||
, freetype
|
||||
, msgpack
|
||||
}:
|
||||
let
|
||||
pname = "pymol";
|
||||
description = "A Python-enhanced molecular graphics tool";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
desktopName = "PyMol Molecular Graphics System";
|
||||
genericName = "Molecular Modeler";
|
||||
comment = description;
|
||||
icon = pname;
|
||||
mimeTypes = [
|
||||
"chemical/x-pdb"
|
||||
"chemical/x-mdl-molfile"
|
||||
"chemical/x-mol2"
|
||||
"chemical/seq-aa-fasta"
|
||||
"chemical/seq-na-fasta"
|
||||
"chemical/x-xyz"
|
||||
"chemical/x-mdl-sdf"
|
||||
];
|
||||
categories = [ "Graphics" "Education" "Science" "Chemistry" ];
|
||||
};
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
inherit pname;
|
||||
version = "2.5.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "schrodinger";
|
||||
repo = "pymol-open-source";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-JdsgcVF1w1xFPZxVcyS+GcWg4a1Bd4SvxFOuSdlz9SM=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3Packages.numpy glew glm freeglut libpng libxml2 tk freetype msgpack netcdf ];
|
||||
NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
setupPyBuildFlags = [ "--glut" ];
|
||||
|
||||
installPhase = ''
|
||||
python setup.py install --home="$out"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = with python3Packages; ''
|
||||
wrapProgram $out/bin/pymol \
|
||||
--prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]}
|
||||
|
||||
mkdir -p "$out/share/icons/"
|
||||
ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
|
||||
cp -r "${desktopItem}/share/applications/" "$out/share/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
inherit description;
|
||||
homepage = "https://www.pymol.org/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ samlich ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, gfortran
|
||||
, fftw
|
||||
, blas
|
||||
, lapack
|
||||
, useMpi ? false
|
||||
, mpi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.6";
|
||||
pname = "quantum-espresso";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "QEF";
|
||||
repo = "q-e";
|
||||
rev = "qe-${version}";
|
||||
sha256 = "1mkfmw0fq1dabplzdn6v1abhw0ds55gzlvbx3a9brv493whk21yp";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit mpi;
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs configure
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
|
||||
buildInputs = [ fftw blas lapack ]
|
||||
++ (lib.optionals useMpi [ mpi ]);
|
||||
|
||||
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
|
||||
|
||||
makeFlags = [ "all" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Electronic-structure calculations and materials modeling at the nanoscale";
|
||||
longDescription = ''
|
||||
Quantum ESPRESSO is an integrated suite of Open-Source computer codes for
|
||||
electronic-structure calculations and materials modeling at the
|
||||
nanoscale. It is based on density-functional theory, plane waves, and
|
||||
pseudopotentials.
|
||||
'';
|
||||
homepage = "https://www.quantum-espresso.org/";
|
||||
license = licenses.gpl2;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
};
|
||||
}
|
||||
85
pkgs/applications/science/chemistry/siesta/default.nix
Normal file
85
pkgs/applications/science/chemistry/siesta/default.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ lib, stdenv
|
||||
, gfortran, blas, lapack, scalapack
|
||||
, useMpi ? false
|
||||
, mpi
|
||||
, fetchFromGitLab
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.1.5";
|
||||
pname = "siesta";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "siesta-project";
|
||||
repo = "siesta";
|
||||
rev = "v${version}";
|
||||
sha256 = "0lz8rfl5xwdj17zn7a30ipi7cgjwqki21a7wg9rdg7iwx27bpnmg";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Src/siesta_init.F --replace '/bin/rm' 'rm'
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit mpi;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
|
||||
buildInputs = [ blas lapack ]
|
||||
++ lib.optionals useMpi [ mpi scalapack ];
|
||||
|
||||
enableParallelBuilding = false; # Started making trouble with gcc-11
|
||||
|
||||
# Must do manualy becuase siesta does not do the regular
|
||||
# ./configure; make; make install
|
||||
configurePhase = ''
|
||||
cd Obj
|
||||
sh ../Src/obj_setup.sh
|
||||
cp gfortran.make arch.make
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
# See https://gitlab.com/siesta-project/siesta/-/commit/a10bf1628e7141ba263841889c3503c263de1582
|
||||
# This may be fixed in the next release.
|
||||
makeFlagsArray=(
|
||||
FFLAGS="-fallow-argument-mismatch"
|
||||
)
|
||||
'' + (if useMpi then ''
|
||||
makeFlagsArray+=(
|
||||
CC="mpicc" FC="mpifort"
|
||||
FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="."
|
||||
COMP_LIBS="" LIBS="-lblas -llapack -lscalapack"
|
||||
);
|
||||
'' else ''
|
||||
makeFlagsArray+=(
|
||||
COMP_LIBS="" LIBS="-lblas -llapack"
|
||||
);
|
||||
'');
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a siesta $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A first-principles materials simulation code using DFT";
|
||||
longDescription = ''
|
||||
SIESTA is both a method and its computer program
|
||||
implementation, to perform efficient electronic structure
|
||||
calculations and ab initio molecular dynamics simulations of
|
||||
molecules and solids. SIESTA's efficiency stems from the use
|
||||
of strictly localized basis sets and from the implementation
|
||||
of linear-scaling algorithms which can be applied to suitable
|
||||
systems. A very important feature of the code is that its
|
||||
accuracy and cost can be tuned in a wide range, from quick
|
||||
exploratory calculations to highly accurate simulations
|
||||
matching the quality of other approaches, such as plane-wave
|
||||
and all-electron methods.
|
||||
'';
|
||||
homepage = "https://siesta-project.org/siesta/";
|
||||
license = licenses.gpl2;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue