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"
44 python3Packages.buildPythonApplication rec {
49 src = fetchFromGitHub {
50 owner = "schrodinger";
51 repo = "pymol-open-source";
53 hash = "sha256-GhTHxacjGN7XklZ6gileBMRZAGq4Pp4JknNL+qGqrVE=";
57 substituteInPlace setup.py \
58 --replace-fail "self.install_libbase" '"${placeholder "out"}/${python3Packages.python.sitePackages}"'
62 python3Packages.setuptools
65 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
77 env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
82 wrapProgram $out/bin/pymol \
83 --prefix PYTHONPATH : ${
84 lib.makeSearchPathOutput "lib" python3Packages.python.sitePackages [
90 mkdir -p "$out/share/icons/"
91 ln -s $out/${python3Packages.python.sitePackages}/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
93 + lib.optionalString stdenv.hostPlatform.isLinux ''
94 cp -r "${desktopItem}/share/applications/" "$out/share/"
97 pythonImportsCheck = [
101 nativeCheckInputs = with python3Packages; [
102 python3Packages.msgpack
107 # some tests hang for some reason
108 doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
110 disabledTestPaths = [
111 # require biopython which is broken as of 2024-04-20
112 "tests/api/seqalign.py"
116 # the output image does not exactly match
120 # requires collada2gltf which is not included in nixpkgs
122 # require mmtf-cpp which does not support darwin
124 "testSave_symmetry__mmtf"
131 __darwinAllowLocalNetworking = true;
134 wrapQtApp "$out/bin/pymol"
139 mainProgram = "pymol";
140 homepage = "https://www.pymol.org/";
141 license = licenses.mit;
142 maintainers = with maintainers; [