Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions pkgs/applications/science/electronics/appcsxcad/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ stdenv
, 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
wrapQtAppsHook
];

buildInputs = [
csxcad
qcsxcad
hdf5
vtkWithQt5
qtbase
fparser
tinyxml
cgal
boost
];

enableParallelBuilding = true;

meta = with stdenv.lib; {
description = "Minimal Application using the QCSXCAD library";
homepage = "https://github.com/thliebig/AppCSXCAD";
license = licenses.gpl3;
maintainers = with maintainers; [ matthuszagh ];
platforms = platforms.linux;
};
}
75 changes: 75 additions & 0 deletions pkgs/applications/science/electronics/openems/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ stdenv
, fetchFromGitHub
, csxcad
, fparser
, tinyxml
, hdf5
, vtk
, boost
, zlib
, cmake
, octave
, gl2ps
, withQcsxcad ? true
, withMPI ? false
, withHyp2mat ? true
, qcsxcad ? null
, openmpi ? null
, hyp2mat ? null
}:

assert withQcsxcad -> qcsxcad != null;
assert withMPI -> openmpi != null;
assert withHyp2mat -> hyp2mat != null;

stdenv.mkDerivation {
pname = "openems";
version = "unstable-2020-02-15";

src = fetchFromGitHub {
owner = "thliebig";
repo = "openEMS";
rev = "ba793ac84e2f78f254d6d690bb5a4c626326bbfd";
sha256 = "1dca6b6ccy771irxzsj075zvpa3dlzv4mjb8xyg9d889dqlgyl45";
};

nativeBuildInputs = [
cmake
];

cmakeFlags = stdenv.lib.optionals withMPI [ "-DWITH_MPI=ON" ];

buildInputs = [
fparser
tinyxml
hdf5
vtk
boost
zlib
csxcad
(octave.override { inherit gl2ps hdf5; })
(if withQcsxcad then qcsxcad else null)
(if withMPI then openmpi else null)
(if withHyp2mat then hyp2mat else null)
];

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
'';

enableParallelBuilding = true;

meta = with stdenv.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;
};
}
50 changes: 50 additions & 0 deletions pkgs/applications/science/electronics/qcsxcad/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ stdenv
, mkDerivation
, fetchFromGitHub
, cmake
, csxcad
, tinyxml
, vtkWithQt5
, wrapQtAppsHook
, qtbase
}:

mkDerivation {
pname = "qcsxcad";
version = "unstable-2020-01-04";

src = fetchFromGitHub {
owner = "thliebig";
repo = "QCSXCAD";
rev = "0dabbaf2bc1190adec300871cf309791af842c8e";
sha256 = "11kbh0mxbdfh7s5azqin3i2alic5ihmdfj0jwgnrhlpjk4cbf9rn";
};

nativeBuildInputs = [
cmake
wrapQtAppsHook
];

cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DCSXCAD_ROOT_DIR=${csxcad}"
"-DENABLE_RPATH=OFF"
];

buildInputs = [
csxcad
tinyxml
vtkWithQt5
qtbase
];

enableParallelBuilding = true;

meta = with stdenv.lib; {
description = "Qt-GUI for CSXCAD";
homepage = "https://github.com/thliebig/QCSXCAD";
license = licenses.gpl3;
maintainers = with maintainers; [ matthuszagh ];
platforms = platforms.linux;
};
}
40 changes: 40 additions & 0 deletions pkgs/development/python-modules/python-csxcad/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, python, pythonPackages, cython
, openems, csxcad
}:

buildPythonPackage rec {
pname = "python-csxcad";
version = "0.6.2";

src = fetchFromGitHub {
owner = "thliebig";
repo = "CSXCAD";
rev = "55899d0fc3dbfc2eb3ec60af9783925926e661a9";
sha256 = "18h10575c8k0bx7l0pk5ksqfc1vvnsg98br2987y8x4jmrw2jy50";
};

sourceRoot = "source/python";

buildInputs = [
cython
];

propagatedBuildInputs = [
openems
csxcad
python
pythonPackages.numpy
pythonPackages.matplotlib
];

setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib";

meta = with stdenv.lib; {
description = "Python interface to CSXCAD";
homepage = http://openems.de/index.php/Main_Page.html;
license = licenses.gpl3;
maintainers = with maintainers; [ matthuszagh ];
platforms = platforms.linux;
};
}
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/python-openems/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, python, pythonPackages, cython
, openems, csxcad, boost
}:

buildPythonPackage rec {
pname = "python-openems";
version = "0.0.33";

src = fetchFromGitHub {
owner = "thliebig";
repo = "openEMS";
rev = "ffcf5ee0a64b2c64be306a3154405b0f13d5fbba";
sha256 = "1c8wlv0caxlhpicji26k93i9797f1alz6g2kc3fi18id0b0bjgha";
};

sourceRoot = "source/python";

buildInputs = [
cython
boost
];

propagatedBuildInputs = [
openems
csxcad
python
pythonPackages.python-csxcad
pythonPackages.numpy
pythonPackages.h5py
];

setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib";

meta = with stdenv.lib; {
description = "Python interface to OpenEMS";
homepage = http://openems.de/index.php/Main_Page.html;
license = licenses.gpl3;
maintainers = with maintainers; [ matthuszagh ];
platforms = platforms.linux;
};
}
10 changes: 10 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25726,6 +25726,10 @@ in

adms = callPackage ../applications/science/electronics/adms { };

appcsxcad = libsForQt5.callPackage ../applications/science/electronics/appcsxcad {
inherit (qt5) qtbase wrapQtAppsHook;
};

# Since version 8 Eagle requires an Autodesk account and a subscription
# in contrast to single payment for the charged editions.
# This is the last version with the old model.
Expand Down Expand Up @@ -25768,8 +25772,14 @@ in

ngspice = callPackage ../applications/science/electronics/ngspice { };

openems = callPackage ../applications/science/electronics/openems { };

pcb = callPackage ../applications/science/electronics/pcb { };

qcsxcad = libsForQt5.callPackage ../applications/science/electronics/qcsxcad {
inherit (qt5) wrapQtAppsHook qtbase;
};

qucs = callPackage ../applications/science/electronics/qucs { };

xcircuit = callPackage ../applications/science/electronics/xcircuit { };
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4544,6 +4544,10 @@ in {

python-oauth2 = callPackage ../development/python-modules/python-oauth2 { };

python-openems = callPackage ../development/python-modules/python-openems { };

python-csxcad = callPackage ../development/python-modules/python-csxcad { };

python_openzwave = callPackage ../development/python-modules/python_openzwave {
inherit (pkgs) pkgconfig;
};
Expand Down