kicad: reformat with nixpkgs-fmt
This commit is contained in:
parent
b13bb2402b
commit
b3e2b523e5
@ -1,16 +1,29 @@
|
|||||||
{ lib, stdenv, gnome3, wxGTK30, wxGTK31
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, gnome3
|
||||||
|
, wxGTK30
|
||||||
|
, wxGTK31
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, gsettings-desktop-schemas, hicolor-icon-theme
|
, gsettings-desktop-schemas
|
||||||
, callPackage, callPackages
|
, hicolor-icon-theme
|
||||||
, librsvg, cups
|
, callPackage
|
||||||
|
, callPackages
|
||||||
|
, librsvg
|
||||||
|
, cups
|
||||||
|
|
||||||
, pname ? "kicad"
|
, pname ? "kicad"
|
||||||
, stable ? true
|
, stable ? true
|
||||||
, oceSupport ? false, opencascade
|
, oceSupport ? false
|
||||||
, withOCCT ? true, opencascade-occt
|
, opencascade
|
||||||
, ngspiceSupport ? true, libngspice
|
, withOCCT ? true
|
||||||
, scriptingSupport ? true, swig, python3
|
, opencascade-occt
|
||||||
, debug ? false, valgrind
|
, ngspiceSupport ? true
|
||||||
|
, libngspice
|
||||||
|
, scriptingSupport ? true
|
||||||
|
, swig
|
||||||
|
, python3
|
||||||
|
, debug ? false
|
||||||
|
, valgrind
|
||||||
, with3d ? true
|
, with3d ? true
|
||||||
, withI18n ? true
|
, withI18n ? true
|
||||||
}:
|
}:
|
||||||
@ -19,18 +32,25 @@ assert ngspiceSupport -> libngspice != null;
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
baseName = if (stable) then "kicad" else "kicad-unstable";
|
baseName = if (stable) then "kicad" else "kicad-unstable";
|
||||||
|
|
||||||
versions = import ./versions.nix;
|
versions = import ./versions.nix;
|
||||||
versionConfig = versions.${baseName};
|
versionConfig = versions.${baseName};
|
||||||
|
|
||||||
wxGTK = if (stable)
|
wxGTK =
|
||||||
|
if (stable)
|
||||||
# wxGTK3x may default to withGtk2 = false, see #73145
|
# wxGTK3x may default to withGtk2 = false, see #73145
|
||||||
then wxGTK30.override { withGtk2 = false; }
|
then
|
||||||
|
wxGTK30.override
|
||||||
|
{
|
||||||
|
withGtk2 = false;
|
||||||
|
}
|
||||||
# wxGTK31 currently introduces an issue with opening the python interpreter in pcbnew
|
# wxGTK31 currently introduces an issue with opening the python interpreter in pcbnew
|
||||||
# but brings high DPI support?
|
# but brings high DPI support?
|
||||||
else wxGTK31.override { withGtk2 = false; };
|
else
|
||||||
|
wxGTK31.override {
|
||||||
|
withGtk2 = false;
|
||||||
|
};
|
||||||
|
|
||||||
python = python3;
|
python = python3;
|
||||||
wxPython = python.pkgs.wxPython_4_0;
|
wxPython = python.pkgs.wxPython_4_0;
|
||||||
@ -59,7 +79,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ optionals (scriptingSupport)
|
++ optionals (scriptingSupport)
|
||||||
[ python.pkgs.wrapPython ];
|
[ python.pkgs.wrapPython ];
|
||||||
|
|
||||||
# wrapGAppsHook added the equivalent to ${base}/share
|
# wrapGAppsHook added the equivalent to ${base}/share
|
||||||
# though i noticed no difference without it
|
# though i noticed no difference without it
|
||||||
@ -94,17 +114,19 @@ stdenv.mkDerivation rec {
|
|||||||
tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ];
|
tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ];
|
||||||
utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" "kicad-ogltest" ];
|
utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" "kicad-ogltest" ];
|
||||||
in
|
in
|
||||||
( concatStringsSep "\n"
|
(concatStringsSep "\n"
|
||||||
( flatten [
|
(flatten [
|
||||||
( optionalString (scriptingSupport) "buildPythonPath \"${base} $pythonPath\" \n" )
|
(optionalString (scriptingSupport) "buildPythonPath \"${base} $pythonPath\" \n")
|
||||||
|
|
||||||
# wrap each of the directly usable tools
|
# wrap each of the directly usable tools
|
||||||
( map ( tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs"
|
(map
|
||||||
+ optionalString (scriptingSupport) " --set PYTHONPATH \"$program_PYTHONPATH\""
|
(tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs"
|
||||||
) tools )
|
+ optionalString (scriptingSupport) " --set PYTHONPATH \"$program_PYTHONPATH\""
|
||||||
|
)
|
||||||
|
tools)
|
||||||
|
|
||||||
# link in the CLI utils
|
# link in the CLI utils
|
||||||
( map ( util: "ln -s ${base}/bin/${util} $out/bin/${util}" ) utils )
|
(map (util: "ln -s ${base}/bin/${util} $out/bin/${util}") utils)
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
@ -118,9 +140,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = rec {
|
meta = rec {
|
||||||
description = (if (stable)
|
description = (if (stable)
|
||||||
then "Open Source Electronics Design Automation suite"
|
then "Open Source Electronics Design Automation suite"
|
||||||
else "Open Source EDA suite, development build")
|
else "Open Source EDA suite, development build")
|
||||||
+ (if (!with3d) then ", without 3D models" else "");
|
+ (if (!with3d) then ", without 3D models" else "");
|
||||||
homepage = "https://www.kicad-pcb.org/";
|
homepage = "https://www.kicad-pcb.org/";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
KiCad is an open source software suite for Electronic Design Automation.
|
KiCad is an open source software suite for Electronic Design Automation.
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
{ lib, stdenv, cmake, gettext
|
{ lib
|
||||||
, fetchFromGitHub, fetchFromGitLab
|
, stdenv
|
||||||
, version, libSources
|
, cmake
|
||||||
|
, gettext
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchFromGitLab
|
||||||
|
, version
|
||||||
|
, libSources
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# callPackage libraries {
|
# callPackage libraries {
|
||||||
@ -33,7 +38,7 @@ let
|
|||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
|
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
|
||||||
# this would exceed the hydra output limit
|
# this would exceed the hydra output limit
|
||||||
hydraPlatforms = if (name == "packages3d" ) then [ ] else platforms;
|
hydraPlatforms = if (name == "packages3d") then [ ] else platforms;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user