nixpkgs/pkgs/by-name/li/libngspice/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.2 KiB
Nix
Raw Normal View History

2023-05-25 09:16:36 +01:00
{ lib
, stdenv
, fetchurl
, flex
, bison
, fftw
, withNgshared ? true
, libXaw
, libXext
2024-07-14 01:40:02 +01:00
, llvmPackages
, readline
2023-05-25 09:16:36 +01:00
}:
2019-01-03 21:16:51 +00:00
stdenv.mkDerivation rec {
2023-05-25 09:16:36 +01:00
pname = "${lib.optionalString withNgshared "lib"}ngspice";
2024-07-14 01:40:02 +01:00
version = "43";
src = fetchurl {
2019-01-03 21:16:51 +00:00
url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz";
2024-07-14 01:40:02 +01:00
hash = "sha256-FN1qbwhTHyBRwTrmN5CkVwi9Q/PneIamqEiYwpexNpk=";
};
2023-05-25 09:16:36 +01:00
nativeBuildInputs = [
flex
bison
];
2023-05-25 09:16:36 +01:00
buildInputs = [
fftw
2024-07-14 01:40:02 +01:00
readline
2023-05-25 09:16:36 +01:00
] ++ lib.optionals (!withNgshared) [
libXaw
libXext
2024-07-14 01:40:02 +01:00
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.openmp
2023-05-25 09:16:36 +01:00
];
configureFlags = lib.optionals withNgshared [
"--with-ngshared"
] ++ [
"--enable-xspice"
"--enable-cider"
2024-10-30 13:43:54 +00:00
"--enable-osdi"
2023-05-25 09:16:36 +01:00
];
2023-05-25 15:36:44 +01:00
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 ];
2020-08-15 17:53:54 +01:00
platforms = platforms.unix;
};
}