nixpkgs/pkgs/by-name/mo/molden/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl, which, gfortran, libGLU, xorg } :
stdenv.mkDerivation rec {
version = "6.3";
pname = "molden";
src = fetchurl {
url = "https://ftp.science.ru.nl/Molden//molden${version}.tar.gz";
sha256 = "02qi16pz2wffn3cc47dpjqhfafzwfmb79waw4nnhfyir8a4h3cq1";
};
nativeBuildInputs = [ which ];
buildInputs = [ gfortran libGLU xorg.libX11 xorg.libXmu ];
patches = [ ./dont_register_file_types.patch ];
postPatch = ''
substituteInPlace ./makefile --replace '-L/usr/X11R6/lib' "" \
--replace '-I/usr/X11R6/include' "" \
--replace '/usr/local/' $out/ \
--replace 'sudo' "" \
--replace '-C surf depend' '-C surf' \
--replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
substituteInPlace ambfor/makefile --replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
sed -in '/^# DO NOT DELETE THIS LINE/q;' surf/Makefile
'';
preInstall = ''
mkdir -p $out/bin
'';
enableParallelBuilding = false;
meta = with lib; {
description = "Display and manipulate molecular structures";
homepage = "http://www3.cmbi.umcn.nl/molden/";
license = {
fullName = "Free for academic/non-profit use";
url = "http://www3.cmbi.umcn.nl/molden/CopyRight.html";
free = false;
};
platforms = platforms.linux;
maintainers = with maintainers; [ markuskowa ];
};
}