diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-06 16:18:51 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-06 16:18:51 +0000 |
commit | 9afbeb71219925d54b72b0170b2e3be76bad1e28 (patch) | |
tree | d80c6bf0441de5412475859de320806b0e5a454c /nixpkgs/pkgs/applications/science/chemistry/gwyddion | |
parent | 75eafe97f7df0d653bec67f3962214d7c357831f (diff) | |
parent | ae6bdcc53584aaf20211ce1814bea97ece08a248 (diff) | |
download | nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.gz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.bz2 nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.lz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.xz nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.tar.zst nixlib-9afbeb71219925d54b72b0170b2e3be76bad1e28.zip |
Merge commit 'ae6bdcc53584aaf20211ce1814bea97ece08a248'
# Conflicts: # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/science/chemistry/gwyddion')
-rw-r--r-- | nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch | 22 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix | 71 |
2 files changed, 84 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch new file mode 100644 index 000000000000..eb306d99f8a3 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/codegen.patch @@ -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 diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix index 12007c940b3d..cd8b93c9aac7 100644 --- a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix +++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix @@ -1,17 +1,69 @@ -{ stdenv, fetchurl, gtk2, pkgconfig }: +{ stdenv, fetchurl, gtk2, pkg-config, fftw, file, + pythonSupport ? false, pythonPackages ? null, + gnome2 ? null, + openexrSupport ? true, openexr ? null, + libzipSupport ? true, libzip ? null, + libxml2Support ? true, libxml2 ? null, + libwebpSupport ? true, libwebp ? null, + # libXmu is not used if libunique is. + libXmuSupport ? false, xorg ? null, + libxsltSupport ? true, libxslt ? null, + fitsSupport ? true, cfitsio ? null, + zlibSupport ? true, zlib ? null, + libuniqueSupport ? true, libunique ? null, + libpngSupport ? true, libpng ? null, + openglSupport ? true +}: -with stdenv.lib; +assert openexrSupport -> openexr != null; +assert libzipSupport -> libzip != null; +assert libxml2Support -> libxml2 != null; +assert libwebpSupport -> libwebp != null; +assert libXmuSupport -> xorg != null; +assert libxsltSupport -> libxslt != null; +assert fitsSupport -> cfitsio != null; +assert zlibSupport -> zlib != null; +assert libuniqueSupport -> libunique != null; +assert libpngSupport -> libpng != null; +assert openglSupport -> gnome2 != null; +assert pythonSupport -> (pythonPackages != null && gnome2 != null); -let version = "2.48"; in -stdenv.mkDerivation { +let + inherit (pythonPackages) pygtk pygobject2 python; + +in + +stdenv.mkDerivation rec { pname = "gwyddion"; - inherit version; + version = "2.55"; src = fetchurl { - url = "mirror://sourceforge/gwyddion/files/gwyddion/${version}/gwyddion-${version}.tar.xz"; - sha256 = "119iw58ac2wn4cas6js8m7r1n4gmmkga6b1y711xzcyjp9hshgwx"; + url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz"; + sha256 = "0l00zszvginpriv12idc0y1x28qmicdmrwkqa007srkxvrdgxwdi"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gtk2 ]; + + nativeBuildInputs = [ pkg-config file ]; + + buildInputs = with stdenv.lib; + [ gtk2 fftw ] ++ + optionals 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 stdenv.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/; @@ -29,5 +81,6 @@ stdenv.mkDerivation { ''; license = stdenv.lib.licenses.gpl2; platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.cge ]; }; } |