diff options
author | Matt Huszagh <huszaghmatt@gmail.com> | 2020-10-10 12:50:41 -0700 |
---|---|---|
committer | Matt Huszagh <huszaghmatt@gmail.com> | 2020-10-10 12:53:09 -0700 |
commit | b3e2b523e5096ceb1e079bf011f5aad2aaa47228 (patch) | |
tree | 6d31cecc8d7ba38aa72b6ca24107e463fcafdeac /pkgs/applications/science/electronics | |
parent | b13bb2402be929ad85bb96e5f7ef64f66892e903 (diff) |
kicad: reformat with nixpkgs-fmt
Diffstat (limited to 'pkgs/applications/science/electronics')
-rw-r--r-- | pkgs/applications/science/electronics/kicad/default.nix | 72 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/kicad/libraries.nix | 13 |
2 files changed, 56 insertions, 29 deletions
diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index e5ce1f0092e2..578cdbf4a5ca 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -1,16 +1,29 @@ -{ lib, stdenv, gnome3, wxGTK30, wxGTK31 +{ lib +, stdenv +, gnome3 +, wxGTK30 +, wxGTK31 , makeWrapper -, gsettings-desktop-schemas, hicolor-icon-theme -, callPackage, callPackages -, librsvg, cups +, gsettings-desktop-schemas +, hicolor-icon-theme +, callPackage +, callPackages +, librsvg +, cups , pname ? "kicad" , stable ? true -, oceSupport ? false, opencascade -, withOCCT ? true, opencascade-occt -, ngspiceSupport ? true, libngspice -, scriptingSupport ? true, swig, python3 -, debug ? false, valgrind +, oceSupport ? false +, opencascade +, withOCCT ? true +, opencascade-occt +, ngspiceSupport ? true +, libngspice +, scriptingSupport ? true +, swig +, python3 +, debug ? false +, valgrind , with3d ? true , withI18n ? true }: @@ -19,18 +32,25 @@ assert ngspiceSupport -> libngspice != null; with lib; let - baseName = if (stable) then "kicad" else "kicad-unstable"; - versions = import ./versions.nix; + versions = import ./versions.nix; versionConfig = versions.${baseName}; - wxGTK = if (stable) + wxGTK = + if (stable) # 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 # but brings high DPI support? - else wxGTK31.override { withGtk2 = false; }; + else + wxGTK31.override { + withGtk2 = false; + }; python = python3; wxPython = python.pkgs.wxPython_4_0; @@ -59,7 +79,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ] ++ optionals (scriptingSupport) - [ python.pkgs.wrapPython ]; + [ python.pkgs.wrapPython ]; # wrapGAppsHook added the equivalent to ${base}/share # though i noticed no difference without it @@ -94,17 +114,19 @@ stdenv.mkDerivation rec { tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ]; utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" "kicad-ogltest" ]; in - ( concatStringsSep "\n" - ( flatten [ - ( optionalString (scriptingSupport) "buildPythonPath \"${base} $pythonPath\" \n" ) + (concatStringsSep "\n" + (flatten [ + (optionalString (scriptingSupport) "buildPythonPath \"${base} $pythonPath\" \n") # wrap each of the directly usable tools - ( map ( tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs" - + optionalString (scriptingSupport) " --set PYTHONPATH \"$program_PYTHONPATH\"" - ) tools ) + (map + (tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs" + + optionalString (scriptingSupport) " --set PYTHONPATH \"$program_PYTHONPATH\"" + ) + tools) # 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 { description = (if (stable) - then "Open Source Electronics Design Automation suite" - else "Open Source EDA suite, development build") - + (if (!with3d) then ", without 3D models" else ""); + 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-pcb.org/"; longDescription = '' KiCad is an open source software suite for Electronic Design Automation. diff --git a/pkgs/applications/science/electronics/kicad/libraries.nix b/pkgs/applications/science/electronics/kicad/libraries.nix index 057bc15bf5f3..b424cde195ec 100644 --- a/pkgs/applications/science/electronics/kicad/libraries.nix +++ b/pkgs/applications/science/electronics/kicad/libraries.nix @@ -1,6 +1,11 @@ -{ lib, stdenv, cmake, gettext -, fetchFromGitHub, fetchFromGitLab -, version, libSources +{ lib +, stdenv +, cmake +, gettext +, fetchFromGitHub +, fetchFromGitLab +, version +, libSources }: # callPackage libraries { @@ -33,7 +38,7 @@ let platforms = stdenv.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; + hydraPlatforms = if (name == "packages3d") then [ ] else platforms; }; }; in |