Merge pull request #78437 from samlich/pymol

pymol: 2.1.0 -> 2.3.0
This commit is contained in:
markuskowa 2020-01-25 23:44:48 +01:00 committed by GitHub
commit a30a49ca0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 19 deletions

View File

@ -6187,6 +6187,16 @@
githubId = 6022042; githubId = 6022042;
name = "Sam Parkinson"; name = "Sam Parkinson";
}; };
samlich = {
email = "nixos@samli.ch";
github = "samlich";
githubId = 1349989;
name = "samlich";
keys = [{
longkeyid = "rsa4096/B1568953B1939F1C";
fingerprint = "AE8C 0836 FDF6 3FFC 9580 C588 B156 8953 B193 9F1C";
}];
};
samrose = { samrose = {
email = "samuel.rose@gmail.com"; email = "samuel.rose@gmail.com";
github = "samrose"; github = "samrose";

View File

@ -1,15 +1,10 @@
{ stdenv, fetchurl, makeDesktopItem { lib, stdenv, fetchurl, fetchFromGitHub, makeDesktopItem
, python3, python3Packages , python3, python3Packages
, glew, freeglut, libpng, libxml2, tk, freetype, msgpack }: , glew, glm, freeglut, libpng, libxml2, tk, freetype, msgpack }:
with stdenv.lib;
let let
pname = "pymol"; pname = "pymol";
ver_maj = "2";
ver_min = "1";
version = "${ver_maj}.${ver_min}.0";
description = "A Python-enhanced molecular graphics tool"; description = "A Python-enhanced molecular graphics tool";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
@ -18,35 +13,45 @@ let
desktopName = "PyMol Molecular Graphics System"; desktopName = "PyMol Molecular Graphics System";
genericName = "Molecular Modeler"; genericName = "Molecular Modeler";
comment = description; comment = description;
icon = pname;
mimeType = "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;"; mimeType = "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;"; categories = "Graphics;Education;Science;Chemistry;";
}; };
in in
python3Packages.buildPythonApplication { python3Packages.buildPythonApplication rec {
name = "pymol-${version}"; inherit pname;
src = fetchurl { version = "2.3.0";
url = "mirror://sourceforge/project/pymol/pymol/${ver_maj}/pymol-v${version}.tar.bz2"; src = fetchFromGitHub {
sha256 = "1qpacd5w4r9a0nm5iqmkd92ym3ai00dp7v61cwd6jgakk6wfps3s"; owner = "schrodinger";
repo = "pymol-open-source";
rev = "v${version}";
sha256 = "175cqi6gfmvv49i3ws19254m7ljs53fy6y82fm1ywshq2h2c93jh";
}; };
buildInputs = [ python3Packages.numpy glew freeglut libpng libxml2 tk freetype msgpack ]; buildInputs = [ python3Packages.numpy glew glm freeglut libpng libxml2 tk freetype msgpack ];
NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
hardeningDisable = [ "format" ];
setupPyBuildFlags = [ "--glut" ];
installPhase = '' installPhase = ''
python setup.py install --home=$out python setup.py install --home="$out"
cp -r ${desktopItem}/share/ $out/
runHook postInstall runHook postInstall
''; '';
postInstall = with python3Packages; '' postInstall = with python3Packages; ''
wrapProgram $out/bin/pymol \ wrapProgram $out/bin/pymol \
--prefix PYTHONPATH : ${makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]} --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 = { meta = with lib; {
description = description; description = description;
homepage = https://www.pymol.org/; homepage = https://www.pymol.org/;
license = licenses.psfl; license = licenses.mit;
broken = true; maintainers = with maintainers; [ samlich ];
}; };
} }