summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-03-22 17:58:57 -0400
committerBen Gamari <ben@smart-cactus.org>2018-03-25 19:55:40 -0400
commita62fffd9a5c9441235b90c68dbd7bcba34940b6a (patch)
treec6d89aa83396689112fd25ad03a0bd893c852907 /pkgs/applications/science
parent8cbf295b6c1d33fded6a78c7665f980bc2bb72d4 (diff)
downloadnixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar.gz
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar.bz2
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar.lz
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar.xz
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.tar.zst
nixlib-a62fffd9a5c9441235b90c68dbd7bcba34940b6a.zip
ngspice: Move shared library to a new derivation
It turns out that the build system does not support building both the
command-line tool and the shared library at the same time. Consequently
the ngspice derivation has not provided the command-line tools since the
shared library was enabled in #31166.
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/electronics/kicad/unstable.nix6
-rw-r--r--pkgs/applications/science/electronics/ngspice/default.nix9
2 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/applications/science/electronics/kicad/unstable.nix b/pkgs/applications/science/electronics/kicad/unstable.nix
index 21eddde82672..7209ee3edf60 100644
--- a/pkgs/applications/science/electronics/kicad/unstable.nix
+++ b/pkgs/applications/science/electronics/kicad/unstable.nix
@@ -3,10 +3,12 @@
 , doxygen, pcre, libpthreadstubs, libXdmcp
 
 , oceSupport ? true, opencascade_oce
-, ngspiceSupport ? true, ngspice
+, ngspiceSupport ? true, libngspice
 , scriptingSupport ? true, swig, python, wxPython
 }:
 
+assert ngspiceSupport -> libngspice != null;
+
 with lib;
 stdenv.mkDerivation rec {
   name = "kicad-unstable-${version}";
@@ -41,7 +43,7 @@ stdenv.mkDerivation rec {
     libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs
     cairo curl openssl boost
   ] ++ optional (oceSupport) opencascade_oce
-    ++ optional (ngspiceSupport) ngspice
+    ++ optional (ngspiceSupport) libngspice
     ++ optionals (scriptingSupport) [ swig python wxPython ];
 
   meta = {
diff --git a/pkgs/applications/science/electronics/ngspice/default.nix b/pkgs/applications/science/electronics/ngspice/default.nix
index 114a2eea85f5..96025e8faa62 100644
--- a/pkgs/applications/science/electronics/ngspice/default.nix
+++ b/pkgs/applications/science/electronics/ngspice/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, readline, bison, flex, libX11, libICE, libXaw, libXext}:
+{stdenv, fetchurl, readline, bison, flex, libX11, libICE, libXaw, libXext, fftw}:
 
 stdenv.mkDerivation {
   name = "ngspice-27";
@@ -8,15 +8,16 @@ stdenv.mkDerivation {
     sha256 = "15862npsy5sj56z5yd1qiv3y0fgicrzj7wwn8hbcy89fgbawf20c";
   };
 
-  buildInputs = [ readline libX11 flex bison libICE libXaw libXext ];
+  nativeBuildInputs = [ flex bison ];
+  buildInputs = [ readline libX11 libICE libXaw libXext fftw ];
 
-  configureFlags = [ "--enable-x" "--with-x" "--with-readline" "--enable-xspice" "--enable-cider" "--with-ngshared" ];
+  configureFlags = [ "--enable-x" "--with-x" "--with-readline" "--enable-xspice" "--enable-cider" ];
 
   meta = with stdenv.lib; {
     description = "The Next Generation Spice (Electronic Circuit Simulator)";
     homepage = http://ngspice.sourceforge.net;
     license = with licenses; [ "BSD" gpl2 ];
-    maintainers = with maintainers; [ viric rongcuid ];
+    maintainers = with maintainers; [ bgamari viric rongcuid ];
     platforms = platforms.linux;
   };
 }