summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-03-26 18:33:42 +0100
committerGitHub <noreply@github.com>2018-03-26 18:33:42 +0100
commit7d8d5d4f6f6eab8faf51c3b36738007f45f63991 (patch)
tree5129b92a2e5e4171afabab2938e88afc817ca316
parent63a8d8c9e2d79f5286b37e9e6e9a45cce748719e (diff)
parenta62fffd9a5c9441235b90c68dbd7bcba34940b6a (diff)
downloadnixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar.gz
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar.bz2
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar.lz
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar.xz
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.tar.zst
nixlib-7d8d5d4f6f6eab8faf51c3b36738007f45f63991.zip
Merge pull request #37670 from bgamari/libngspice
ngspice: Move shared library to a new derivation
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--pkgs/applications/science/electronics/kicad/unstable.nix6
-rw-r--r--pkgs/applications/science/electronics/ngspice/default.nix9
-rw-r--r--pkgs/development/libraries/libngspice/default.nix25
-rw-r--r--pkgs/top-level/all-packages.nix2
5 files changed, 41 insertions, 6 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 0524b26b8315..b38d9b163535 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -572,6 +572,11 @@
     github = "bergey";
     name = "Daniel Bergey";
   };
+  bgamari = {
+    email = "ben@smart-cactus.org";
+    github = "bgamari";
+    name = "Ben Gamari";
+  };
   bhipple = {
     email = "bhipple@protonmail.com";
     github = "bhipple";
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;
   };
 }
diff --git a/pkgs/development/libraries/libngspice/default.nix b/pkgs/development/libraries/libngspice/default.nix
new file mode 100644
index 000000000000..b6d5912581ba
--- /dev/null
+++ b/pkgs/development/libraries/libngspice/default.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, bison, flex, fftw}:
+
+# Note that this does not provide the ngspice command-line utility. For that see
+# the ngspice derivation.
+stdenv.mkDerivation {
+  name = "libngspice-26";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ngspice/ngspice-26.tar.gz";
+    sha256 = "51e230c8b720802d93747bc580c0a29d1fb530f3dd06f213b6a700ca9a4d0108";
+  };
+
+  nativeBuildInputs = [ flex bison ];
+  buildInputs = [ fftw ];
+
+  configureFlags = [ "--with-ngshared" "--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; [ bgamari ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a5d1021c35d8..82e238dbd8e1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3434,6 +3434,8 @@ with pkgs;
 
   libnabo = callPackage ../development/libraries/libnabo { };
 
+  libngspice = callPackage ../development/libraries/libngspice { };
+
   libpointmatcher = callPackage ../development/libraries/libpointmatcher { };
 
   libtorrent = callPackage ../tools/networking/p2p/libtorrent { };