mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
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.
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, lib
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fasthenry";
|
|
# later versions are Windows only ports
|
|
# nixpkgs-update: no auto update
|
|
version = "3.0.1";
|
|
|
|
# we don't use the original MIT code at
|
|
# https://www.rle.mit.edu/cpg/research_codes.htm
|
|
# since the FastFieldSolvers S.R.L. version includes
|
|
# a couple of bug fixes
|
|
src = fetchFromGitHub {
|
|
owner = "ediloren";
|
|
repo = "FastHenry2";
|
|
rev = "R${version}";
|
|
sha256 = "017kcri69zhyhii59kxj1ak0gyfn7jf0qp6p2x3nnljia8njdkcc";
|
|
};
|
|
|
|
dontConfigure = true;
|
|
|
|
preBuild = ''
|
|
makeFlagsArray=(
|
|
CC="gcc"
|
|
RM="rm"
|
|
SHELL="sh"
|
|
"all"
|
|
)
|
|
'' + (if stdenv.hostPlatform.isx86_64 then ''
|
|
makeFlagsArray+=(
|
|
CFLAGS="-fcommon -O -DFOUR -m64"
|
|
);
|
|
'' else ''
|
|
makeFlagsArray+=(
|
|
CFLAGS="-fcommon -O -DFOUR"
|
|
);
|
|
'');
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -r bin/* $out/bin/
|
|
mkdir -p $out/share/doc/${pname}-${version}
|
|
cp -r doc/* $out/share/doc/${pname}-${version}
|
|
mkdir -p $out/share/${pname}-${version}/examples
|
|
cp -r examples/* $out/share/${pname}-${version}/examples
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Multipole-accelerated inductance analysis program";
|
|
longDescription = ''
|
|
Fasthenry is an inductance extraction program based on a
|
|
multipole-accelerated algorithm.'';
|
|
homepage = "https://www.fastfieldsolvers.com/fasthenry2.htm";
|
|
license = licenses.lgpl2Only;
|
|
maintainers = with maintainers; [ fbeffa ];
|
|
platforms = intersectLists (platforms.linux) (platforms.x86_64 ++ platforms.x86);
|
|
};
|
|
}
|