Merge pull request #256087 from raboof/gnucap-update
gnucap: update to 20240130-dev and add gnucap-modelgen-verilog
This commit is contained in:
commit
8b1ad909bd
@ -1,16 +1,15 @@
|
|||||||
{ lib, stdenv, fetchurl }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
stdenv.mkDerivation rec {
|
, fetchurl
|
||||||
pname = "gnucap";
|
, readline
|
||||||
version = "20210107";
|
, termcap
|
||||||
|
, gnucap
|
||||||
src = fetchurl {
|
, callPackage
|
||||||
url = "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/${pname}-${version}.tar.gz";
|
, writeScript
|
||||||
sha256 = "12rlwd4mfc54qq1wrx5k8qk578xls5z4isf94ybkf2z6qxk4mhnj";
|
}:
|
||||||
};
|
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "20240130-dev";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Gnu Circuit Analysis Package";
|
description = "Gnu Circuit Analysis Package";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -23,5 +22,52 @@ It performs nonlinear dc and transient analyses, fourier analysis, and ac analys
|
|||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
broken = stdenv.isDarwin; # Relies on LD_LIBRARY_PATH
|
broken = stdenv.isDarwin; # Relies on LD_LIBRARY_PATH
|
||||||
maintainers = [ maintainers.raboof ];
|
maintainers = [ maintainers.raboof ];
|
||||||
|
mainProgram = "gnucap";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gnucap";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/${pname}-${version}.tar.gz";
|
||||||
|
hash = "sha256-MUCtGw3BxGWgXgUwzklq5T1y9kjBTnFBa0/GK0hhl0E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
readline
|
||||||
|
termcap
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
inherit meta;
|
||||||
|
} // {
|
||||||
|
plugins = callPackage ./plugins.nix {};
|
||||||
|
withPlugins = p:
|
||||||
|
let
|
||||||
|
selectedPlugins = p gnucap.plugins;
|
||||||
|
wrapper = writeScript "gnucap" ''
|
||||||
|
export GNUCAP_PLUGPATH=${gnucap}/lib/gnucap
|
||||||
|
for plugin in ${builtins.concatStringsSep " " selectedPlugins}; do
|
||||||
|
export GNUCAP_PLUGPATH=$plugin/lib/gnucap:$GNUCAP_PLUGPATH
|
||||||
|
done
|
||||||
|
${lib.getExe gnucap}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "gnucap-with-plugins";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
propagatedBuildInputs = selectedPlugins;
|
||||||
|
|
||||||
|
phases = [ "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${wrapper} $out/bin/gnucap
|
||||||
|
'';
|
||||||
|
|
||||||
|
inherit meta;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
|
, gnucap
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gnucap-modelgen-verilog";
|
||||||
|
version = "20240130-dev";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://git.savannah.gnu.org/cgit/gnucap/gnucap-modelgen-verilog.git/snapshot/${pname}-${version}.tar.gz";
|
||||||
|
hash = "sha256-7w0eWUJKVRYFicQgDvKrJTkZ6fzgwxvcCKj78KrHj8E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ gnucap ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
preInstall = ''
|
||||||
|
export GNUCAP_EXEC_PREFIX=$out
|
||||||
|
export GNUCAP_DATA=$out/share/gnucap
|
||||||
|
mkdir -p $out/include/gnucap
|
||||||
|
export GNUCAP_INCLUDEDIR=$out/include/gnucap
|
||||||
|
export GNUCAP_PKGLIBDIR=$out/lib/gnucap
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "gnucap modelgen to preprocess, parse and dump vams files.";
|
||||||
|
homepage = "http://www.gnucap.org/";
|
||||||
|
changelog = "https://git.savannah.gnu.org/cgit/gnucap.git/plain/NEWS?h=v${version}";
|
||||||
|
mainProgram = "gnucap-mg-vams";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
platforms = platforms.all;
|
||||||
|
maintainers = [ maintainers.raboof ];
|
||||||
|
};
|
||||||
|
}
|
6
pkgs/applications/science/electronics/gnucap/plugins.nix
Normal file
6
pkgs/applications/science/electronics/gnucap/plugins.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ callPackage
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
verilog = callPackage ./modelgen-verilog.nix {};
|
||||||
|
}
|
@ -8642,6 +8642,7 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
gnucap = callPackage ../applications/science/electronics/gnucap { };
|
gnucap = callPackage ../applications/science/electronics/gnucap { };
|
||||||
|
gnucap-full = gnucap.withPlugins(p: [ p.verilog ]);
|
||||||
|
|
||||||
gnu-cim = callPackage ../development/compilers/gnu-cim { };
|
gnu-cim = callPackage ../development/compilers/gnu-cim { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user