uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
26
pkgs/applications/science/electronics/adms/default.nix
Normal file
26
pkgs/applications/science/electronics/adms/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, flex, bison, gperf,
|
||||
libxml2, perl, perlPackages, gd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.3.7";
|
||||
pname = "adms";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Qucs";
|
||||
repo = "adms";
|
||||
rev = "release-${version}";
|
||||
sha256 = "0i37c9k6q1iglmzp9736rrgsnx7sw8xn3djqbbjw29zsyl3pf62c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [ flex bison gperf libxml2 perl gd perlPackages.XMLLibXML ];
|
||||
configureFlags = [ "--enable-maintainer-mode" ];
|
||||
|
||||
meta = {
|
||||
description = "automatic device model synthesizer";
|
||||
homepage = "https://github.com/Qucs/adms";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [disassembler];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
58
pkgs/applications/science/electronics/alliance/default.nix
Normal file
58
pkgs/applications/science/electronics/alliance/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, stdenv, fetchFromGitLab, xorgproto, motif, libX11, libXt, libXpm, bison
|
||||
, flex, automake, autoconf, libtool
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alliance";
|
||||
version = "unstable-2022-01-13";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.lip6.fr";
|
||||
owner = "vlsi-eda";
|
||||
repo = "alliance";
|
||||
rev = "ebece102e15c110fc79f1da50524c68fd9523f0c";
|
||||
hash = "sha256-NGtE3ZmN9LrgXG4NIKrp7dFRVzrKMoudlPUtYYKrZjY=";
|
||||
};
|
||||
|
||||
prePatch = "cd alliance/src";
|
||||
|
||||
nativeBuildInputs = [ libtool automake autoconf flex ];
|
||||
buildInputs = [ xorgproto motif libX11 libXt libXpm bison ];
|
||||
|
||||
# Disable parallel build, errors:
|
||||
# ./pat_decl_y.y:736:5: error: expected '=', ...
|
||||
enableParallelBuilding = false;
|
||||
|
||||
ALLIANCE_TOP = placeholder "out";
|
||||
|
||||
configureFlags = [
|
||||
"--prefix=${placeholder "out"}" "--enable-alc-shared"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# texlive for docs seems extreme
|
||||
substituteInPlace autostuff \
|
||||
--replace "$newdirs documentation" "$newdirs"
|
||||
|
||||
substituteInPlace sea/src/DEF_grammar_lex.l --replace "ifndef FLEX_BETA" \
|
||||
"if (YY_FLEX_MAJOR_VERSION <= 2) && (YY_FLEX_MINOR_VERSION < 6)"
|
||||
|
||||
./autostuff
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
sed -i "s|ALLIANCE_TOP|$out|" distrib/*.desktop
|
||||
mkdir -p $out/share/applications
|
||||
cp -p distrib/*.desktop $out/share/applications/
|
||||
mkdir -p $out/icons/hicolor/48x48/apps/
|
||||
cp -p distrib/*.png $out/icons/hicolor/48x48/apps/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "(deprecated) Complete set of free CAD tools and portable libraries for VLSI design";
|
||||
homepage = "http://coriolis.lip6.fr/";
|
||||
license = with licenses; gpl2Plus;
|
||||
maintainers = with maintainers; [ l-as ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
55
pkgs/applications/science/electronics/appcsxcad/default.nix
Normal file
55
pkgs/applications/science/electronics/appcsxcad/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, csxcad
|
||||
, qcsxcad
|
||||
, hdf5
|
||||
, vtkWithQt5
|
||||
, qtbase
|
||||
, wrapQtAppsHook
|
||||
, fparser
|
||||
, tinyxml
|
||||
, cgal
|
||||
, boost
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
pname = "appcsxcad";
|
||||
version = "unstable-2020-01-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "AppCSXCAD";
|
||||
rev = "de8c271ec8b57e80233cb2a432e3d7fd54d30876";
|
||||
sha256 = "0shnfa0if3w588a68gr82qi6k7ldg1j2921fnzji90mmay21birp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
csxcad
|
||||
qcsxcad
|
||||
hdf5
|
||||
vtkWithQt5
|
||||
qtbase
|
||||
fparser
|
||||
tinyxml
|
||||
cgal
|
||||
boost
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
rm $out/bin/AppCSXCAD.sh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Minimal Application using the QCSXCAD library";
|
||||
homepage = "https://github.com/thliebig/AppCSXCAD";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
18
pkgs/applications/science/electronics/archimedes/default.nix
Normal file
18
pkgs/applications/science/electronics/archimedes/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "archimedes";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/archimedes/archimedes-${version}.tar.gz";
|
||||
sha256 = "0jfpnd3pns5wxcxbiw49v5sgpmm5b4v8s4q1a5292hxxk2hzmb3z";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "GNU package for semiconductor device simulations";
|
||||
homepage = "https://www.gnu.org/software/archimedes";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
64
pkgs/applications/science/electronics/bitscope/common.nix
Normal file
64
pkgs/applications/science/electronics/bitscope/common.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ atk
|
||||
, buildFHSUserEnv
|
||||
, cairo
|
||||
, dpkg
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gtk2-x11
|
||||
, makeWrapper
|
||||
, pango
|
||||
, lib, stdenv
|
||||
, xorg
|
||||
}:
|
||||
|
||||
{ src, toolName, version, ... } @ attrs:
|
||||
let
|
||||
wrapBinary = libPaths: binaryName: ''
|
||||
wrapProgram "$out/bin/${binaryName}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libPaths}"
|
||||
'';
|
||||
pkg = stdenv.mkDerivation (rec {
|
||||
inherit (attrs) version src;
|
||||
|
||||
name = "${toolName}-${version}";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://bitscope.com/software/";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [
|
||||
vidbina
|
||||
];
|
||||
} // (attrs.meta or {});
|
||||
|
||||
buildInputs = [
|
||||
dpkg
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
libs = attrs.libs or [
|
||||
atk
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk2-x11
|
||||
pango
|
||||
xorg.libX11
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
unpackPhase = attrs.unpackPhase or ''
|
||||
dpkg-deb -x ${attrs.src} ./
|
||||
'';
|
||||
|
||||
installPhase = attrs.installPhase or ''
|
||||
mkdir -p "$out/bin"
|
||||
cp -a usr/* "$out/"
|
||||
${(wrapBinary libs) attrs.toolName}
|
||||
'';
|
||||
});
|
||||
in buildFHSUserEnv {
|
||||
name = "${attrs.toolName}-${attrs.version}";
|
||||
runScript = "${pkg.outPath}/bin/${attrs.toolName}";
|
||||
} // { inherit (pkg) meta name; }
|
||||
146
pkgs/applications/science/electronics/bitscope/packages.nix
Normal file
146
pkgs/applications/science/electronics/bitscope/packages.nix
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
{ callPackage
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
let
|
||||
mkBitscope = callPackage (import ./common.nix) { };
|
||||
in {
|
||||
chart = let
|
||||
toolName = "bitscope-chart";
|
||||
version = "2.0.FK22M";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Multi-channel waveform data acquisition and chart recording application";
|
||||
homepage = "http://bitscope.com/software/chart/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "08mc82pjamyyyhh15sagsv0sc7yx5v5n54bg60fpj7v41wdwrzxw";
|
||||
};
|
||||
};
|
||||
|
||||
console = let
|
||||
toolName = "bitscope-console";
|
||||
version = "1.0.FK29A";
|
||||
in mkBitscope {
|
||||
# NOTE: this is meant as a demo by BitScope
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Demonstrative communications program designed to make it easy to talk to any model BitScope";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "00b4gxwz7w6pmfrcz14326b24kl44hp0gzzqcqxwi5vws3f0y49d";
|
||||
};
|
||||
};
|
||||
|
||||
display = let
|
||||
toolName = "bitscope-display";
|
||||
version = "1.0.EC17A";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Display diagnostic application for BitScope";
|
||||
homepage = "http://bitscope.com/software/display/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "05xr5mnka1v3ibcasg74kmj6nlv1nmn3lca1wv77whkq85cmz0s1";
|
||||
};
|
||||
};
|
||||
|
||||
dso = let
|
||||
toolName = "bitscope-dso";
|
||||
version = "2.8.FE22H";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Test and measurement software for BitScope";
|
||||
homepage = "http://bitscope.com/software/dso/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0fc6crfkprj78dxxhvhbn1dx1db5chm0cpwlqpqv8sz6whp12mcj";
|
||||
};
|
||||
};
|
||||
|
||||
logic = let
|
||||
toolName = "bitscope-logic";
|
||||
version = "1.2.FC20C";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Mixed signal logic timing and serial protocol analysis software for BitScope";
|
||||
homepage = "http://bitscope.com/software/logic/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0lkb7z9gfkiyxdwh4dq1zxfls8gzdw0na1vrrbgnxfg3klv4xns3";
|
||||
};
|
||||
};
|
||||
|
||||
meter = let
|
||||
toolName = "bitscope-meter";
|
||||
version = "2.0.FK22G";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Automated oscilloscope, voltmeter and frequency meter for BitScope";
|
||||
homepage = "http://bitscope.com/software/logic/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "0nirbci6ymhk4h4bck2s4wbsl5r9yndk2jvvv72zwkg21248mnbp";
|
||||
};
|
||||
};
|
||||
|
||||
proto = let
|
||||
toolName = "bitscope-proto";
|
||||
version = "0.9.FG13B";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
# NOTE: this is meant as a demo by BitScope
|
||||
# NOTE: clicking on logo produces error
|
||||
# TApplication.HandleException Executable not found: "http://bitscope.com/blog/DK/?p=DK15A"
|
||||
|
||||
meta = {
|
||||
description = "Demonstrative prototype oscilloscope built using the BitScope Library";
|
||||
homepage = "http://bitscope.com/blog/DK/?p=DK15A";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "1ybjfbh3narn29ll4nci4b7rnxy0hj3wdfm4v8c6pjr8pfvv9spy";
|
||||
};
|
||||
};
|
||||
|
||||
server = let
|
||||
toolName = "bitscope-server";
|
||||
version = "1.0.FK26A";
|
||||
in mkBitscope {
|
||||
inherit toolName version;
|
||||
|
||||
meta = {
|
||||
description = "Remote access server solution for any BitScope";
|
||||
homepage = "http://bitscope.com/software/server/";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
|
||||
sha256 = "1079n7msq6ks0n4aasx40rd4q99w8j9hcsaci71nd2im2jvjpw9a";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/science/electronics/caneda/default.nix
Normal file
24
pkgs/applications/science/electronics/caneda/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, cmake, qtbase, qttools, qtsvg, qwt6_1}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "caneda";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Caneda";
|
||||
repo = "Caneda";
|
||||
rev = version;
|
||||
sha256 = "0hx8qid50j9xvg2kpbpqmbdyakgyjn6m373m1cvhp70v2gp1v8l2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ qtbase qttools qtsvg qwt6_1 ];
|
||||
|
||||
meta = {
|
||||
description = "Open source EDA software focused on easy of use and portability";
|
||||
homepage = "http://caneda.org";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
13
pkgs/applications/science/electronics/caneda/gcc6.patch
Normal file
13
pkgs/applications/science/electronics/caneda/gcc6.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git c/src/cgraphicsscene.cpp i/src/cgraphicsscene.cpp
|
||||
index ac2929a..c399706 100644
|
||||
--- c/src/cgraphicsscene.cpp
|
||||
+++ i/src/cgraphicsscene.cpp
|
||||
@@ -1436,7 +1436,7 @@ namespace Caneda
|
||||
QPointF newPos = m_currentWiringWire->mapFromScene(pos);
|
||||
QPointF refPos = m_currentWiringWire->port1()->pos();
|
||||
|
||||
- if( abs(refPos.x()-newPos.x()) > abs(refPos.y()-newPos.y()) ) {
|
||||
+ if( (refPos.x()-newPos.x()) > (refPos.y()-newPos.y()) ) {
|
||||
m_currentWiringWire->movePort2(QPointF(newPos.x(), refPos.y()));
|
||||
}
|
||||
else {
|
||||
47
pkgs/applications/science/electronics/csxcad/default.nix
Normal file
47
pkgs/applications/science/electronics/csxcad/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, fparser
|
||||
, tinyxml
|
||||
, hdf5
|
||||
, cgal_5
|
||||
, vtk
|
||||
, boost
|
||||
, gmp
|
||||
, mpfr
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "csxcad";
|
||||
version = "unstable-2020-02-08";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "CSXCAD";
|
||||
rev = "ef6e40931dbd80e0959f37c8e9614c437bf7e518";
|
||||
sha256 = "072s765jyzpdq8qqysdy0dld17m6sr9zfcs0ip2zk8c4imxaysnb";
|
||||
};
|
||||
|
||||
patches = [./searchPath.patch ];
|
||||
|
||||
buildInputs = [
|
||||
cgal_5
|
||||
boost
|
||||
gmp
|
||||
mpfr
|
||||
vtk
|
||||
fparser
|
||||
tinyxml
|
||||
hdf5
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A C++ library to describe geometrical objects";
|
||||
homepage = "https://github.com/thliebig/CSXCAD";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- CSXCAD/matlab/searchBinary.m 2019-07-14 09:24:02.154291745 -0700
|
||||
+++ CSXCAD/matlab/searchBinary.m 2019-07-14 09:20:20.900248280 -0700
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
% try all search paths
|
||||
for n=1:numel(searchpath)
|
||||
- binary_location = [searchpath{n} name];
|
||||
+ binary_location = [searchpath{n} filesep name];
|
||||
if exist(binary_location, 'file')
|
||||
return
|
||||
end
|
||||
77
pkgs/applications/science/electronics/diylc/default.nix
Normal file
77
pkgs/applications/science/electronics/diylc/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, stdenv, fetchurl, makeDesktopItem, unzip, bash, jre8 }:
|
||||
|
||||
let
|
||||
pname = "diylc";
|
||||
version = "4.18.0";
|
||||
files = {
|
||||
app = fetchurl {
|
||||
url = "https://github.com/bancika/diy-layout-creator/releases/download/v${version}/diylc-${version}.zip";
|
||||
sha256 = "09fpp3dn086clgnjz5yj4fh5bnjvj6mvxkx9n3zamcwszjmxr40d";
|
||||
};
|
||||
icon16 = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_small.png";
|
||||
sha256 = "1is50aidfwzwfzwqv57s2hwhx0r5c21cp77bkl93xkdqkh2wd8x4";
|
||||
};
|
||||
icon32 = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_medium.png";
|
||||
sha256 = "0a45p18n84xz1nd3zv3y16jlimvqzhbzg3q3f4lawgx4rcrn2n3d";
|
||||
};
|
||||
icon48 = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_large.png";
|
||||
sha256 = "06dkz0dcy8hfmnzr5ri5n1sh8r7mg83kzbvs3zy58wwhgzs1ddk6";
|
||||
};
|
||||
};
|
||||
launcher = makeDesktopItem {
|
||||
name = "diylc";
|
||||
desktopName = "DIY Layout Creator";
|
||||
comment = "Multi platform circuit layout and schematic drawing tool";
|
||||
exec = "diylc";
|
||||
icon = "diylc_icon";
|
||||
categories = [ "Development" "Electronics" ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname version;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildInputs = [ jre8 ];
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/diylc
|
||||
unzip -UU ${files.app} -d $out/share/diylc
|
||||
rm $out/share/diylc/diylc.exe
|
||||
rm $out/share/diylc/run.sh
|
||||
|
||||
# Nope, the icon cannot be named 'diylc' because KDE does not like it.
|
||||
install -Dm644 ${files.icon16} $out/share/icons/hicolor/16x16/apps/diylc_icon.png
|
||||
install -Dm644 ${files.icon32} $out/share/icons/hicolor/32x32/apps/diylc_icon.png
|
||||
install -Dm644 ${files.icon48} $out/share/icons/hicolor/48x48/apps/diylc_icon.png
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
ln -s ${launcher}/share/applications/* $out/share/applications/
|
||||
|
||||
mkdir -p $out/bin
|
||||
cat <<EOF > $out/bin/diylc
|
||||
#!${bash}/bin/sh
|
||||
cd $out/share/diylc
|
||||
${jre8}/bin/java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib org.diylc.DIYLCStarter
|
||||
EOF
|
||||
chmod +x $out/bin/diylc
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi platform circuit layout and schematic drawing tool";
|
||||
homepage = "https://bancika.github.io/diy-layout-creator/";
|
||||
changelog = "https://github.com/bancika/diy-layout-creator/releases";
|
||||
license = licenses.gpl3Plus;
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
55
pkgs/applications/science/electronics/dsview/default.nix
Normal file
55
pkgs/applications/science/electronics/dsview/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, mkDerivation, fetchFromGitHub, pkg-config, cmake
|
||||
, libzip, boost, fftw, qtbase, libusb1, libsigrok4dsl
|
||||
, libsigrokdecode4dsl, python3, fetchpatch
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "dsview";
|
||||
|
||||
version = "1.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DreamSourceLab";
|
||||
repo = "DSView";
|
||||
rev = "v${version}";
|
||||
sha256 = "q7F4FuK/moKkouXTNPZDVon/W/ZmgtNHJka4MiTxA0U=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/DSView";
|
||||
|
||||
patches = [
|
||||
# Fix absolute install paths
|
||||
./install.patch
|
||||
|
||||
# Fix buld with Qt5.15 already merged upstream for future release
|
||||
# Using local file instead of content of commit #33e3d896a47 because
|
||||
# sourceRoot make it unappliable
|
||||
./qt515.patch
|
||||
|
||||
# Change from upstream master that removes extern-C scopes which
|
||||
# cause failures with modern glib. This can likely be removed if
|
||||
# there is an upstream release >1.12
|
||||
(fetchpatch {
|
||||
name = "fix-extern-c.patch";
|
||||
url = "https://github.com/DreamSourceLab/DSView/commit/33cc733abe19872bf5ed08540a94b798d0d4ecf4.patch";
|
||||
sha256 = "sha256-TLfLQa3sdyNHTpMMvId/V6uUuOFihOZMFJOj9frnDoY=";
|
||||
stripLen = 2;
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl
|
||||
python3
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ bachp ];
|
||||
};
|
||||
}
|
||||
15
pkgs/applications/science/electronics/dsview/install.patch
Normal file
15
pkgs/applications/science/electronics/dsview/install.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c1c33e1..208a184 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -427,8 +427,8 @@
|
||||
install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31)
|
||||
install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf)
|
||||
install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf)
|
||||
-install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
|
||||
-install(FILES DSView.desktop DESTINATION /usr/share/applications/)
|
||||
+install(FILES DreamSourceLab.rules DESTINATION etc/udev/rules.d/)
|
||||
+install(FILES DSView.desktop DESTINATION share/applications/)
|
||||
|
||||
#===============================================================================
|
||||
#= Packaging (handled by CPack)
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, pkg-config, autoreconfHook,
|
||||
glib, libzip, libserialport, check, libusb1, libftdi,
|
||||
systemd, alsa-lib, dsview
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (dsview) version src;
|
||||
|
||||
pname = "libsigrok4dsl";
|
||||
|
||||
postUnpack = ''
|
||||
export sourceRoot=$sourceRoot/libsigrok4DSL
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
|
||||
buildInputs = [
|
||||
glib libzip libserialport libusb1 libftdi systemd check alsa-lib
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fork of the sigrok library for usage with DSView";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bachp ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, pkg-config, autoreconfHook,
|
||||
glib, check, python3, dsview
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (dsview) version src;
|
||||
|
||||
pname = "libsigrokdecode4dsl";
|
||||
|
||||
postUnpack = ''
|
||||
export sourceRoot=$sourceRoot/libsigrokdecode4DSL
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
|
||||
buildInputs = [
|
||||
python3 glib check
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fork of the sigrokdecode library for usage with DSView";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bachp ];
|
||||
};
|
||||
}
|
||||
13
pkgs/applications/science/electronics/dsview/qt515.patch
Normal file
13
pkgs/applications/science/electronics/dsview/qt515.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp
|
||||
index 921d3db..16cdce9 100755
|
||||
--- a/pv/view/viewport.cpp
|
||||
+++ b/pv/view/viewport.cpp
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QStyleOption>
|
||||
-
|
||||
+#include <QPainterPath>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
20
pkgs/applications/science/electronics/dwfv/default.nix
Normal file
20
pkgs/applications/science/electronics/dwfv/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, rustPlatform, fetchCrate }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "dwfv";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit version pname;
|
||||
sha256 = "0xxgwbbbzaldbl04k5ksk61wa6i4f9mc84q04ljg438z0k8q6cr7";
|
||||
};
|
||||
|
||||
cargoSha256 = "1z51yx3psdxdzmwny0rzlch5hjx2pssll73q79qij2bc7wgyjscy";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple digital waveform viewer with vi-like key bindings";
|
||||
homepage = "https://github.com/psurply/dwfv";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ newam ];
|
||||
};
|
||||
}
|
||||
80
pkgs/applications/science/electronics/eagle/eagle.nix
Normal file
80
pkgs/applications/science/electronics/eagle/eagle.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{ lib, stdenv, mkDerivation, fetchurl, makeDesktopItem
|
||||
, libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb
|
||||
, libGL, glib, nss, nspr, expat, alsa-lib
|
||||
, qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine
|
||||
}:
|
||||
|
||||
let
|
||||
libPath = lib.makeLibraryPath
|
||||
[ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
|
||||
libGL glib nss nspr expat alsa-lib
|
||||
qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
|
||||
];
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "eagle";
|
||||
version = "9.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://eagle-updates.circuits.io/downloads/${builtins.replaceStrings ["."] ["_"] version}/Autodesk_EAGLE_${version}_English_Linux_64bit.tar.gz";
|
||||
sha256 = "18syygnskl286kn8aqfzzdsyzq59d2w19y1h1ynyxsnrvkyv71h0";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "eagle";
|
||||
exec = "eagle";
|
||||
icon = "eagle";
|
||||
comment = "Schematic capture and PCB layout";
|
||||
desktopName = "Eagle";
|
||||
genericName = "Schematic editor";
|
||||
categories = [ "Development" ];
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
|
||||
libGL glib nss nspr expat alsa-lib
|
||||
qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
# Extract eagle tarball
|
||||
mkdir "$out"
|
||||
tar -xzf "$src" -C "$out"
|
||||
|
||||
# Install manpage
|
||||
mkdir -p "$out"/share/man/man1
|
||||
ln -s "$out"/eagle-${version}/doc/eagle.1 "$out"/share/man/man1/eagle.1
|
||||
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libPath}:$out/eagle-${version}/lib:${stdenv.cc.cc.lib}/lib" \
|
||||
"$out"/eagle-${version}/eagle
|
||||
|
||||
mkdir -p "$out"/bin
|
||||
ln -s "$out"/eagle-${version}/eagle "$out"/bin/eagle
|
||||
|
||||
# Remove bundled libraries that are available in nixpkgs
|
||||
# TODO: There still may be unused bundled libraries
|
||||
rm "$out"/eagle-${version}/lib/libQt5*.so.5
|
||||
rm "$out"/eagle-${version}/lib/{libxcb-*.so.*,libX*.so.*,libxshmfence.so.1}
|
||||
rm "$out"/eagle-${version}/lib/{libEGL.so.1,libglapi.so.0,libgbm.so.1}
|
||||
|
||||
# No longer needed (we don't use the bundled Qt libraries)
|
||||
rm -r "$out"/eagle-${version}/libexec
|
||||
rm -r "$out"/eagle-${version}/plugins
|
||||
|
||||
# Make desktop item
|
||||
mkdir -p "$out"/share/applications
|
||||
cp "$desktopItem"/share/applications/* "$out"/share/applications/
|
||||
mkdir -p "$out"/share/pixmaps
|
||||
ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/pixmaps/eagle.png
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)";
|
||||
homepage = "https://www.autodesk.com/products/eagle/overview";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
134
pkgs/applications/science/electronics/eagle/eagle7_fixer.c
Normal file
134
pkgs/applications/science/electronics/eagle/eagle7_fixer.c
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* LD_PRELOAD trick to make Eagle (schematic editor and PCB layout tool from
|
||||
* CadSoft) work from a read-only installation directory.
|
||||
*
|
||||
* When Eagle starts, it looks for the license file in <eagle>/bin/eagle.key
|
||||
* (where <eagle> is the install path). If eagle.key is not found, Eagle checks
|
||||
* for write access to <eagle>/bin/, shows a license dialog to the user and
|
||||
* then attempts to write a license file to <eagle>/bin/.
|
||||
*
|
||||
* This will of course fail when Eagle is installed in the read-only Nix store.
|
||||
* Hence this library that redirects accesses to the those paths in the
|
||||
* following way:
|
||||
*
|
||||
* <eagle>/bin => $HOME
|
||||
* <eagle>/bin/eagle.key => $HOME/.eagle.key
|
||||
*
|
||||
* Also, if copying an example project to ~/eagle/ (in the Eagle GUI), Eagle
|
||||
* chmod's the destination with read-only permission bits (presumably because
|
||||
* the source is read-only) and fails to complete the copy operation.
|
||||
* Therefore, the mode argument in calls to chmod() is OR'ed with the S_IWUSR
|
||||
* bit (write by owner).
|
||||
*
|
||||
* Usage:
|
||||
* gcc -shared -fPIC -DEAGLE_PATH="$out/eagle-${version}" eagle_fixer.c -o eagle_fixer.so -ldl
|
||||
* LD_PRELOAD=$PWD/eagle_fixer.so ./result/bin/eagle
|
||||
*
|
||||
* To see the paths that are modified at runtime, set the environment variable
|
||||
* EAGLE_FIXER_DEBUG to 1.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <dlfcn.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef EAGLE_PATH
|
||||
#error Missing EAGLE_PATH, path to the eagle-${version} installation directory.
|
||||
#endif
|
||||
|
||||
typedef FILE *(*fopen_func_t)(const char *path, const char *mode);
|
||||
typedef int (*access_func_t)(const char *pathname, int mode);
|
||||
typedef int (*chmod_func_t)(const char *path, mode_t mode);
|
||||
|
||||
/*
|
||||
* Map <eagle>/bin to $HOME and <eagle>/bin/eagle.key to $HOME/.eagle.key
|
||||
*
|
||||
* Path is truncated if bigger than PATH_MAX. It's not threadsafe, but that's
|
||||
* OK.
|
||||
*/
|
||||
static const char *redirect(const char *pathname)
|
||||
{
|
||||
static char buffer[PATH_MAX];
|
||||
const char *homepath;
|
||||
const char *new_path;
|
||||
static int have_warned;
|
||||
|
||||
homepath = getenv("HOME");
|
||||
if (!homepath) {
|
||||
homepath = "/";
|
||||
if (!have_warned && getenv("EAGLE_FIXER_DEBUG")) {
|
||||
fprintf(stderr, "eagle_fixer: HOME is unset, using \"/\" (root) instead.\n");
|
||||
have_warned = 1;
|
||||
}
|
||||
}
|
||||
|
||||
new_path = pathname;
|
||||
if (strcmp(EAGLE_PATH "/bin", pathname) == 0) {
|
||||
/* redirect to $HOME */
|
||||
new_path = homepath;
|
||||
} else if (strcmp(EAGLE_PATH "/bin/eagle.key", pathname) == 0) {
|
||||
/* redirect to $HOME/.eagle.key */
|
||||
snprintf(buffer, PATH_MAX, "%s/.eagle.key", homepath);
|
||||
buffer[PATH_MAX-1] = '\0';
|
||||
new_path = buffer;
|
||||
}
|
||||
|
||||
return new_path;
|
||||
}
|
||||
|
||||
FILE *fopen(const char *pathname, const char *mode)
|
||||
{
|
||||
FILE *fp;
|
||||
const char *path;
|
||||
fopen_func_t orig_fopen;
|
||||
|
||||
orig_fopen = (fopen_func_t)dlsym(RTLD_NEXT, "fopen");
|
||||
path = redirect(pathname);
|
||||
fp = orig_fopen(path, mode);
|
||||
|
||||
if (path != pathname && getenv("EAGLE_FIXER_DEBUG")) {
|
||||
fprintf(stderr, "eagle_fixer: fopen(\"%s\", \"%s\") => \"%s\": fp=%p\n", pathname, mode, path, fp);
|
||||
}
|
||||
|
||||
return fp;
|
||||
}
|
||||
|
||||
int access(const char *pathname, int mode)
|
||||
{
|
||||
int ret;
|
||||
const char *path;
|
||||
access_func_t orig_access;
|
||||
|
||||
orig_access = (access_func_t)dlsym(RTLD_NEXT, "access");
|
||||
path = redirect(pathname);
|
||||
ret = orig_access(path, mode);
|
||||
|
||||
if (path != pathname && getenv("EAGLE_FIXER_DEBUG")) {
|
||||
fprintf(stderr, "eagle_fixer: access(\"%s\", %d) => \"%s\": ret=%d\n", pathname, mode, path, ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int chmod(const char *pathname, mode_t mode)
|
||||
{
|
||||
int ret;
|
||||
mode_t new_mode;
|
||||
chmod_func_t orig_chmod;
|
||||
|
||||
orig_chmod = (chmod_func_t)dlsym(RTLD_NEXT, "chmod");
|
||||
new_mode = mode | S_IWUSR;
|
||||
ret = orig_chmod(pathname, new_mode);
|
||||
|
||||
if (getenv("EAGLE_FIXER_DEBUG")) {
|
||||
fprintf(stderr, "eagle_fixer: chmod(\"%s\", %o) => %o: ret=%d\n", pathname, mode, new_mode, ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
57
pkgs/applications/science/electronics/flatcam/default.nix
Normal file
57
pkgs/applications/science/electronics/flatcam/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, python3Packages
|
||||
, fetchFromBitbucket
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "flatcam";
|
||||
version = "8.5";
|
||||
|
||||
src = fetchFromBitbucket {
|
||||
owner = "jpcgt";
|
||||
repo = pname;
|
||||
rev = "533afd6a1772857cb633c011b5e0a15b60b1e92e"; # 8.5 with Red Hat packaging.
|
||||
sha256 = "199kiiml18k34z1zhk2hbhibphmnv0kb11kxiajq52alps0mjb3m";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
matplotlib
|
||||
numpy
|
||||
packaging
|
||||
pyqt4
|
||||
Rtree
|
||||
scipy
|
||||
setuptools
|
||||
shapely
|
||||
simplejson
|
||||
six
|
||||
svg-path
|
||||
];
|
||||
|
||||
packaging_fix_pull_request_patch = fetchpatch {
|
||||
name = "packaging_fix_pull_request.patch";
|
||||
url = "https://bitbucket.org/trepetti/flatcam/commits/5591ed889d1f48a5190fe237b562cb932cb5876c/raw";
|
||||
sha256 = "19rhjdrf1n1q29cgpcry6pl2kl90zq0d613hhkwdir9bhq5bkknp";
|
||||
};
|
||||
|
||||
patches = [
|
||||
packaging_fix_pull_request_patch
|
||||
./release.patch
|
||||
];
|
||||
|
||||
# Only non-GUI tests can be run deterministically in the Nix build environment.
|
||||
checkPhase = ''
|
||||
python -m unittest tests.test_excellon
|
||||
python -m unittest tests.test_gerber_buffer
|
||||
python -m unittest tests.test_paint
|
||||
python -m unittest tests.test_pathconnect
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "2-D post processing for PCB fabrication on CNC routers";
|
||||
homepage = "https://bitbucket.org/jpcgt/flatcam";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ trepetti ];
|
||||
};
|
||||
}
|
||||
13
pkgs/applications/science/electronics/flatcam/release.patch
Normal file
13
pkgs/applications/science/electronics/flatcam/release.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/FlatCAMVersion.py b/FlatCAMVersion.py
|
||||
index ba9e04a5..2c64d5a6 100644
|
||||
--- a/FlatCAMVersion.py
|
||||
+++ b/FlatCAMVersion.py
|
||||
@@ -16,7 +16,7 @@ version = {
|
||||
"number": 8.5,
|
||||
"date": (2016, 7, 1), # Year, Month, Day
|
||||
"name": None,
|
||||
- "release": False,
|
||||
+ "release": True,
|
||||
}
|
||||
|
||||
|
||||
26
pkgs/applications/science/electronics/fparser/default.nix
Normal file
26
pkgs/applications/science/electronics/fparser/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fparser";
|
||||
version = "unstable-2015-09-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "fparser";
|
||||
rev = "a59e1f51e32096bfe2a0a2640d5dffc7ae6ba37b";
|
||||
sha256 = "0wayml1mlyi922gp6am3fsidhzsilziksdn5kbnpcln01h8555ad";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ Library for Evaluating Mathematical Functions";
|
||||
homepage = "https://github.com/thliebig/fparser";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
44
pkgs/applications/science/electronics/fped/default.nix
Normal file
44
pkgs/applications/science/electronics/fped/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchgit
|
||||
, flex, bison, fig2dev, imagemagick, netpbm, gtk2
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
with lib;
|
||||
stdenv.mkDerivation {
|
||||
pname = "fped";
|
||||
version = "unstable-2017-05-11";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://projects.qi-hardware.com/fped.git";
|
||||
rev = "fa98e58157b6f68396d302c32421e882ac87f45b";
|
||||
sha256 = "0xv364a00zwxhd9kg1z9sch5y0cxnrhk546asspyb9bh58sdzfy7";
|
||||
};
|
||||
|
||||
# This uses '/bin/bash', '/usr/local' and 'lex' by default
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
"LEX=flex"
|
||||
"RGBDEF=${netpbm.out}/share/netpbm/misc/rgb.txt"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
flex
|
||||
bison
|
||||
pkg-config
|
||||
imagemagick
|
||||
fig2dev
|
||||
netpbm
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk2
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "An editor that allows the interactive creation of footprints electronic components";
|
||||
homepage = "http://projects.qi-hardware.com/index.php/p/fped/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ expipiplus1 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
84
pkgs/applications/science/electronics/fritzing/default.nix
Normal file
84
pkgs/applications/science/electronics/fritzing/default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, qmake
|
||||
, pkg-config
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, qttools
|
||||
, qtserialport
|
||||
, boost
|
||||
, libgit2
|
||||
, quazip
|
||||
}:
|
||||
|
||||
let
|
||||
# SHA256 of the fritzing-parts HEAD on the master branch,
|
||||
# which contains the latest stable parts definitions
|
||||
partsSha = "640fa25650211afccd369f960375ade8ec3e8653";
|
||||
|
||||
parts = fetchFromGitHub {
|
||||
owner = "fritzing";
|
||||
repo = "fritzing-parts";
|
||||
rev = partsSha;
|
||||
sha256 = "sha256-4S65eX4LCnXCFQAOxmdvr8d0nAgTWcJooE2SpLYpcXI=";
|
||||
};
|
||||
in
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fritzing";
|
||||
version = "unstable-2021-09-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = "fritzing-app";
|
||||
rev = "f0af53a9077f7cdecef31d231b85d8307de415d4";
|
||||
sha256 = "sha256-fF38DrBoeZ0aKwVMNyYMPWa5rFPbIVXRARZT+eRat5Q=";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip ];
|
||||
nativeBuildInputs = [ qmake pkg-config qttools ];
|
||||
|
||||
patches = [
|
||||
# Add support for QuaZip 1.x
|
||||
(fetchpatch {
|
||||
url = "https://github.com/fritzing/fritzing-app/commit/ef83ebd9113266bb31b3604e3e9d0332bb48c999.patch";
|
||||
sha256 = "sha256-J43E6iBRIVbsuuo82gPk3Q7tyLhNkuuyYwtH8hUfcPU=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace phoenix.pro \
|
||||
--replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false'
|
||||
|
||||
#TODO: Do not hardcode SHA.
|
||||
substituteInPlace src/fapplication.cpp \
|
||||
--replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";'
|
||||
|
||||
mkdir parts
|
||||
cp -a ${parts}/* parts/
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"phoenix.pro"
|
||||
"DEFINES=QUAZIP_INSTALLED"
|
||||
"DEFINES+=QUAZIP_1X"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# generate the parts.db file
|
||||
QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \
|
||||
-db "$out/share/fritzing/parts/parts.db" \
|
||||
-pp "$out/share/fritzing/parts" \
|
||||
-folder "$out/share/fritzing"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source prototyping tool for Arduino-based projects";
|
||||
homepage = "https://fritzing.org/";
|
||||
license = with licenses; [ gpl3 cc-by-sa-30 ];
|
||||
maintainers = with maintainers; [ robberer muscaln ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
35
pkgs/applications/science/electronics/gaw/default.nix
Normal file
35
pkgs/applications/science/electronics/gaw/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, lib
|
||||
, gtk3
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gaw";
|
||||
version = "20220315";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.tuxfamily.org/gaw/download/gaw3-${version}.tar.gz";
|
||||
sha256 = "0j2bqi9444s1mfbr7x9rqp232xf7ab9z7ifsnl305jsklp6qmrbg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ gtk3 ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Gtk Analog Wave viewer";
|
||||
longDescription = ''
|
||||
Gaw is a software tool for displaying analog waveforms from
|
||||
sampled datas, for example from the output of simulators or
|
||||
input from sound cards. Data can be imported to gaw using files,
|
||||
direct tcp/ip connection or directly from the sound card.
|
||||
'';
|
||||
homepage = "http://gaw.tuxfamily.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
25
pkgs/applications/science/electronics/geda/default.nix
Normal file
25
pkgs/applications/science/electronics/geda/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, guile, gtk2, flex, gawk, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "geda";
|
||||
version = "1.8.2-20130925";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.geda-project.org/geda-gaf/stable/v1.8/1.8.2/geda-gaf-1.8.2.tar.gz";
|
||||
sha256 = "08dpa506xk4gjbbi8vnxcb640wq4ihlgmhzlssl52nhvxwx7gx5v";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--disable-update-xdg-database"
|
||||
];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ guile gtk2 flex gawk perl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Full GPL'd suite of Electronic Design Automation tools";
|
||||
homepage = "http://www.geda-project.org/";
|
||||
maintainers = with maintainers; [ pjones ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
35
pkgs/applications/science/electronics/gerbv/default.nix
Normal file
35
pkgs/applications/science/electronics/gerbv/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchgit, fetchpatch, pkg-config, gettext, libtool, automake, autoconf, cairo, gtk2, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gerbv";
|
||||
version = "2015-10-08";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.geda-project.org/gerbv.git";
|
||||
rev = "76b8b67bfa10823ce98f1c4c3b49a2afcadf7659";
|
||||
sha256 = "00jn1xhf6kblxc5gac1wvk8zm12fy6sk81nj3jwdag0z6wk3z446";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull patch pending upstream inclusion for -fno-common toolchains:
|
||||
# https://sourceforge.net/p/gerbv/patches/84/
|
||||
(fetchpatch {
|
||||
name = "fnoc-mmon.patch";
|
||||
url = "https://sourceforge.net/p/gerbv/patches/84/attachment/0001-gerbv-fix-build-on-gcc-10-fno-common.patch";
|
||||
sha256 = "1avfbkqhxl7wxn1z19y30ilkwvdgpdkzhzawrs5y3damxmqq8ggk";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config automake autoconf ];
|
||||
buildInputs = [ gettext libtool cairo gtk2 ];
|
||||
|
||||
configureFlags = ["--disable-update-desktop-database"];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Gerber (RS-274X) viewer";
|
||||
homepage = "http://gerbv.geda-project.org/";
|
||||
maintainers = with maintainers; [ mog ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
27
pkgs/applications/science/electronics/gnucap/default.nix
Normal file
27
pkgs/applications/science/electronics/gnucap/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnucap";
|
||||
version = "20210107";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/${pname}-${version}.tar.gz";
|
||||
sha256 = "12rlwd4mfc54qq1wrx5k8qk578xls5z4isf94ybkf2z6qxk4mhnj";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnu Circuit Analysis Package";
|
||||
longDescription = ''
|
||||
Gnucap is a modern general purpose circuit simulator with several advantages over Spice derivatives.
|
||||
It performs nonlinear dc and transient analyses, fourier analysis, and ac analysis.
|
||||
'';
|
||||
homepage = "http://www.gnucap.org/";
|
||||
changelog = "https://git.savannah.gnu.org/cgit/gnucap.git/plain/NEWS?h=v${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
broken = stdenv.isDarwin; # Relies on LD_LIBRARY_PATH
|
||||
maintainers = [ maintainers.raboof ];
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/science/electronics/gtkwave/default.nix
Normal file
42
pkgs/applications/science/electronics/gtkwave/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ bzip2
|
||||
, fetchurl
|
||||
, glib
|
||||
, gperf
|
||||
, gtk3
|
||||
, judy
|
||||
, lib
|
||||
, pkg-config
|
||||
, stdenv
|
||||
, tcl
|
||||
, tk
|
||||
, wrapGAppsHook
|
||||
, xz
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gtkwave";
|
||||
version = "3.3.111";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz";
|
||||
sha256 = "0cv222qhgldfniz6zys52zhrynfsp5v0h8ia857lng7v33vw5qdl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||
buildInputs = [ bzip2 glib gperf gtk3 judy tcl tk xz ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-tcl=${tcl}/lib"
|
||||
"--with-tk=${tk}/lib"
|
||||
"--enable-judy"
|
||||
"--enable-gtk3"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "VCD/Waveform viewer for Unix and Win32";
|
||||
homepage = "http://gtkwave.sourceforge.net";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config, python3Packages
|
||||
, boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook
|
||||
, graphviz, llvmPackages, z3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.3.0";
|
||||
pname = "hal-hardware-analyzer";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emsec";
|
||||
repo = "hal";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-uNpELHhSAVRJL/4iypvnl3nX45SqB419r37lthd2WmQ=";
|
||||
};
|
||||
# make sure bundled dependencies don't get in the way - install also otherwise
|
||||
# copies them in full to the output, bloating the package
|
||||
postPatch = ''
|
||||
shopt -s extglob
|
||||
rm -rf deps/!(sanitizers-cmake)/*
|
||||
shopt -u extglob
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkg-config ];
|
||||
buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog graphviz wrapQtAppsHook z3 ]
|
||||
++ (with python3Packages; [ python pybind11 ])
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
|
||||
|
||||
cmakeFlags = with lib.versions; [
|
||||
"-DHAL_VERSION_RETURN=${version}"
|
||||
"-DHAL_VERSION_MAJOR=${major version}"
|
||||
"-DHAL_VERSION_MINOR=${minor version}"
|
||||
"-DHAL_VERSION_PATCH=${patch version}"
|
||||
"-DHAL_VERSION_TWEAK=0"
|
||||
"-DHAL_VERSION_ADDITIONAL_COMMITS=0"
|
||||
"-DHAL_VERSION_DIRTY=false"
|
||||
"-DHAL_VERSION_BROKEN=false"
|
||||
"-DENABLE_INSTALL_LDCONFIG=off"
|
||||
"-DBUILD_ALL_PLUGINS=on"
|
||||
];
|
||||
# needed for macos build - this is why we use wrapQtAppsHook instead of
|
||||
# the qt mkDerivation - the latter forcibly overrides this.
|
||||
cmakeBuildType = "MinSizeRel";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A comprehensive reverse engineering and manipulation framework for gate-level netlists";
|
||||
homepage = "https://github.com/emsec/hal";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ris shamilton ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{ stdenv
|
||||
, boost
|
||||
, coreutils
|
||||
, cppzmq
|
||||
, curl
|
||||
, libepoxy
|
||||
, fetchFromGitHub
|
||||
, glm
|
||||
, gtkmm3
|
||||
, lib
|
||||
, libarchive
|
||||
, libgit2
|
||||
, librsvg
|
||||
, libspnav
|
||||
, libuuid
|
||||
, opencascade
|
||||
, pkg-config
|
||||
, podofo
|
||||
, python3
|
||||
, sqlite
|
||||
, wrapGAppsHook
|
||||
, zeromq
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "horizon-eda";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "horizon-eda";
|
||||
repo = "horizon";
|
||||
rev = "v${version}";
|
||||
sha256 = "0lw5j1zqd2wdafgxl4ahcphaabs7vlw4kaa1c566hwfjxs46dmg9";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
cppzmq
|
||||
curl
|
||||
libepoxy
|
||||
glm
|
||||
gtkmm3
|
||||
libarchive
|
||||
libgit2
|
||||
librsvg
|
||||
libspnav
|
||||
libuuid
|
||||
opencascade
|
||||
podofo
|
||||
python3
|
||||
sqlite
|
||||
zeromq
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
boost.dev
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
CASROOT = opencascade;
|
||||
|
||||
installFlags = [
|
||||
"INSTALL=${coreutils}/bin/install"
|
||||
"DESTDIR=$(out)"
|
||||
"PREFIX="
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A free EDA software to develop printed circuit boards";
|
||||
homepage = "https://horizon-eda.org";
|
||||
maintainers = with maintainers; [ guserav ];
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
53
pkgs/applications/science/electronics/hyp2mat/default.nix
Normal file
53
pkgs/applications/science/electronics/hyp2mat/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, bison
|
||||
, flex
|
||||
, gengetopt
|
||||
, help2man
|
||||
, groff
|
||||
, libharu
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, libpng
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hyp2mat";
|
||||
version = "0.0.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "koendv";
|
||||
repo = "hyp2mat";
|
||||
rev = "v${version}";
|
||||
sha256 = "03ibk51swxfl7pfrhcrfiffdi4mnf8kla0g1xj1lsrvrjwapfx03";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libharu
|
||||
libpng
|
||||
zlib
|
||||
bison
|
||||
flex
|
||||
gengetopt
|
||||
help2man
|
||||
groff
|
||||
];
|
||||
|
||||
configureFlags = [ "--enable-library" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Import Hyperlynx Boardsim files to openEMS, an open source 3D full-wave electromagnetic field solver";
|
||||
homepage = "https://github.com/koendv/hyp2mat";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
176
pkgs/applications/science/electronics/kicad/base.nix
Normal file
176
pkgs/applications/science/electronics/kicad/base.nix
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, libGLU
|
||||
, libGL
|
||||
, zlib
|
||||
, wxGTK
|
||||
, libX11
|
||||
, gettext
|
||||
, glew
|
||||
, glm
|
||||
, cairo
|
||||
, curl
|
||||
, openssl
|
||||
, boost
|
||||
, pkg-config
|
||||
, doxygen
|
||||
, graphviz
|
||||
, pcre
|
||||
, libpthreadstubs
|
||||
, libXdmcp
|
||||
, lndir
|
||||
|
||||
, util-linux
|
||||
, libselinux
|
||||
, libsepol
|
||||
, libthai
|
||||
, libdatrie
|
||||
, libxkbcommon
|
||||
, libepoxy
|
||||
, dbus
|
||||
, at-spi2-core
|
||||
, libXtst
|
||||
|
||||
, swig
|
||||
, python
|
||||
, wxPython
|
||||
, opencascade-occt
|
||||
, libngspice
|
||||
, valgrind
|
||||
|
||||
, stable
|
||||
, baseName
|
||||
, kicadSrc
|
||||
, kicadVersion
|
||||
, withOCC
|
||||
, withNgspice
|
||||
, withScripting
|
||||
, withI18n
|
||||
, withPCM
|
||||
, debug
|
||||
, sanitizeAddress
|
||||
, sanitizeThreads
|
||||
}:
|
||||
|
||||
assert lib.assertMsg (!(sanitizeAddress && sanitizeThreads))
|
||||
"'sanitizeAddress' and 'sanitizeThreads' are mutually exclusive, use one.";
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kicad-base";
|
||||
version = if (stable) then kicadVersion else builtins.substring 0 10 src.rev;
|
||||
|
||||
src = kicadSrc;
|
||||
|
||||
# tagged releases don't have "unknown"
|
||||
# kicad nightlies use git describe --dirty
|
||||
# nix removes .git, so its approximated here
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeModules/KiCadVersion.cmake \
|
||||
--replace "unknown" "${builtins.substring 0 10 src.rev}" \
|
||||
'';
|
||||
|
||||
makeFlags = optionals (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ];
|
||||
|
||||
cmakeFlags = optionals (withScripting) [
|
||||
"-DKICAD_SCRIPTING_WXPYTHON=ON"
|
||||
]
|
||||
++ optionals (!withScripting) [
|
||||
"-DKICAD_SCRIPTING_WXPYTHON=OFF"
|
||||
]
|
||||
++ optional (!withNgspice) "-DKICAD_SPICE=OFF"
|
||||
++ optional (!withOCC) "-DKICAD_USE_OCC=OFF"
|
||||
++ optionals (withOCC) [
|
||||
"-DKICAD_USE_OCC=ON"
|
||||
"-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
|
||||
]
|
||||
++ optionals (debug) [
|
||||
"-DCMAKE_BUILD_TYPE=Debug"
|
||||
"-DKICAD_STDLIB_DEBUG=ON"
|
||||
"-DKICAD_USE_VALGRIND=ON"
|
||||
]
|
||||
++ optionals (!doInstallCheck) [
|
||||
"-DKICAD_BUILD_QA_TESTS=OFF"
|
||||
]
|
||||
++ optionals (sanitizeAddress) [
|
||||
"-DKICAD_SANITIZE_ADDRESS=ON"
|
||||
]
|
||||
++ optionals (sanitizeThreads) [
|
||||
"-DKICAD_SANITIZE_THREADS=ON"
|
||||
]
|
||||
++ optionals (withI18n) [
|
||||
"-DKICAD_BUILD_I18N=ON"
|
||||
]
|
||||
++ optionals (!withPCM && stable) [
|
||||
"-DKICAD_PCM=OFF"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
graphviz
|
||||
pkg-config
|
||||
lndir
|
||||
]
|
||||
# wanted by configuration on linux, doesn't seem to affect performance
|
||||
# no effect on closure size
|
||||
++ optionals (stdenv.isLinux) [
|
||||
util-linux
|
||||
libselinux
|
||||
libsepol
|
||||
libthai
|
||||
libdatrie
|
||||
libxkbcommon
|
||||
libepoxy
|
||||
dbus.daemon
|
||||
at-spi2-core
|
||||
libXtst
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libGLU
|
||||
libGL
|
||||
zlib
|
||||
libX11
|
||||
wxGTK
|
||||
wxGTK.gtk
|
||||
pcre
|
||||
libXdmcp
|
||||
gettext
|
||||
glew
|
||||
glm
|
||||
libpthreadstubs
|
||||
cairo
|
||||
curl
|
||||
openssl
|
||||
boost
|
||||
swig
|
||||
python
|
||||
]
|
||||
++ optional (withScripting) wxPython
|
||||
++ optional (withNgspice) libngspice
|
||||
++ optional (withOCC) opencascade-occt
|
||||
++ optional (debug) valgrind
|
||||
;
|
||||
|
||||
# debug builds fail all but the python test
|
||||
#doInstallCheck = !debug;
|
||||
# temporarily disabled until upstream issue 9888 is resolved
|
||||
doInstallCheck = false;
|
||||
installCheckTarget = "test";
|
||||
|
||||
dontStrip = debug;
|
||||
|
||||
meta = {
|
||||
description = "Just the built source without the libraries";
|
||||
longDescription = ''
|
||||
Just the build products, the libraries are passed via an env var in the wrapper, default.nix
|
||||
'';
|
||||
homepage = "https://www.kicad.org/";
|
||||
license = lib.licenses.agpl3;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
239
pkgs/applications/science/electronics/kicad/default.nix
Normal file
239
pkgs/applications/science/electronics/kicad/default.nix
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitLab
|
||||
, gnome
|
||||
, dconf
|
||||
, wxGTK31-gtk3
|
||||
, makeWrapper
|
||||
, gsettings-desktop-schemas
|
||||
, hicolor-icon-theme
|
||||
, callPackage
|
||||
, callPackages
|
||||
, librsvg
|
||||
, cups
|
||||
|
||||
, pname ? "kicad"
|
||||
, stable ? true
|
||||
, withOCC ? true
|
||||
, withNgspice ? true
|
||||
, libngspice
|
||||
, withScripting ? true
|
||||
, python3
|
||||
, debug ? false
|
||||
, sanitizeAddress ? false
|
||||
, sanitizeThreads ? false
|
||||
, with3d ? true
|
||||
, withI18n ? true
|
||||
, withPCM ? true # Plugin and Content Manager
|
||||
, srcs ? { }
|
||||
}:
|
||||
|
||||
# The `srcs` parameter can be used to override the kicad source code
|
||||
# and all libraries, which are otherwise inaccessible
|
||||
# to overlays since most of the kicad build expression has been
|
||||
# refactored into base.nix, most of the library build expressions have
|
||||
# been refactored into libraries.nix. Overrides are only applied when
|
||||
# building `kicad-unstable`. The `srcs` parameter has
|
||||
# no effect for stable `kicad`. `srcs` takes an attribute set in which
|
||||
# any of the following attributes are meaningful (though none are
|
||||
# mandatory): "kicad", "kicadVersion", "symbols", "templates",
|
||||
# "footprints", "packages3d", and "libVersion". "kicadVersion" and
|
||||
# "libVersion" should be set to a string with the desired value for
|
||||
# the version attribute in kicad's `mkDerivation` and the version
|
||||
# attribute in any of the library's `mkDerivation`, respectively.
|
||||
# "kicad", "symbols", "templates", "footprints", and "packages3d"
|
||||
# should be set to an appropriate fetcher (e.g. `fetchFromGitLab`).
|
||||
# So, for example, a possible overlay for kicad is:
|
||||
#
|
||||
# final: prev:
|
||||
|
||||
# {
|
||||
# kicad-unstable = (prev.kicad-unstable.override {
|
||||
# srcs = {
|
||||
# kicadVersion = "2020-10-08";
|
||||
# kicad = prev.fetchFromGitLab {
|
||||
# group = "kicad";
|
||||
# owner = "code";
|
||||
# repo = "kicad";
|
||||
# rev = "fd22fe8e374ce71d57e9f683ba996651aa69fa4e";
|
||||
# sha256 = "sha256-F8qugru/jU3DgZSpQXQhRGNFSk0ybFRkpyWb7HAGBdc=";
|
||||
# };
|
||||
# };
|
||||
# });
|
||||
# }
|
||||
|
||||
let
|
||||
baseName = if (stable) then "kicad" else "kicad-unstable";
|
||||
versionsImport = import ./versions.nix;
|
||||
|
||||
# versions.nix does not provide us with version, src and rev. We
|
||||
# need to turn this into approprate fetcher calls.
|
||||
kicadSrcFetch = fetchFromGitLab {
|
||||
group = "kicad";
|
||||
owner = "code";
|
||||
repo = "kicad";
|
||||
rev = versionsImport.${baseName}.kicadVersion.src.rev;
|
||||
sha256 = versionsImport.${baseName}.kicadVersion.src.sha256;
|
||||
};
|
||||
|
||||
libSrcFetch = name: fetchFromGitLab {
|
||||
group = "kicad";
|
||||
owner = "libraries";
|
||||
repo = "kicad-${name}";
|
||||
rev = versionsImport.${baseName}.libVersion.libSources.${name}.rev;
|
||||
sha256 = versionsImport.${baseName}.libVersion.libSources.${name}.sha256;
|
||||
};
|
||||
|
||||
# only override `src` or `version` if building `kicad-unstable` with
|
||||
# the appropriate attribute defined in `srcs`.
|
||||
srcOverridep = attr: (!stable && builtins.hasAttr attr srcs);
|
||||
|
||||
# use default source and version (as defined in versions.nix) by
|
||||
# default, or use the appropriate attribute from `srcs` if building
|
||||
# unstable with `srcs` properly defined.
|
||||
kicadSrc =
|
||||
if srcOverridep "kicad" then srcs.kicad
|
||||
else kicadSrcFetch;
|
||||
kicadVersion =
|
||||
if srcOverridep "kicadVersion" then srcs.kicadVersion
|
||||
else versionsImport.${baseName}.kicadVersion.version;
|
||||
|
||||
libSrc = name: if srcOverridep name then srcs.${name} else libSrcFetch name;
|
||||
# TODO does it make sense to only have one version for all libs?
|
||||
libVersion =
|
||||
if srcOverridep "libVersion" then srcs.libVersion
|
||||
else versionsImport.${baseName}.libVersion.version;
|
||||
|
||||
wxGTK = wxGTK31-gtk3;
|
||||
python = python3;
|
||||
wxPython = python.pkgs.wxPython_4_1;
|
||||
|
||||
inherit (lib) concatStringsSep flatten optionalString optionals;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
# Common libraries, referenced during runtime, via the wrapper.
|
||||
passthru.libraries = callPackages ./libraries.nix { inherit libSrc; };
|
||||
base = callPackage ./base.nix {
|
||||
inherit stable baseName;
|
||||
inherit kicadSrc kicadVersion;
|
||||
inherit wxGTK python wxPython;
|
||||
inherit withOCC withNgspice withScripting withI18n withPCM;
|
||||
inherit debug sanitizeAddress sanitizeThreads;
|
||||
};
|
||||
|
||||
inherit pname;
|
||||
version = if (stable) then kicadVersion else builtins.substring 0 10 src.src.rev;
|
||||
|
||||
src = base;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
pythonPath = optionals (withScripting)
|
||||
[ wxPython python.pkgs.six ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ]
|
||||
++ optionals (withScripting)
|
||||
[ python.pkgs.wrapPython ];
|
||||
|
||||
# We are emulating wrapGAppsHook, along with other variables to the
|
||||
# wrapper
|
||||
makeWrapperArgs = with passthru.libraries; [
|
||||
"--prefix XDG_DATA_DIRS : ${base}/share"
|
||||
"--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share"
|
||||
"--prefix XDG_DATA_DIRS : ${gnome.adwaita-icon-theme}/share"
|
||||
"--prefix XDG_DATA_DIRS : ${wxGTK.gtk}/share/gsettings-schemas/${wxGTK.gtk.name}"
|
||||
"--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
|
||||
# wrapGAppsHook did these two as well, no idea if it matters...
|
||||
"--prefix XDG_DATA_DIRS : ${cups}/share"
|
||||
"--prefix GIO_EXTRA_MODULES : ${dconf}/lib/gio/modules"
|
||||
# required to open a bug report link in firefox-wayland
|
||||
"--set-default MOZ_DBUS_REMOTE 1"
|
||||
"--set-default KICAD6_FOOTPRINT_DIR ${footprints}/share/kicad/footprints"
|
||||
"--set-default KICAD6_SYMBOL_DIR ${symbols}/share/kicad/symbols"
|
||||
"--set-default KICAD6_TEMPLATE_DIR ${templates}/share/kicad/template"
|
||||
"--prefix KICAD6_TEMPLATE_DIR : ${symbols}/share/kicad/template"
|
||||
"--prefix KICAD6_TEMPLATE_DIR : ${footprints}/share/kicad/template"
|
||||
]
|
||||
++ optionals (with3d)
|
||||
[
|
||||
"--set-default KICAD6_3DMODEL_DIR ${packages3d}/share/kicad/3dmodels"
|
||||
]
|
||||
++ optionals (withNgspice) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ]
|
||||
|
||||
# infinisil's workaround for #39493
|
||||
++ [ "--set GDK_PIXBUF_MODULE_FILE ${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]
|
||||
;
|
||||
|
||||
# why does $makeWrapperArgs have to be added explicitly?
|
||||
# $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set?
|
||||
installPhase =
|
||||
let
|
||||
tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ];
|
||||
utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" ];
|
||||
in
|
||||
(concatStringsSep "\n"
|
||||
(flatten [
|
||||
"runHook preInstall"
|
||||
|
||||
(optionalString (withScripting) "buildPythonPath \"${base} $pythonPath\" \n")
|
||||
|
||||
# wrap each of the directly usable tools
|
||||
(map
|
||||
(tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs"
|
||||
+ optionalString (withScripting) " --set PYTHONPATH \"$program_PYTHONPATH\""
|
||||
)
|
||||
tools)
|
||||
|
||||
# link in the CLI utils
|
||||
(map (util: "ln -s ${base}/bin/${util} $out/bin/${util}") utils)
|
||||
|
||||
"runHook postInstall"
|
||||
])
|
||||
)
|
||||
;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share
|
||||
ln -s ${base}/share/applications $out/share/applications
|
||||
ln -s ${base}/share/icons $out/share/icons
|
||||
ln -s ${base}/share/mime $out/share/mime
|
||||
ln -s ${base}/share/metainfo $out/share/metainfo
|
||||
'';
|
||||
|
||||
# can't run this for each pname
|
||||
# stable and unstable are in the same versions.nix
|
||||
# and kicad-small reuses stable
|
||||
# with "all" it updates both, run it manually if you don't want that
|
||||
# and can't git commit if this could be running in parallel with other scripts
|
||||
passthru.updateScript = [ ./update.sh "all" ];
|
||||
|
||||
meta = rec {
|
||||
description = (if (stable)
|
||||
then "Open Source Electronics Design Automation suite"
|
||||
else "Open Source EDA suite, development build")
|
||||
+ (if (!with3d) then ", without 3D models" else "");
|
||||
homepage = "https://www.kicad.org/";
|
||||
longDescription = ''
|
||||
KiCad is an open source software suite for Electronic Design Automation.
|
||||
The Programs handle Schematic Capture, and PCB Layout with Gerber output.
|
||||
'';
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ evils kiwi ];
|
||||
# kicad is cross platform
|
||||
platforms = lib.platforms.all;
|
||||
# despite that, nipkgs' wxGTK for darwin is "wxmac"
|
||||
# and wxPython_4_0 does not account for this
|
||||
# adjusting this package to downgrade to python2Packages.wxPython (wxPython 3),
|
||||
# seems like more trouble than fixing wxPython_4_0 would be
|
||||
# additionally, libngspice is marked as linux only, though it should support darwin
|
||||
|
||||
hydraPlatforms = if (with3d) then [ ] else platforms;
|
||||
# We can't download the 3d models on Hydra,
|
||||
# they are a ~1 GiB download and they occupy ~5 GiB in store.
|
||||
# as long as the base and libraries (minus 3d) are build,
|
||||
# this wrapper does not need to get built
|
||||
# the kicad-*small "packages" cause this to happen
|
||||
};
|
||||
}
|
||||
30
pkgs/applications/science/electronics/kicad/libraries.nix
Normal file
30
pkgs/applications/science/electronics/kicad/libraries.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv
|
||||
, cmake
|
||||
, gettext
|
||||
, libSrc
|
||||
}:
|
||||
let
|
||||
mkLib = name:
|
||||
stdenv.mkDerivation {
|
||||
pname = "kicad-${name}";
|
||||
version = builtins.substring 0 10 (libSrc name).rev;
|
||||
|
||||
src = libSrc name;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = rec {
|
||||
license = lib.licenses.cc-by-sa-40;
|
||||
platforms = lib.platforms.all;
|
||||
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
|
||||
# this would exceed the hydra output limit
|
||||
hydraPlatforms = if (name == "packages3d") then [ ] else platforms;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
symbols = mkLib "symbols";
|
||||
templates = mkLib "templates";
|
||||
footprints = mkLib "footprints";
|
||||
packages3d = mkLib "packages3d";
|
||||
}
|
||||
189
pkgs/applications/science/electronics/kicad/update.sh
Executable file
189
pkgs/applications/science/electronics/kicad/update.sh
Executable file
|
|
@ -0,0 +1,189 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils git nix curl
|
||||
# shellcheck shell=bash enable=all
|
||||
|
||||
set -e
|
||||
shopt -s inherit_errexit
|
||||
|
||||
# this script will generate versions.nix in the right location
|
||||
# this should contain the versions' revs and hashes
|
||||
# the stable revs are stored only for ease of skipping
|
||||
|
||||
# by default nix-prefetch-url uses XDG_RUNTIME_DIR as tmp
|
||||
# which is /run/user/1000, which defaults to 10% of your RAM
|
||||
# unless you have over 64GB of ram that'll be insufficient
|
||||
# resulting in "tar: no space left on device" for packages3d
|
||||
# hence:
|
||||
export TMPDIR=/tmp
|
||||
|
||||
# if something goes unrepairably wrong, run 'update.sh all clean'
|
||||
|
||||
# TODO
|
||||
# support parallel instances for each pname
|
||||
# currently risks reusing old data
|
||||
# no getting around manually checking if the build product works...
|
||||
# if there is, default to commiting?
|
||||
# won't work when running in parallel?
|
||||
# remove items left in /nix/store?
|
||||
|
||||
# get the latest tag that isn't an RC or *.99
|
||||
latest_tags="$(git ls-remote --tags --sort -version:refname https://gitlab.com/kicad/code/kicad.git)"
|
||||
# using a scratch variable to ensure command failures get caught (SC2312)
|
||||
scratch="$(grep -o 'refs/tags/[0-9]*\.[0-9]*\.[0-9]*$' <<< "${latest_tags}")"
|
||||
scratch="$(grep -ve '\.99' -e '\.9\.9' <<< "${scratch}")"
|
||||
scratch="$(head -n 1 <<< "${scratch}")"
|
||||
latest_tag="$(cut -d '/' -f 3 <<< "${scratch}")"
|
||||
|
||||
all_versions=( "${latest_tag}" master )
|
||||
|
||||
prefetch="nix-prefetch-url --unpack --quiet"
|
||||
|
||||
clean=""
|
||||
check_stable=""
|
||||
check_unstable=1
|
||||
commit=""
|
||||
|
||||
for arg in "$@"; do
|
||||
case "${arg}" in
|
||||
help|-h|--help) echo "Read me!" >&2; exit 1; ;;
|
||||
kicad|release|tag|stable|*small|5*|6*) check_stable=1; check_unstable="" ;;
|
||||
all|both|full) check_stable=1; check_unstable=1 ;;
|
||||
commit) commit=1 ;;
|
||||
clean|fix|*fuck) check_stable=1; check_unstable=1; clean=1 ;;
|
||||
master|*unstable|latest|now|today) check_unstable=1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
now=$(date --iso-8601 --utc)
|
||||
|
||||
file="${here}/versions.nix"
|
||||
# just in case this runs in parallel
|
||||
tmp="${here}/,versions.nix.${RANDOM}"
|
||||
|
||||
libs=( symbols templates footprints packages3d )
|
||||
|
||||
get_rev() {
|
||||
git ls-remote --heads --tags "$@"
|
||||
}
|
||||
|
||||
gitlab="https://gitlab.com/kicad"
|
||||
# append commit hash or tag
|
||||
src_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/archive.tar.gz?sha="
|
||||
lib_pre="https://gitlab.com/api/v4/projects/kicad%2Flibraries%2Fkicad-"
|
||||
lib_mid="/repository/archive.tar.gz?sha="
|
||||
|
||||
count=0
|
||||
|
||||
printf "Latest tag is\t%s\n" "${latest_tag}" >&2
|
||||
|
||||
if [[ ! -f ${file} ]]; then
|
||||
echo "No existing file, generating from scratch" >&2
|
||||
check_stable=1; check_unstable=1; clean=1
|
||||
fi
|
||||
|
||||
printf "Writing %s\n" "${tmp}" >&2
|
||||
|
||||
# not a dangling brace, grouping the output to redirect to file
|
||||
{
|
||||
|
||||
printf "# This file was generated by update.sh\n\n"
|
||||
printf "{\n"
|
||||
|
||||
for version in "${all_versions[@]}"; do
|
||||
|
||||
if [[ ${version} == "master" ]]; then
|
||||
pname="kicad-unstable"
|
||||
today="${now}"
|
||||
else
|
||||
pname="kicad"
|
||||
today="${version}"
|
||||
fi
|
||||
# skip a version if we don't want to check it
|
||||
if [[ (${version} != "master" && -n ${check_stable}) \
|
||||
|| (${version} == "master" && -n ${check_unstable}) ]]; then
|
||||
|
||||
printf "\nChecking %s\n" "${pname}" >&2
|
||||
|
||||
printf "%2s\"%s\" = {\n" "" "${pname}"
|
||||
printf "%4skicadVersion = {\n" ""
|
||||
printf "%6sversion =\t\t\t\"%s\";\n" "" "${today}"
|
||||
printf "%6ssrc = {\n" ""
|
||||
|
||||
echo "Checking src" >&2
|
||||
scratch="$(get_rev "${gitlab}"/code/kicad.git "${version}")"
|
||||
src_rev="$(cut -f1 <<< "${scratch}")"
|
||||
has_rev="$(grep -sm 1 "\"${pname}\"" -A 4 "${file}" | grep -sm 1 "${src_rev}" || true)"
|
||||
has_hash="$(grep -sm 1 "\"${pname}\"" -A 5 "${file}" | grep -sm 1 "sha256" || true)"
|
||||
|
||||
if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then
|
||||
echo "Reusing old ${pname}.src.sha256, already latest .rev" >&2
|
||||
scratch=$(grep -sm 1 "\"${pname}\"" -A 5 "${file}")
|
||||
grep -sm 1 "rev" -A 1 <<< "${scratch}"
|
||||
else
|
||||
prefetched="$(${prefetch} "${src_pre}${src_rev}")"
|
||||
printf "%8srev =\t\t\t\"%s\";\n" "" "${src_rev}"
|
||||
printf "%8ssha256 =\t\t\"%s\";\n" "" "${prefetched}"
|
||||
count=$((count+1))
|
||||
fi
|
||||
printf "%6s};\n" ""
|
||||
printf "%4s};\n" ""
|
||||
|
||||
printf "%4slibVersion = {\n" ""
|
||||
printf "%6sversion =\t\t\t\"%s\";\n" "" "${today}"
|
||||
printf "%6slibSources = {\n" ""
|
||||
|
||||
for lib in "${libs[@]}"; do
|
||||
echo "Checking ${lib}" >&2
|
||||
url="${gitlab}/libraries/kicad-${lib}.git"
|
||||
scratch="$(get_rev "${url}" "${version}")"
|
||||
scratch="$(cut -f1 <<< "${scratch}")"
|
||||
lib_rev="$(tail -n1 <<< "${scratch}")"
|
||||
has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)"
|
||||
has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256" || true)"
|
||||
if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then
|
||||
echo "Reusing old kicad-${lib}-${today}.src.sha256, already latest .rev" >&2
|
||||
scratch="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}")"
|
||||
grep -sm 1 "${lib}" -A 1 <<< "${scratch}"
|
||||
else
|
||||
prefetched="$(${prefetch} "${lib_pre}${lib}${lib_mid}${lib_rev}")"
|
||||
printf "%8s%s.rev =\t" "" "${lib}"
|
||||
case "${lib}" in
|
||||
symbols|templates) printf "\t" ;; *) ;;
|
||||
esac
|
||||
printf "\"%s\";\n" "${lib_rev}"
|
||||
printf "%8s%s.sha256 =\t\"%s\";\n" "" "${lib}" "${prefetched}"
|
||||
count=$((count+1))
|
||||
fi
|
||||
done
|
||||
printf "%6s};\n" ""
|
||||
printf "%4s};\n" ""
|
||||
printf "%2s};\n" ""
|
||||
else
|
||||
printf "\nReusing old %s\n" "${pname}" >&2
|
||||
grep -sm 1 "\"${pname}\"" -A 21 "${file}"
|
||||
fi
|
||||
done
|
||||
printf "}\n"
|
||||
} > "${tmp}"
|
||||
|
||||
if grep '""' "${tmp}"; then
|
||||
echo "empty value detected, out of space?" >&2
|
||||
exit "1"
|
||||
fi
|
||||
|
||||
mv "${tmp}" "${file}"
|
||||
|
||||
printf "\nFinished\nMoved output to %s\n\n" "${file}" >&2
|
||||
|
||||
if [[ ${count} -gt 0 ]]; then
|
||||
if [[ ${count} -gt 1 ]]; then s="s"; else s=""; fi
|
||||
echo "${count} revision${s} changed" >&2
|
||||
if [[ -n ${commit} ]]; then
|
||||
git commit -am "$(printf "kicad: automatic update of %s item%s\n" "${count}" "${s}")"
|
||||
fi
|
||||
echo "Please confirm the new versions.nix works before making a PR." >&2
|
||||
else
|
||||
echo "No changes, those checked are up to date" >&2
|
||||
fi
|
||||
48
pkgs/applications/science/electronics/kicad/versions.nix
Normal file
48
pkgs/applications/science/electronics/kicad/versions.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# This file was generated by update.sh
|
||||
|
||||
{
|
||||
"kicad" = {
|
||||
kicadVersion = {
|
||||
version = "6.0.5";
|
||||
src = {
|
||||
rev = "a6ca702e916df70e499615d8613102e780e96a40";
|
||||
sha256 = "19mg672h1gjdvnkp13cpkhk67xpwms72y4gd6g8983fcsxr8nq23";
|
||||
};
|
||||
};
|
||||
libVersion = {
|
||||
version = "6.0.5";
|
||||
libSources = {
|
||||
symbols.rev = "c7f82c947ab3a1afec8d7b602ee7c6bfdfb24693";
|
||||
symbols.sha256 = "1dhgdp08ah08fc5nvwkqmgpl2any9vgy1gykmyzsd4dl8hhvznh5";
|
||||
templates.rev = "5ec65bfd3ecefaf85f79db02981f0568fe8b0eb8";
|
||||
templates.sha256 = "13h9ly6amiwm7zkwa2fd9730kh295ls8j95fszlfjp9rczv2yyzm";
|
||||
footprints.rev = "35e3d08f1ab23b5b08ba903572776aab6de7499f";
|
||||
footprints.sha256 = "0sxzd4dr1g12ck8b2wsyg9r2s1j3472nksrjrwpzjdyfc8rqbjai";
|
||||
packages3d.rev = "6ea94caf40c4bdccecb569e81ed82b902d4c104e";
|
||||
packages3d.sha256 = "00i6mybg3pprzb283b26z5b2g7a8sbghlvc0fwk9gwrp3wz1yqzc";
|
||||
};
|
||||
};
|
||||
};
|
||||
"kicad-unstable" = {
|
||||
kicadVersion = {
|
||||
version = "2022-05-06";
|
||||
src = {
|
||||
rev = "dfdedfa605f58711d286d6e24e4ae9b5f75444e6";
|
||||
sha256 = "1bs7s2x0zh3wbk2hawg47v1s3nidmcl0xaardbpiafrrnh1qprf2";
|
||||
};
|
||||
};
|
||||
libVersion = {
|
||||
version = "2022-05-06";
|
||||
libSources = {
|
||||
symbols.rev = "e1d70243a68a721a9f94a7df1d04c9c6ebc056ef";
|
||||
symbols.sha256 = "0gbl22g73cms9jrk9f6dlgd3ksnhiik39aywfm15m98jfglnlbg8";
|
||||
templates.rev = "a27d83f0a20f0be0c1ab04b139a0c518da51a5d4";
|
||||
templates.sha256 = "13h9ly6amiwm7zkwa2fd9730kh295ls8j95fszlfjp9rczv2yyzm";
|
||||
footprints.rev = "25bb68c2d0e61d1e1e31375adfcf0b6ccdb33ff9";
|
||||
footprints.sha256 = "0sxzd4dr1g12ck8b2wsyg9r2s1j3472nksrjrwpzjdyfc8rqbjai";
|
||||
packages3d.rev = "ac7189ed55d5a3bf5eaa87d31fb97a3e7b5ad80e";
|
||||
packages3d.sha256 = "00i6mybg3pprzb283b26z5b2g7a8sbghlvc0fwk9gwrp3wz1yqzc";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
61
pkgs/applications/science/electronics/lepton-eda/default.nix
Normal file
61
pkgs/applications/science/electronics/lepton-eda/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, pkg-config
|
||||
, makeWrapper
|
||||
, texinfo
|
||||
, fetchurl
|
||||
, autoreconfHook
|
||||
, guile
|
||||
, flex
|
||||
, gtk2
|
||||
, glib
|
||||
, gtkextra
|
||||
, gettext
|
||||
, gawk
|
||||
, shared-mime-info
|
||||
, groff
|
||||
, libstroke
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lepton-eda";
|
||||
version = "1.9.17-20211219";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/lepton-eda/lepton-eda/releases/download/${version}/lepton-eda-${builtins.head (lib.splitString "-" version)}.tar.gz";
|
||||
sha256 = "sha256-lOneKeJUcw6jOX/3iv9BDWOJ3xip/vGhzxHHNAbtsS8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper texinfo autoreconfHook ];
|
||||
|
||||
propagatedBuildInputs = [ guile flex gtk2 glib gtkextra gettext gawk shared-mime-info groff libstroke ];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-update-xdg-database"
|
||||
];
|
||||
|
||||
CFLAGS = [
|
||||
"-DSCM_DEBUG_TYPING_STRICTNESS=2"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
libs="${lib.makeLibraryPath propagatedBuildInputs}"
|
||||
for program in $out/bin/*; do
|
||||
wrapProgram "$program" \
|
||||
--prefix LD_LIBRARY_PATH : "$libs" \
|
||||
--prefix LTDL_LIBRARY_PATH : "$out/lib"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/lepton-eda";
|
||||
description = "Lepton Electronic Design Automation";
|
||||
longDescription = ''
|
||||
Lepton EDA is a suite of free software tools for designing electronics.
|
||||
It provides schematic capture, netlisting into over 30 netlist formats, and many other features.
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ tesq0 ];
|
||||
};
|
||||
}
|
||||
27
pkgs/applications/science/electronics/librepcb/default.nix
Normal file
27
pkgs/applications/science/electronics/librepcb/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, qtbase, qttools, cmake, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "librepcb";
|
||||
version = "0.1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0gzf3asdgdicpikb412134ybqnbbark948yrfhvba2w4i9cwbk2r";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A free EDA software to develop printed circuit boards";
|
||||
homepage = "https://librepcb.org/";
|
||||
maintainers = with maintainers; [ luz thoughtpolice ];
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
diff --git a/scripts/makedbh b/scripts/makedbh
|
||||
index 01e4fa5..d6299c6 100755
|
||||
--- a/scripts/makedbh
|
||||
+++ b/scripts/makedbh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/csh -f
|
||||
+#!/usr/bin/env tcsh
|
||||
#
|
||||
# makes the "database.h" (1st argument, $1) file from "database.h.in"
|
||||
# (2nd argument, $2), setting various mask operation definitions
|
||||
59
pkgs/applications/science/electronics/magic-vlsi/default.nix
Normal file
59
pkgs/applications/science/electronics/magic-vlsi/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, python3
|
||||
, m4
|
||||
, cairo
|
||||
, libX11
|
||||
, mesa_glu
|
||||
, ncurses
|
||||
, tcl
|
||||
, tcsh
|
||||
, tk
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "magic-vlsi";
|
||||
version = "8.3.277";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://opencircuitdesign.com/magic/archive/magic-${version}.tgz";
|
||||
sha256 = "sha256-cS3KaIVwGN/mMfRKjJxzdY6DeNV7tw2fATIHrFBV0fY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3 ];
|
||||
buildInputs = [
|
||||
cairo
|
||||
libX11
|
||||
m4
|
||||
mesa_glu
|
||||
ncurses
|
||||
tcl
|
||||
tcsh
|
||||
tk
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-tcl=${tcl}"
|
||||
"--with-tk=${tk}"
|
||||
"--disable-werror"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts/*
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
|
||||
|
||||
patches = [
|
||||
./0001-strip-bin-prefix.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "VLSI layout tool written in Tcl";
|
||||
homepage = "http://opencircuitdesign.com/magic/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ anna328p thoughtpolice AndersonTorres ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
lib,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
wrapQtAppsHook,
|
||||
}:
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "nanovna-saver";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NanoVNA-Saver";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1n1bh46spdyk7kgvv95hyfy9f904czhzlvk41vliqkak56hj2ss1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
cython
|
||||
scipy
|
||||
pyqt5
|
||||
pyserial
|
||||
numpy
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
dontWrapGApps = true;
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
"''${qtWrapperArgs[@]}"
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/NanoVNA-Saver/nanovna-saver";
|
||||
description =
|
||||
"A tool for reading, displaying and saving data from the NanoVNA";
|
||||
longDescription = ''
|
||||
A multiplatform tool to save Touchstone files from the NanoVNA, sweep
|
||||
frequency spans in segments to gain more than 101 data points, and
|
||||
generally display and analyze the resulting data.
|
||||
'';
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ zaninime ];
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/science/electronics/ngspice/default.nix
Normal file
36
pkgs/applications/science/electronics/ngspice/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, bison
|
||||
, flex
|
||||
, readline
|
||||
, libX11
|
||||
, libICE
|
||||
, libXaw
|
||||
, libXmu
|
||||
, libXext
|
||||
, libXt
|
||||
, fftw
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ngspice";
|
||||
version = "37";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz";
|
||||
sha256 = "1gpcic6b6xk3g4956jcsqljf33kj5g43cahmydq6m8rn39sadvlv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flex bison ];
|
||||
buildInputs = [ readline libX11 libICE libXaw libXmu libXext libXt fftw ];
|
||||
|
||||
configureFlags = [ "--enable-x" "--with-x" "--with-readline" "--enable-xspice" "--enable-cider" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Next Generation Spice (Electronic Circuit Simulator)";
|
||||
homepage = "http://ngspice.sourceforge.net";
|
||||
license = with licenses; [ "BSD" gpl2 ];
|
||||
maintainers = with maintainers; [ bgamari rongcuid ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
70
pkgs/applications/science/electronics/openems/default.nix
Normal file
70
pkgs/applications/science/electronics/openems/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, csxcad
|
||||
, fparser
|
||||
, tinyxml
|
||||
, hdf5
|
||||
, vtk
|
||||
, boost
|
||||
, zlib
|
||||
, cmake
|
||||
, octave
|
||||
, gl2ps
|
||||
, mpi
|
||||
, withQcsxcad ? true
|
||||
, withMPI ? false
|
||||
, withHyp2mat ? true
|
||||
, qcsxcad
|
||||
, hyp2mat
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openems";
|
||||
version = "unstable-2020-02-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "openEMS";
|
||||
rev = "ba793ac84e2f78f254d6d690bb5a4c626326bbfd";
|
||||
sha256 = "1dca6b6ccy771irxzsj075zvpa3dlzv4mjb8xyg9d889dqlgyl45";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals withMPI [ "-DWITH_MPI=ON" ];
|
||||
|
||||
buildInputs = [
|
||||
fparser
|
||||
tinyxml
|
||||
hdf5
|
||||
vtk
|
||||
boost
|
||||
zlib
|
||||
csxcad
|
||||
(octave.override { inherit hdf5; }) ]
|
||||
++ lib.optionals withQcsxcad [ qcsxcad ]
|
||||
++ lib.optionals withMPI [ mpi ]
|
||||
++ lib.optionals withHyp2mat [ hyp2mat ];
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/share/openEMS/matlab/setup.m \
|
||||
--replace /usr/lib ${hdf5}/lib \
|
||||
--replace /usr/include ${hdf5}/include
|
||||
|
||||
${octave}/bin/mkoctfile -L${hdf5}/lib -I${hdf5}/include \
|
||||
-lhdf5 $out/share/openEMS/matlab/h5readatt_octave.cc \
|
||||
-o $out/share/openEMS/matlab/h5readatt_octave.oct
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open Source Electromagnetic Field Solver";
|
||||
homepage = "http://openems.de/index.php/Main_Page.html";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
platforms = platforms.linux;
|
||||
badPlatforms = platforms.aarch64;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, makeWrapper, cmake, qtbase, qttools, fftw, libusb1, libglvnd }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "openhantek6022";
|
||||
version = "3.2.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenHantek";
|
||||
repo = "OpenHantek6022";
|
||||
rev = version;
|
||||
sha256 = "sha256-QwJmbABAax4yCbcRONArtj5EUKO1gh3pVoLi2hF/WJI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [ fftw libusb1 libglvnd qtbase qttools ];
|
||||
|
||||
postPatch = ''
|
||||
# Fix up install paths & checks
|
||||
sed -i 's#if(EXISTS ".*")#if(1)#g' CMakeLists.txt
|
||||
sed -i 's#/lib/udev#lib/udev#g' CMakeLists.txt
|
||||
sed -i 's#/usr/share#share#g' CMakeLists.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free software for Hantek and compatible (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes";
|
||||
homepage = "https://github.com/OpenHantek/OpenHantek6022";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ baracoder ];
|
||||
platforms = qtbase.meta.platforms;
|
||||
};
|
||||
}
|
||||
94
pkgs/applications/science/electronics/openroad/default.nix
Normal file
94
pkgs/applications/science/electronics/openroad/default.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, bison
|
||||
, cmake
|
||||
, doxygen
|
||||
, flex
|
||||
, git
|
||||
, python3
|
||||
, swig4
|
||||
, boost172
|
||||
, cimg
|
||||
, eigen
|
||||
, lcov
|
||||
, lemon-graph
|
||||
, libjpeg
|
||||
, pcre
|
||||
, qtbase
|
||||
, readline
|
||||
, spdlog
|
||||
, tcl
|
||||
, tcllib
|
||||
, xorg
|
||||
, yosys
|
||||
, zlib
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "openroad";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "The-OpenROAD-Project";
|
||||
repo = "OpenROAD";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "1p677xh16wskfj06jnplhpc3glibhdaqxmk0j09832chqlryzwyx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
cmake
|
||||
doxygen
|
||||
flex
|
||||
git
|
||||
swig4
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost172
|
||||
cimg
|
||||
eigen
|
||||
lcov
|
||||
lemon-graph
|
||||
libjpeg
|
||||
pcre
|
||||
python3
|
||||
qtbase
|
||||
readline
|
||||
spdlog
|
||||
tcl
|
||||
tcllib
|
||||
yosys
|
||||
xorg.libX11
|
||||
zlib
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build etc/find_messages.py
|
||||
'';
|
||||
|
||||
# Enable output images from the placer.
|
||||
cmakeFlags = [ "-DUSE_CIMG_LIB=ON" ];
|
||||
|
||||
# Resynthesis needs access to the Yosys binaries.
|
||||
qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ yosys ]}" ];
|
||||
|
||||
# Upstream uses vendored package versions for some dependencies, so regression testing is prudent
|
||||
# to see if there are any breaking changes in unstable that should be vendored as well.
|
||||
doCheck = false; # Disabled pending upstream release with fix for rcx log file creation.
|
||||
checkPhase = ''
|
||||
# Regression tests must be run from the project root not from within the CMake build directory.
|
||||
cd ..
|
||||
test/regression
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "OpenROAD's unified application implementing an RTL-to-GDS flow";
|
||||
homepage = "https://theopenroadproject.org";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ trepetti ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
65
pkgs/applications/science/electronics/pcb/default.nix
Normal file
65
pkgs/applications/science/electronics/pcb/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, gtk2
|
||||
, bison
|
||||
, intltool
|
||||
, flex
|
||||
, netpbm
|
||||
, imagemagick
|
||||
, dbus
|
||||
, xlibsWrapper
|
||||
, libGLU
|
||||
, libGL
|
||||
, shared-mime-info
|
||||
, tcl
|
||||
, tk
|
||||
, gnome2
|
||||
, gd
|
||||
, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pcb";
|
||||
version = "4.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/pcb/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-roUvRq+Eq6f1HYE/uRb8f82+6kP3E08VBQcCThdD+14=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
bison
|
||||
intltool
|
||||
flex
|
||||
netpbm
|
||||
imagemagick
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk2
|
||||
dbus
|
||||
xlibsWrapper
|
||||
libGLU
|
||||
libGL
|
||||
tcl
|
||||
shared-mime-info
|
||||
tk
|
||||
gnome2.gtkglext
|
||||
gd
|
||||
xorg.libXmu
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-update-desktop-database"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Printed Circuit Board editor";
|
||||
homepage = "http://pcb.geda-project.org/";
|
||||
maintainers = with maintainers; [ mog ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
137
pkgs/applications/science/electronics/picoscope/default.nix
Normal file
137
pkgs/applications/science/electronics/picoscope/default.nix
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
{ stdenv, lib, fetchurl, dpkg, makeWrapper , mono, gtk-sharp-3_0
|
||||
, glib, libusb1 , zlib, gtk3-x11, callPackage
|
||||
, scopes ? [
|
||||
"picocv"
|
||||
"ps2000"
|
||||
"ps2000a"
|
||||
"ps3000"
|
||||
"ps3000a"
|
||||
"ps4000"
|
||||
"ps4000a"
|
||||
"ps5000"
|
||||
"ps5000a"
|
||||
"ps6000"
|
||||
"ps6000a"
|
||||
] }:
|
||||
|
||||
let
|
||||
shared_meta = lib:
|
||||
with lib; {
|
||||
homepage = "https://www.picotech.com/downloads/linux";
|
||||
maintainers = with maintainers; [ expipiplus1 wirew0rm ] ++ teams.lumiguide.members;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.unfree;
|
||||
};
|
||||
|
||||
libpicoipp = callPackage ({ stdenv, lib, fetchurl, autoPatchelfHook, dpkg }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libpicoipp";
|
||||
inherit (sources.libpicoipp) version;
|
||||
src = fetchurl { inherit (sources.libpicoipp) url sha256; };
|
||||
nativeBuildInputs = [ dpkg autoPatchelfHook ];
|
||||
buildInputs = [ stdenv.cc.cc.lib ];
|
||||
sourceRoot = ".";
|
||||
unpackCmd = "dpkg-deb -x $src .";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/lib
|
||||
cp -d opt/picoscope/lib/* $out/lib
|
||||
install -Dt $out/usr/share/doc/libpicoipp usr/share/doc/libpicoipp/copyright
|
||||
runHook postInstall
|
||||
'';
|
||||
meta = with lib;
|
||||
shared_meta lib // {
|
||||
description = "library for picotech oscilloscope software";
|
||||
};
|
||||
}) { };
|
||||
|
||||
# If we don't have a platform available, put a dummy version here, so at
|
||||
# least evaluation succeeds.
|
||||
sources =
|
||||
(lib.importJSON ./sources.json).${stdenv.system} or { picoscope.version = "unknown"; };
|
||||
|
||||
scopePkg = name:
|
||||
{ url, version, sha256 }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lib${name}";
|
||||
inherit version;
|
||||
src = fetchurl { inherit url sha256; };
|
||||
# picoscope does a signature check, so we can't patchelf these
|
||||
nativeBuildInputs = [ dpkg ];
|
||||
sourceRoot = ".";
|
||||
unpackCmd = "dpkg-deb -x $src .";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/lib
|
||||
cp -d opt/picoscope/lib/* $out/lib
|
||||
runHook postInstall
|
||||
'';
|
||||
meta = with lib;
|
||||
shared_meta lib // {
|
||||
description = "library for picotech oscilloscope ${name} series";
|
||||
};
|
||||
};
|
||||
|
||||
scopePkgs = lib.mapAttrs scopePkg sources;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "picoscope";
|
||||
inherit (sources.picoscope) version;
|
||||
|
||||
src = fetchurl { inherit (sources.picoscope) url sha256; };
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
buildInputs = [ gtk-sharp-3_0 mono glib libusb1 zlib ];
|
||||
|
||||
unpackCmd = "dpkg-deb -x $src .";
|
||||
sourceRoot = ".";
|
||||
scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs;
|
||||
MONO_PATH = "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0:" + (lib.makeLibraryPath
|
||||
([
|
||||
glib
|
||||
gtk3-x11
|
||||
gtk-sharp-3_0
|
||||
libusb1
|
||||
zlib
|
||||
libpicoipp
|
||||
] ++ scopeLibs));
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/
|
||||
cp -dr usr/share $out/share
|
||||
cp -dr opt/picoscope/* $out/
|
||||
makeWrapper "$(command -v mono)" $out/bin/picoscope \
|
||||
--add-flags $out/lib/PicoScope.GTK.exe \
|
||||
--prefix MONO_PATH : "$MONO_PATH" \
|
||||
--prefix LD_LIBRARY_PATH : "$MONO_PATH" \
|
||||
--set LANG C
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# usage:
|
||||
# services.udev.packages = [ pkgs.picoscope.rules ];
|
||||
# users.groups.pico = {};
|
||||
# users.users.you.extraGroups = [ "pico" ];
|
||||
passthru.rules = lib.writeTextDir "lib/udev/rules.d/95-pico.rules" ''
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="664",GROUP="pico"
|
||||
'';
|
||||
|
||||
meta = with lib;
|
||||
shared_meta lib // {
|
||||
description =
|
||||
"Oscilloscope application that works with all PicoScope models";
|
||||
longDescription = ''
|
||||
PicoScope for Linux is a powerful oscilloscope application that works
|
||||
with all PicoScope models. The most important features from PicoScope
|
||||
for Windows are included—scope, spectrum analyzer, advanced triggers,
|
||||
automated measurements, interactive zoom, persistence modes and signal
|
||||
generator control. More features are being added all the time.
|
||||
|
||||
Waveform captures can be saved for off-line analysis, and shared with
|
||||
PicoScope for Linux, PicoScope for macOS and PicoScope for Windows
|
||||
users, or exported in text, CSV and MathWorks MATLAB 4 formats.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
69
pkgs/applications/science/electronics/picoscope/sources.json
Normal file
69
pkgs/applications/science/electronics/picoscope/sources.json
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
"x86_64-linux": {
|
||||
"libpicocv": {
|
||||
"sha256": "feddc1cb9082005e80c4e2c2732ee4c537915c463ea327aa53a642aab95b8691",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicocv/libpicocv_1.1.33-beta2r167_amd64.deb",
|
||||
"version": "1.1.33-beta2r167"
|
||||
},
|
||||
"libpicoipp": {
|
||||
"sha256": "2d749b8fd5dbd811c270e4aa78c5ee9cd33832b90d089ae386b0f85aed2d0204",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicoipp/libpicoipp_1.4.0-4r136_amd64.deb",
|
||||
"version": "1.4.0-4r136"
|
||||
},
|
||||
"libps2000": {
|
||||
"sha256": "d306890d1e87651ae83ef00143c8e62b82fae2be39886b6884408751cb910fa4",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000/libps2000_3.0.89-3r3163_amd64.deb",
|
||||
"version": "3.0.89-3r3163"
|
||||
},
|
||||
"libps2000a": {
|
||||
"sha256": "38391dfbe6c6c04ba5b5c99bd53404d5342e40c9eca703e3d95cbc6302114270",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000a/libps2000a_2.1.89-5r3163_amd64.deb",
|
||||
"version": "2.1.89-5r3163"
|
||||
},
|
||||
"libps3000": {
|
||||
"sha256": "39b4b56a839eb5d7abcf1de2bab472c2de2d8aa5ffc3ba445e99d5aa8178ba07",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000/libps3000_4.0.89-3r3163_amd64.deb",
|
||||
"version": "4.0.89-3r3163"
|
||||
},
|
||||
"libps3000a": {
|
||||
"sha256": "ea96735b90d02c72c9c7b517413fed0d366ac634100e22467a39c780985669e4",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000a/libps3000a_2.1.89-6r3163_amd64.deb",
|
||||
"version": "2.1.89-6r3163"
|
||||
},
|
||||
"libps4000": {
|
||||
"sha256": "7177cd4debf811fa7d7105703a4fc546fe1a79fc3275e3f36326b014c1334f55",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000/libps4000_2.1.89-2r3163_amd64.deb",
|
||||
"version": "2.1.89-2r3163"
|
||||
},
|
||||
"libps4000a": {
|
||||
"sha256": "ebe94d6d9f349e5082dcbed55d059ac77c0129b967467786d1cef3f662ebac99",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000a/libps4000a_2.1.89-2r3163_amd64.deb",
|
||||
"version": "2.1.89-2r3163"
|
||||
},
|
||||
"libps5000": {
|
||||
"sha256": "732164658acb4bdfdbf3fc785419ea6a4944ed2892be9dde134b345a976c3318",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000/libps5000_2.1.89-3r3163_amd64.deb",
|
||||
"version": "2.1.89-3r3163"
|
||||
},
|
||||
"libps5000a": {
|
||||
"sha256": "3438f51c8646e3ac5a479c88aa7a89b3dfcce2090720317b4efb8db538372cdb",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000a/libps5000a_2.1.89-5r3163_amd64.deb",
|
||||
"version": "2.1.89-5r3163"
|
||||
},
|
||||
"libps6000": {
|
||||
"sha256": "fe4165ab0d323728b473347b61439b074486809d673e47f169d0062cf917191c",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000/libps6000_2.1.89-6r3163_amd64.deb",
|
||||
"version": "2.1.89-6r3163"
|
||||
},
|
||||
"libps6000a": {
|
||||
"sha256": "0552811f92a015ef47b09947631f5f5d8c30b122425de083bea79df88957a9c7",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000a/libps6000a_1.0.89-0r3163_amd64.deb",
|
||||
"version": "1.0.89-0r3163"
|
||||
},
|
||||
"picoscope": {
|
||||
"sha256": "b060edb02bc2de5d10a45d31d4b7f9c767d18511e2f65a1ebdd70cc3e8780262",
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/p/picoscope/picoscope_7.0.100-1r11387_amd64.deb",
|
||||
"version": "7.0.100-1r11387"
|
||||
}
|
||||
}
|
||||
}
|
||||
44
pkgs/applications/science/electronics/picoscope/update.py
Executable file
44
pkgs/applications/science/electronics/picoscope/update.py
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell --pure -i python3 -p "python3.withPackages (ps: with ps; [ requests ])"
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import sys
|
||||
|
||||
def parse_packages(text):
|
||||
res = []
|
||||
for package in resp.text.split("\n\n"):
|
||||
if not package: continue
|
||||
pkg = {}
|
||||
for field in package.split("\n"):
|
||||
if field.startswith(" "): # multiline string
|
||||
pkg[k] += "\n" + field[1:]
|
||||
else:
|
||||
[k, v] = field.split(": ", 1)
|
||||
pkg[k] = v
|
||||
res.append(pkg)
|
||||
return res
|
||||
|
||||
def generate_sources(packages):
|
||||
sources_spec = {}
|
||||
for pkg in pkgs:
|
||||
sources_spec[pkg['Package']] = {
|
||||
"url": "https://labs.picotech.com/rc/picoscope7/debian/" + pkg["Filename"],
|
||||
"sha256": pkg["SHA256"],
|
||||
"version": pkg["Version"]
|
||||
}
|
||||
return sources_spec
|
||||
|
||||
out = {}
|
||||
for nix_system, release in {"x86_64-linux": "amd64"}.items():
|
||||
resp = requests.get("https://labs.picotech.com/rc/picoscope7/debian//dists/picoscope/main/binary-"+release+"/Packages")
|
||||
if resp.status_code != 200:
|
||||
print("error: could not fetch data for release {} (code {})".format(release, resp.code), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
pkgs = parse_packages(resp.text)
|
||||
out[nix_system] = generate_sources(pkgs)
|
||||
|
||||
with open(os.path.dirname(__file__) + "/sources.json", "w") as f:
|
||||
json.dump(out, f, indent=2, sort_keys=True)
|
||||
f.write('\n')
|
||||
|
||||
39
pkgs/applications/science/electronics/pulseview/default.nix
Normal file
39
pkgs/applications/science/electronics/pulseview/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ mkDerivation, lib, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok
|
||||
, libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi1, glibmm
|
||||
, pcre, librevisa, python3, qtbase, qtsvg
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "pulseview";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://sigrok.org/download/source/pulseview/${pname}-${version}.tar.gz";
|
||||
sha256 = "0bvgmkgz37n2bi9niskpl05hf7rsj1lj972fbrgnlz25s4ywxrwy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
glib boost libsigrok libsigrokdecode libserialport libzip udev libusb1 libftdi1 glibmm
|
||||
pcre librevisa python3
|
||||
qtbase qtsvg
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Allow building with glib 2.68
|
||||
# PR at https://github.com/sigrokproject/pulseview/pull/39
|
||||
(fetchpatch {
|
||||
url = "https://github.com/sigrokproject/pulseview/commit/fb89dd11f2a4a08b73c498869789e38677181a8d.patch";
|
||||
sha256 = "07ifsis9jlc0jjp2d11f7hvw9kaxcbk0a57h2m4xsv1d7vzl9yfh";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qt-based LA/scope/MSO GUI for sigrok (a signal analysis software suite)";
|
||||
homepage = "https://sigrok.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
28
pkgs/applications/science/electronics/qfsm/default.nix
Normal file
28
pkgs/applications/science/electronics/qfsm/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, qt4, cmake, graphviz, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "qfsm";
|
||||
version = "0.54.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/qfsm/qfsm-${version}-Source.tar.bz2";
|
||||
sha256 = "0rl7bc5cr29ng67yij4akciyid9z7npal812ys4c3m229vjvflrb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ qt4 graphviz ];
|
||||
|
||||
patches = [
|
||||
./drop-hardcoded-prefix.patch
|
||||
./gcc6-fixes.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = {
|
||||
description = "Graphical editor for finite state machines";
|
||||
homepage = "http://qfsm.sourceforge.net/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
diff -ubrw qfsm-0.53.0-Source-orig/CMakeLists.txt qfsm-0.53.0-Source-new/CMakeLists.txt
|
||||
--- qfsm-0.53.0-Source-orig/CMakeLists.txt 2012-11-11 20:13:01.935856229 +0100
|
||||
+++ qfsm-0.53.0-Source-new/CMakeLists.txt 2012-11-11 20:13:24.962930007 +0100
|
||||
@@ -406,10 +406,6 @@
|
||||
|
||||
|
||||
IF(UNIX AND NOT WIN32)
|
||||
- SET(CMAKE_INSTALL_PREFIX "/usr")
|
||||
-ENDIF(UNIX AND NOT WIN32)
|
||||
-
|
||||
-IF(UNIX AND NOT WIN32)
|
||||
ADD_DEFINITIONS(-DQFSM_LANGUAGE_DIR="${CMAKE_INSTALL_PREFIX}/share/qfsm/")
|
||||
ADD_DEFINITIONS(-DQFSM_HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/doc/qfsm/")
|
||||
ELSE(UNIX AND NOT WIN32)
|
||||
@@ -472,5 +468,3 @@
|
||||
)
|
||||
|
||||
ENDIF(UNIX AND NOT WIN32)
|
||||
-
|
||||
-
|
||||
20
pkgs/applications/science/electronics/qfsm/gcc6-fixes.patch
Normal file
20
pkgs/applications/science/electronics/qfsm/gcc6-fixes.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- qfsm-0.54.0-Source-orig/src/FileIO.cpp 2015-01-02 19:01:46.000000000 +0100
|
||||
+++ qfsm-0.54.0-Source/src/FileIO.cpp 2017-09-11 19:53:30.579488402 +0200
|
||||
@@ -1617,7 +1617,7 @@
|
||||
QString ext;
|
||||
|
||||
if (!imp)
|
||||
- return FALSE;
|
||||
+ return NULL;
|
||||
|
||||
Project* p=NULL;
|
||||
importdlg->setAcceptMode(QFileDialog::AcceptOpen);
|
||||
@@ -1641,7 +1641,7 @@
|
||||
ifstream fin(act_importfile);
|
||||
|
||||
if (!fin)
|
||||
- return FALSE;
|
||||
+ return NULL;
|
||||
|
||||
emit setWaitCursor();
|
||||
|
||||
42
pkgs/applications/science/electronics/qucs-s/default.nix
Normal file
42
pkgs/applications/science/electronics/qucs-s/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ stdenv, lib, fetchFromGitHub, flex, bison, qt4, libX11, cmake, gperf, adms,
|
||||
ngspice, wrapGAppsHook,
|
||||
kernels ? [ ngspice ] }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "qucs-s";
|
||||
version = "0.0.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ra3xdh";
|
||||
repo = "qucs_s";
|
||||
rev = version;
|
||||
sha256 = "0rrq2ddridc09m6fixdmbngn42xmv8cmdf6r8zzn2s98fqib5qd6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook cmake ];
|
||||
buildInputs = [ flex bison qt4 libX11 gperf adms ] ++ kernels;
|
||||
|
||||
preConfigure = ''
|
||||
# Make custom kernels avaible from qucs-s
|
||||
gappsWrapperArgs+=(--prefix PATH ":" ${lib.escapeShellArg (lib.makeBinPath kernels)})
|
||||
'';
|
||||
|
||||
QTDIR=qt4;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheck = ''
|
||||
$out/bin/qucs-s --version
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Spin-off of Qucs that allows custom simulation kernels";
|
||||
longDescription = ''
|
||||
Spin-off of Qucs that allows custom simulation kernels.
|
||||
Default version is installed with ngspice.
|
||||
'';
|
||||
homepage = "https://ra3xdh.github.io/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ mazurel ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/science/electronics/qucs/cmakelists.patch
Normal file
34
pkgs/applications/science/electronics/qucs/cmakelists.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff --git i/qucs-core/CMakeLists.txt w/qucs-core/CMakeLists.txt
|
||||
index 2dbbd41..d174b50 100644
|
||||
--- i/qucs-core/CMakeLists.txt
|
||||
+++ w/qucs-core/CMakeLists.txt
|
||||
@@ -158,26 +158,9 @@ ENDIF()
|
||||
|
||||
#
|
||||
# Need Bison
|
||||
-#
|
||||
-# This is a HACK to get arround a PATH issue with Qt Creator on OSX.
|
||||
-# It seams impossible to pass a custom PATH to Qt Creator on OSX, ie, cannot prepend `/usr/local/bin/` for intance.
|
||||
-# The FIND_PACKAGE fails. For now we provide a fallback with a custom FIND_PROGRAM. The variable BISON_DIR is also available.
|
||||
-IF(WIN32)
|
||||
- FIND_PACKAGE(BISON 2.4 REQUIRED)
|
||||
- IF(BISON_FOUND)
|
||||
- #MESSAGE(STATUS "Found bison: ${BISON_EXECUTABLE} / Version: ${BISON_VERSION}" )
|
||||
- ENDIF()
|
||||
-ELSE() # Linux, OSX
|
||||
- # use -DBISON_DIR=/path/ to provide the path to bison
|
||||
- FIND_PROGRAM( BISON_EXECUTABLE bison
|
||||
- PATHS /usr/local/bin/ /opt/local/bin/ /usr/bin ${BISON_DIR}
|
||||
- DOC "bison path"
|
||||
- NO_DEFAULT_PATH )
|
||||
- IF(BISON_EXECUTABLE )
|
||||
- MESSAGE(STATUS "Found bison: " ${BISON_EXECUTABLE})
|
||||
- ELSE()
|
||||
- MESSAGE(FATAL_ERROR "Unable to find bison. Try to provide -DBISON_DIR=[path]")
|
||||
- ENDIF()
|
||||
+FIND_PACKAGE(BISON 2.4 REQUIRED)
|
||||
+IF(BISON_FOUND)
|
||||
+ #MESSAGE(STATUS "Found bison: ${BISON_EXECUTABLE} / Version: ${BISON_VERSION}" )
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
30
pkgs/applications/science/electronics/qucs/default.nix
Normal file
30
pkgs/applications/science/electronics/qucs/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{lib, stdenv, fetchFromGitHub, flex, bison, qt4, libX11, cmake, gperf, adms }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.19";
|
||||
pname = "qucs";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Qucs";
|
||||
repo = "qucs";
|
||||
rev = "qucs-${version}";
|
||||
sha256 = "106h3kjyg7c0hkmzkin7h8fcl32n60835121b2qqih8ixi6r5id6";
|
||||
};
|
||||
|
||||
QTDIR=qt4;
|
||||
|
||||
patches = [
|
||||
./cmakelists.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake flex bison ];
|
||||
buildInputs = [ qt4 libX11 gperf adms ];
|
||||
|
||||
meta = {
|
||||
description = "Integrated circuit simulator";
|
||||
homepage = "http://qucs.sourceforge.net";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/science/electronics/tkgate/1.x.nix
Normal file
42
pkgs/applications/science/electronics/tkgate/1.x.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchurl, tcl, tk, libX11, glibc, which, bison, flex, imake, xorgproto, gccmakedep }:
|
||||
|
||||
let
|
||||
libiconvInc = lib.optionalString stdenv.isLinux "${glibc.dev}/include";
|
||||
libiconvLib = lib.optionalString stdenv.isLinux "${glibc.out}/lib";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tkgate";
|
||||
version = "1.8.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.tkgate.org/downloads/tkgate-${version}.tgz";
|
||||
sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ which bison flex imake gccmakedep ];
|
||||
buildInputs = [ tcl tk libX11 xorgproto ];
|
||||
dontUseImakeConfigure = true;
|
||||
|
||||
patchPhase = ''
|
||||
sed -i config.h \
|
||||
-e 's|.*#define.*TKGATE_TCLTK_VERSIONS.*|#define TKGATE_TCLTK_VERSIONS "${tcl.release}"|' \
|
||||
-e 's|.*#define.*TKGATE_INCDIRS.*|#define TKGATE_INCDIRS "${tcl}/include ${tk}/include ${libiconvInc} ${libX11.dev}/include"|' \
|
||||
-e 's|.*#define.*TKGATE_LIBDIRS.*|#define TKGATE_LIBDIRS "${tcl}/lib ${tk}/lib ${libiconvLib} ${libX11.out}/lib"|' \
|
||||
\
|
||||
-e '20 i #define TCL_LIBRARY "${tcl}/lib"' \
|
||||
-e '20 i #define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"' \
|
||||
-e '20 i #define USE_ICONV 1' \
|
||||
\
|
||||
-e "s|.*#define.*TKGATE_HOMEDIRBASE.*|#define TKGATE_HOMEDIRBASE \\\"$out/lib\\\"|" \
|
||||
-e "s|.*#define.*TKGATE_BINDIR.*|#define TKGATE_BINDIR \\\"$out/bin\\\"|" \
|
||||
-e "s|.*#define.*TKGATE_MANDIR.*|#define TKGATE_MANDIR \\\"$out/share/man/man1\\\"|" \
|
||||
-e "s|file:/usr/X11R6/lib/tkgate-|file://$out/lib/tkgate-|"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor";
|
||||
homepage = "http://www.tkgate.org/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
hydraPlatforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/science/electronics/verilator/default.nix
Normal file
42
pkgs/applications/science/electronics/verilator/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, perl, flex, bison, python3, autoconf
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "verilator";
|
||||
version = "4.222";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AvjcStbiXDdhJnaSJJ5Mp6zscvaxhb+A2J+0gpm2rFI=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
buildInputs = [ perl ];
|
||||
nativeBuildInputs = [ flex bison python3 autoconf ];
|
||||
|
||||
# these tests need some interpreter paths patched early on...
|
||||
# see https://github.com/NixOS/nix/issues/1205
|
||||
doCheck = false;
|
||||
checkTarget = "test";
|
||||
|
||||
preConfigure = ''
|
||||
autoconf
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
src/flexfix \
|
||||
src/vlcovgen
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast and robust (System)Verilog simulator/compiler";
|
||||
homepage = "https://www.veripool.org/wiki/verilator";
|
||||
license = with licenses; [ lgpl3Only artistic2 ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
70
pkgs/applications/science/electronics/verilog/default.nix
Normal file
70
pkgs/applications/science/electronics/verilog/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoconf
|
||||
, bison
|
||||
, bzip2
|
||||
, flex
|
||||
, gperf
|
||||
, ncurses
|
||||
, perl
|
||||
, readline
|
||||
, zlib
|
||||
}:
|
||||
|
||||
let
|
||||
iverilog-test = fetchFromGitHub {
|
||||
owner = "steveicarus";
|
||||
repo = "ivtest";
|
||||
rev = "253609b89576355b3bef2f91e90db62223ecf2be";
|
||||
sha256 = "18i7jlr2csp7mplcrwjhllwvb6w3v7x7mnx7vdw48nd3g5scrydx";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "iverilog";
|
||||
version = "11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "steveicarus";
|
||||
repo = pname;
|
||||
rev = "v${lib.replaceStrings ["."] ["_"] version}";
|
||||
sha256 = "0nzcyi6l2zv9wxzsv9i963p3igyjds0n55x0ph561mc3pfbc7aqp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf bison flex gperf ];
|
||||
|
||||
buildInputs = [ bzip2 ncurses readline zlib ];
|
||||
|
||||
preConfigure = "sh autoconf.sh";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# tests try to access /proc/ which does not exist on darwin
|
||||
# Cannot locate IVL modules : couldn't get command path from OS.
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
installCheckInputs = [ perl ];
|
||||
|
||||
installCheckPhase = ''
|
||||
# copy tests to allow writing results
|
||||
export TESTDIR=$(mktemp -d)
|
||||
cp -r ${iverilog-test}/* $TESTDIR
|
||||
|
||||
pushd $TESTDIR
|
||||
|
||||
# Run & check tests
|
||||
PATH=$out/bin:$PATH perl vvp_reg.pl
|
||||
# Check the tests, will error if unexpected tests fail. Some failures MIGHT be normal.
|
||||
diff regression_report-devel.txt regression_report.txt
|
||||
PATH=$out/bin:$PATH perl vpi_reg.pl
|
||||
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Icarus Verilog compiler";
|
||||
homepage = "http://iverilog.icarus.com/"; # https does not work
|
||||
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
||||
maintainers = with maintainers; [ winden thoughtpolice ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
54
pkgs/applications/science/electronics/vhd2vl/default.nix
Normal file
54
pkgs/applications/science/electronics/vhd2vl/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, bison
|
||||
, flex
|
||||
, verilog
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vhd2vl";
|
||||
version = "unstable-2018-09-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ldoolitt";
|
||||
repo = pname;
|
||||
rev = "37e3143395ce4e7d2f2e301e12a538caf52b983c";
|
||||
sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n";
|
||||
};
|
||||
|
||||
patches = lib.optionals (!stdenv.isAarch64) [
|
||||
# fix build with verilog 11.0
|
||||
./test.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
flex
|
||||
which
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
verilog
|
||||
];
|
||||
|
||||
# the "translate" target both (a) builds the software and (b) runs
|
||||
# the tests (without validating the results)
|
||||
buildTargets = [ "translate" ];
|
||||
|
||||
# the "diff" target examines the test results
|
||||
checkTarget = "diff";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D -m755 src/vhd2vl $out/bin/vdh2vl
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "VHDL to Verilog converter";
|
||||
homepage = "https://github.com/ldoolitt/vhd2vl";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ matthuszagh ];
|
||||
};
|
||||
}
|
||||
35
pkgs/applications/science/electronics/vhd2vl/test.patch
Normal file
35
pkgs/applications/science/electronics/vhd2vl/test.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
--- a/translated_examples/fifo.v 1970-01-01 00:00:01.000000000 +0000
|
||||
+++ a/temp/verilog/fifo.v 2022-05-11 03:44:43.173604945 +0000
|
||||
@@ -107,7 +107,7 @@
|
||||
//--- Read address counter --------------
|
||||
//---------------------------------------
|
||||
assign add_RD_CE = (iempty == 1'b1) ? 1'b0 : (RD == 1'b0) ? 1'b0 : 1'b1;
|
||||
- assign n_add_RD = (add_RD) + 4'h1;
|
||||
+ assign n_add_RD = add_RD + 4'h1;
|
||||
always @(posedge clk_RD, posedge rst) begin
|
||||
if((rst == 1'b1)) begin
|
||||
add_RD <= {5{1'b0}};
|
||||
diff -u '--exclude=Makefile' '--exclude-from=examples/exclude' translated_examples/test.v temp/verilog/test.v
|
||||
--- a/translated_examples/test.v 1970-01-01 00:00:01.000000000 +0000
|
||||
+++ a/temp/verilog/test.v 2022-05-11 03:44:43.189604945 +0000
|
||||
@@ -125,7 +125,7 @@
|
||||
endcase
|
||||
end
|
||||
|
||||
- assign code1[1:0] = a[6:5] ^ ({a[4],b[6]});
|
||||
+ assign code1[1:0] = a[6:5] ^ {a[4],b[6]};
|
||||
// Asynch process
|
||||
always @(we, addr, config1, bip) begin
|
||||
if(we == 1'b1) begin
|
||||
diff -u '--exclude=Makefile' '--exclude-from=examples/exclude' translated_examples/withselect.v temp/verilog/withselect.v
|
||||
--- a/translated_examples/withselect.v 1970-01-01 00:00:01.000000000 +0000
|
||||
+++ a/temp/verilog/withselect.v 2022-05-11 03:44:43.193604945 +0000
|
||||
@@ -33,7 +33,7 @@
|
||||
endcase
|
||||
end
|
||||
|
||||
- assign code1[1:0] = a[6:5] ^ ({a[4],b[6]});
|
||||
+ assign code1[1:0] = a[6:5] ^ {a[4],b[6]};
|
||||
assign foo = {(((1 + 1))-((0))+1){1'b0}};
|
||||
assign egg = {78{1'b0}};
|
||||
assign baz = {(((bus_width * 4))-((bus_width * 3 - 1))+1){1'b1}};
|
||||
31
pkgs/applications/science/electronics/xcircuit/default.nix
Normal file
31
pkgs/applications/science/electronics/xcircuit/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, autoreconfHook, automake, pkg-config
|
||||
, cairo, ghostscript, ngspice, tcl, tk, xorg, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.10.12";
|
||||
pname = "xcircuit";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://opencircuitdesign.com/xcircuit/archive/xcircuit-${version}.tgz";
|
||||
sha256 = "1h1ywc3mr7plvwnhdii2zgnnv5ih2nhyl4qbdjpi83dq0aq1s2mn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook automake pkg-config ];
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-tcl=${tcl}/lib"
|
||||
"--with-tk=${tk}/lib"
|
||||
"--with-ngspice=${lib.getBin ngspice}/bin/ngspice"
|
||||
];
|
||||
|
||||
buildInputs = with xorg; [ cairo ghostscript libSM libXt libICE libX11 libXpm tcl tk zlib ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generic drawing program tailored to circuit diagrams";
|
||||
homepage = "http://opencircuitdesign.com/xcircuit";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ spacefrogg thoughtpolice ];
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/science/electronics/xoscope/default.nix
Normal file
32
pkgs/applications/science/electronics/xoscope/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, gtk3
|
||||
, gtkdatabox
|
||||
, fftw
|
||||
, gnum4
|
||||
, comedilib
|
||||
, alsa-lib
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xoscope";
|
||||
version = "2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/xoscope/${pname}-${version}.tar.gz";
|
||||
sha256 = "0a5ycfc1qdmibvagc82r2mhv2i99m6pndy5i6ixas3j2297g6pgq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config gnum4 ];
|
||||
buildInputs = [ gtk3 gtkdatabox fftw comedilib alsa-lib ];
|
||||
|
||||
meta = {
|
||||
description = "Oscilloscope through the sound card";
|
||||
homepage = "http://xoscope.sourceforge.net";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
47
pkgs/applications/science/electronics/xschem/default.nix
Normal file
47
pkgs/applications/science/electronics/xschem/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, bison
|
||||
, cairo
|
||||
, flex
|
||||
, libX11
|
||||
, libXpm
|
||||
, pkg-config
|
||||
, tcl
|
||||
, tk
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xschem";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StefanSchippers";
|
||||
repo = "xschem";
|
||||
rev = version;
|
||||
sha256 = "sha256-C57jo8tAbiqQAgf4Xp2lpFGOr6F1knPpFcYxPiqSM4k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison flex pkg-config ];
|
||||
|
||||
buildInputs = [ cairo libX11 libXpm tcl tk ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Schematic capture and netlisting EDA tool";
|
||||
longDescription = ''
|
||||
Xschem is a schematic capture program, it allows creation of
|
||||
hierarchical representation of circuits with a top down approach.
|
||||
By focusing on interfaces, hierarchy and instance properties a
|
||||
complex system can be described in terms of simpler building
|
||||
blocks. A VHDL or Verilog or Spice netlist can be generated from
|
||||
the drawn schematic, allowing the simulation of the circuit.
|
||||
'';
|
||||
homepage = "https://xschem.sourceforge.io/stefan/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
183
pkgs/applications/science/electronics/xyce/default.nix
Normal file
183
pkgs/applications/science/electronics/xyce/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchgit
|
||||
, lib
|
||||
, autoconf
|
||||
, automake
|
||||
, bison
|
||||
, blas
|
||||
, flex
|
||||
, fftw
|
||||
, gfortran
|
||||
, lapack
|
||||
, libtool_2
|
||||
, mpi
|
||||
, suitesparse
|
||||
, trilinos
|
||||
, withMPI ? false
|
||||
# for doc
|
||||
, texlive
|
||||
, pandoc
|
||||
, enableDocs ? true
|
||||
# for tests
|
||||
, bash
|
||||
, bc
|
||||
, openssh # required by MPI
|
||||
, perl
|
||||
, perlPackages
|
||||
, python3
|
||||
, enableTests ? true
|
||||
}:
|
||||
|
||||
assert withMPI -> trilinos.withMPI;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xyce";
|
||||
version = "7.4.0";
|
||||
|
||||
srcs = [
|
||||
# useing fetchurl or fetchFromGitHub doesn't include the manuals
|
||||
# due to .gitattributes files
|
||||
(fetchgit {
|
||||
url = "https://github.com/Xyce/Xyce.git";
|
||||
rev = "Release-${version}";
|
||||
sha256 = "sha256-sOHjQEo4FqlDseTtxFVdLa0SI/VAf2OkwQV7QSL7SNM=";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "Xyce";
|
||||
repo = "Xyce_Regression";
|
||||
rev = "Release-${version}";
|
||||
sha256 = "sha256-kSGUaFarOHDNJ8kA/TAGkmzicm9O7cfJ7mGFZcbqCZM=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = "./Xyce";
|
||||
|
||||
preConfigure = "./bootstrap";
|
||||
|
||||
configureFlags = [
|
||||
"CXXFLAGS=-O3"
|
||||
"--enable-xyce-shareable"
|
||||
"--enable-shared"
|
||||
"--enable-stokhos"
|
||||
"--enable-amesos2"
|
||||
] ++ lib.optionals withMPI [
|
||||
"--enable-mpi"
|
||||
"CXX=mpicxx"
|
||||
"CC=mpicc"
|
||||
"F77=mpif77"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
gfortran
|
||||
libtool_2
|
||||
] ++ lib.optionals enableDocs [
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-medium
|
||||
koma-script
|
||||
optional
|
||||
framed
|
||||
enumitem
|
||||
multirow
|
||||
preprint;
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bison
|
||||
blas
|
||||
flex
|
||||
fftw
|
||||
lapack
|
||||
suitesparse
|
||||
trilinos
|
||||
] ++ lib.optionals withMPI [ mpi ];
|
||||
|
||||
doCheck = enableTests;
|
||||
|
||||
postPatch = ''
|
||||
pushd ../source
|
||||
find Netlists -type f -regex ".*\.sh\|.*\.pl" -exec chmod ugo+x {} \;
|
||||
# some tests generate new files, some overwrite netlists
|
||||
find . -type d -exec chmod u+w {} \;
|
||||
find . -type f -name "*.cir" -exec chmod u+w {} \;
|
||||
patchShebangs Netlists/ TestScripts/
|
||||
# patch script generating functions
|
||||
sed -i -E 's|/usr/bin/env perl|${lib.escapeRegex perl.outPath}/bin/perl|' \
|
||||
TestScripts/XyceRegression/Testing/Netlists/RunOptions/runOptions.cir.sh
|
||||
sed -i -E 's|/bin/sh|${lib.escapeRegex bash.outPath}/bin/sh|' \
|
||||
TestScripts/XyceRegression/Testing/Netlists/RunOptions/runOptions.cir.sh
|
||||
popd
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
bc
|
||||
perl
|
||||
perlPackages.DigestMD5
|
||||
(python3.withPackages (ps: with ps; [ numpy scipy ]))
|
||||
] ++ lib.optionals withMPI [ mpi openssh ];
|
||||
|
||||
checkPhase = ''
|
||||
XYCE_BINARY="$(pwd)/src/Xyce"
|
||||
EXECSTRING="${lib.optionalString withMPI "mpirun -np 2 "}$XYCE_BINARY"
|
||||
TEST_ROOT="$(pwd)/../source"
|
||||
|
||||
# Honor the TMP variable
|
||||
sed -i -E 's|/tmp|\$TMP|' $TEST_ROOT/TestScripts/suggestXyceTagList.sh
|
||||
|
||||
EXLUDE_TESTS_FILE=$TMP/exclude_tests.$$
|
||||
# Gold standard has additional ":R" suffix in result column label
|
||||
echo "Output/HB/hb-step-tecplot.cir" >> $EXLUDE_TESTS_FILE
|
||||
# This test makes Xyce access /sys/class/net when run with MPI
|
||||
${lib.optionalString withMPI "echo \"CommandLine/command_line.cir\" >> $EXLUDE_TESTS_FILE"}
|
||||
|
||||
$TEST_ROOT/TestScripts/run_xyce_regression \
|
||||
--output="$(pwd)/Xyce_Test" \
|
||||
--xyce_test="''${TEST_ROOT}" \
|
||||
--taglist="$($TEST_ROOT/TestScripts/suggestXyceTagList.sh "$XYCE_BINARY" | sed -E -e 's/TAGLIST=([^ ]+).*/\1/' -e '2,$d')" \
|
||||
--resultfile="$(pwd)/test_results" \
|
||||
--excludelist="$EXLUDE_TESTS_FILE" \
|
||||
"''${EXECSTRING}"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
postInstall = lib.optionalString enableDocs ''
|
||||
local docFiles=("doc/Users_Guide/Xyce_UG"
|
||||
"doc/Reference_Guide/Xyce_RG"
|
||||
"doc/Release_Notes/Release_Notes_${lib.versions.majorMinor version}/Release_Notes_${lib.versions.majorMinor version}")
|
||||
|
||||
# Release notes refer to an image not in the repo.
|
||||
sed -i -E 's/\\includegraphics\[height=(0.5in)\]\{snllineblubrd\}/\\mbox\{\\rule\{0mm\}\{\1\}\}/' ''${docFiles[2]}.tex
|
||||
|
||||
install -d $doc/share/doc/${pname}-${version}/
|
||||
for d in ''${docFiles[@]}; do
|
||||
# Use a public document class
|
||||
sed -i -E 's/\\documentclass\[11pt,report\]\{SANDreport\}/\\documentclass\[11pt,letterpaper\]\{scrreprt\}/' $d.tex
|
||||
sed -i -E 's/\\usepackage\[sand\]\{optional\}/\\usepackage\[report\]\{optional\}/' $d.tex
|
||||
pushd $(dirname $d)
|
||||
make
|
||||
install -t $doc/share/doc/${pname}-${version}/ $(basename $d.pdf)
|
||||
popd
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
||||
description = "High-performance analog circuit simulator";
|
||||
longDescription = ''
|
||||
Xyce is a SPICE-compatible, high-performance analog circuit simulator,
|
||||
capable of solving extremely large circuit problems by supporting
|
||||
large-scale parallel computing platforms.
|
||||
'';
|
||||
homepage = "https://xyce.sandia.gov";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue