2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, gtk2, pkg-config, fftw, file,
|
2022-05-18 14:49:53 +00:00
|
|
|
gnome2,
|
|
|
|
openexrSupport ? true, openexr,
|
|
|
|
libzipSupport ? true, libzip,
|
|
|
|
libxml2Support ? true, libxml2,
|
|
|
|
libwebpSupport ? true, libwebp,
|
2020-04-24 23:36:52 +00:00
|
|
|
# libXmu is not used if libunique is.
|
2022-05-18 14:49:53 +00:00
|
|
|
libXmuSupport ? false, xorg,
|
|
|
|
libxsltSupport ? true, libxslt,
|
|
|
|
fitsSupport ? true, cfitsio,
|
|
|
|
zlibSupport ? true, zlib,
|
|
|
|
libuniqueSupport ? true, libunique,
|
|
|
|
libpngSupport ? true, libpng,
|
2024-09-26 11:04:55 +00:00
|
|
|
openglSupport ? !stdenv.hostPlatform.isDarwin, libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gwyddion";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.66";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz";
|
2024-06-20 14:57:18 +00:00
|
|
|
sha256 = "sha256-N3vtzSsNjRM6MpaG2p9fkYB/8dR5N/mZEZXx6GN5LVI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-01-17 00:15:33 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ pkg-config file ];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = [ gtk2 fftw ] ++
|
|
|
|
lib.optionals openglSupport [ gnome2.gtkglext libGL ] ++
|
|
|
|
lib.optional openexrSupport openexr ++
|
|
|
|
lib.optional libXmuSupport xorg.libXmu ++
|
|
|
|
lib.optional fitsSupport cfitsio ++
|
|
|
|
lib.optional libpngSupport libpng ++
|
|
|
|
lib.optional libxsltSupport libxslt ++
|
|
|
|
lib.optional libxml2Support libxml2 ++
|
|
|
|
lib.optional libwebpSupport libwebp ++
|
|
|
|
lib.optional zlibSupport zlib ++
|
|
|
|
lib.optional libuniqueSupport libunique ++
|
|
|
|
lib.optional libzipSupport libzip;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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/";
|
|
|
|
|
|
|
|
description = "Scanning probe microscopy data visualization and analysis";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
A modular program for SPM (scanning probe microscopy) data
|
|
|
|
visualization and analysis. Primarily it is intended for the
|
|
|
|
analysis of height fields obtained by scanning probe microscopy
|
|
|
|
techniques (AFM, MFM, STM, SNOM/NSOM) and it supports a lot of
|
|
|
|
SPM data formats. However, it can be used for general height
|
|
|
|
field and (greyscale) image processing, for instance for the
|
|
|
|
analysis of profilometry data or thickness maps from imaging
|
|
|
|
spectrophotometry.
|
|
|
|
'';
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = [ ];
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|