Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.2 KiB
Nix
66 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
flex,
|
|
bison,
|
|
fftw,
|
|
withNgshared ? true,
|
|
libXaw,
|
|
libXext,
|
|
llvmPackages,
|
|
readline,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "${lib.optionalString withNgshared "lib"}ngspice";
|
|
version = "45";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz";
|
|
hash = "sha256-8arYq6woKKe3HaZkEd6OQGUk518wZuRnVUOcSQRC1zQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
flex
|
|
bison
|
|
];
|
|
|
|
buildInputs = [
|
|
fftw
|
|
readline
|
|
]
|
|
++ lib.optionals (!withNgshared) [
|
|
libXaw
|
|
libXext
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
llvmPackages.openmp
|
|
];
|
|
|
|
configureFlags =
|
|
lib.optionals withNgshared [
|
|
"--with-ngshared"
|
|
]
|
|
++ [
|
|
"--enable-xspice"
|
|
"--enable-cider"
|
|
"--enable-osdi"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "Next Generation Spice (Electronic Circuit Simulator)";
|
|
mainProgram = "ngspice";
|
|
homepage = "http://ngspice.sourceforge.net";
|
|
license = with licenses; [
|
|
bsd3
|
|
gpl2Plus
|
|
lgpl2Plus
|
|
]; # See https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/COPYING
|
|
maintainers = with maintainers; [ bgamari ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|