18 description = "A Python-enhanced molecular graphics tool";
20 desktopItem = makeDesktopItem {
23 desktopName = "PyMol Molecular Graphics System";
24 genericName = "Molecular Modeler";
25 comment = description;
29 "chemical/x-mdl-molfile"
31 "chemical/seq-aa-fasta"
32 "chemical/seq-na-fasta"
36 categories = [ "Graphics" "Education" "Science" "Chemistry" ];
39 python3Packages.buildPythonApplication rec {
42 src = fetchFromGitHub {
43 owner = "schrodinger";
44 repo = "pymol-open-source";
46 sha256 = "sha256-JdsgcVF1w1xFPZxVcyS+GcWg4a1Bd4SvxFOuSdlz9SM=";
49 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
50 buildInputs = [ python3Packages.numpy python3Packages.pyqt5 glew glm libpng libxml2 freetype msgpack netcdf ];
51 env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
52 hardeningDisable = [ "format" ];
55 python setup.py install --home="$out"
59 postInstall = with python3Packages; ''
60 wrapProgram $out/bin/pymol \
61 --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ pyqt5 pyqt5.pyqt5_sip ]}
63 mkdir -p "$out/share/icons/"
64 ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
65 cp -r "${desktopItem}/share/applications/" "$out/share/"
69 wrapQtApp "$out/bin/pymol"
74 homepage = "https://www.pymol.org/";
75 license = licenses.mit;
76 maintainers = with maintainers; [ samlich ];