pymol: 2.1.0 -> 2.3.0

This commit is contained in:
samlich 2020-01-24 19:42:59 +00:00
parent 24b7d0de7b
commit 97410b59f3
No known key found for this signature in database
GPG key ID: B1568953B1939F1C

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 {
@ -22,15 +17,20 @@ let
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 -Wno-error=format-security";
setupPyBuildFlags = [ "--glut" ];
installPhase = '' installPhase = ''
python setup.py install --home=$out python setup.py install --home=$out
@ -40,13 +40,12 @@ python3Packages.buildPythonApplication {
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 ]}
''; '';
meta = { meta = {
description = description; description = description;
homepage = https://www.pymol.org/; homepage = https://www.pymol.org/;
license = licenses.psfl; license = lib.licenses.psfl;
broken = true;
}; };
} }