This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
43 lines
817 B
Nix
43 lines
817 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "f2c";
|
|
version = "20240312";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.netlib.org/f2c/src.tgz";
|
|
sha256 = "sha256-TTPve2fe31/Ad+xFAWy6NUIes2QyUi6NjFucN0pdb5k=";
|
|
};
|
|
|
|
makeFlags = [
|
|
"-f"
|
|
"makefile.u"
|
|
];
|
|
|
|
# Ensure xsum binary is built from scratch
|
|
preBuild = "rm xsum";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
install -m755 f2c $out/bin
|
|
install -m755 xsum $out/bin
|
|
install f2c.1t $out/share/man/man1
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Convert Fortran 77 source code to C";
|
|
homepage = "https://www.netlib.org/f2c/";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.markuskowa ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|