forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, which, gfortran, libGLU, xorg } :
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "6.3";
|
|
pname = "molden";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.cmbi.ru.nl/pub/molgraph/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'
|
|
sed -in '/^# DO NOT DELETE THIS LINE/q;' surf/Makefile
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/bin
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "Display and manipulate molecular structures";
|
|
homepage = "http://www.cmbi.ru.nl/molden/";
|
|
license = {
|
|
fullName = "Free for academic/non-profit use";
|
|
url = "http://www.cmbi.ru.nl/molden/CopyRight.html";
|
|
free = false;
|
|
};
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
};
|
|
}
|
|
|