kicad: simplify component names

This commit is contained in:
Evils 2020-01-12 16:45:35 +01:00 committed by Frederik Rietdijk
parent ec85f51603
commit a9942b0226
1 changed files with 20 additions and 20 deletions

View File

@ -35,8 +35,8 @@ let
python = python3; python = python3;
wxPython = python3Packages.wxPython_4_0; wxPython = python3Packages.wxPython_4_0;
kicad-libraries = callPackages ./libraries.nix versionConfig.libVersion; libraries = callPackages ./libraries.nix versionConfig.libVersion;
kicad-base = callPackage ./base.nix { base = callPackage ./base.nix {
pname = baseName; pname = baseName;
inherit versions stable baseName; inherit versions stable baseName;
inherit wxGTK python wxPython; inherit wxGTK python wxPython;
@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
inherit pname; inherit pname;
version = versions.${baseName}.kicadVersion.version; version = versions.${baseName}.kicadVersion.version;
src = kicad-base; src = base;
dontUnpack = true; dontUnpack = true;
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
@ -61,10 +61,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = optionals (scriptingSupport) nativeBuildInputs = optionals (scriptingSupport)
[ pythonPackages.wrapPython ]; [ pythonPackages.wrapPython ];
# wrapGAppsHook added the equivalent to ${kicad-base}/share # wrapGAppsHook added the equivalent to ${base}/share
# though i noticed no difference without it # though i noticed no difference without it
makeWrapperArgs = [ makeWrapperArgs = [
"--prefix XDG_DATA_DIRS : ${kicad-base}/share" "--prefix XDG_DATA_DIRS : ${base}/share"
"--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share" "--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share"
"--prefix XDG_DATA_DIRS : ${gnome3.defaultIconTheme}/share" "--prefix XDG_DATA_DIRS : ${gnome3.defaultIconTheme}/share"
"--prefix XDG_DATA_DIRS : ${wxGTK.gtk}/share/gsettings-schemas/${wxGTK.gtk.name}" "--prefix XDG_DATA_DIRS : ${wxGTK.gtk}/share/gsettings-schemas/${wxGTK.gtk.name}"
@ -73,13 +73,13 @@ stdenv.mkDerivation rec {
"--prefix XDG_DATA_DIRS : ${cups}/share" "--prefix XDG_DATA_DIRS : ${cups}/share"
"--prefix GIO_EXTRA_MODULES : ${gnome3.dconf}/lib/gio/modules" "--prefix GIO_EXTRA_MODULES : ${gnome3.dconf}/lib/gio/modules"
"--set KISYSMOD ${kicad-libraries.footprints}/share/kicad/modules" "--set KISYSMOD ${libraries.footprints}/share/kicad/modules"
"--set KICAD_SYMBOL_DIR ${kicad-libraries.symbols}/share/kicad/library" "--set KICAD_SYMBOL_DIR ${libraries.symbols}/share/kicad/library"
"--set KICAD_TEMPLATE_DIR ${kicad-libraries.templates}/share/kicad/template" "--set KICAD_TEMPLATE_DIR ${libraries.templates}/share/kicad/template"
"--prefix KICAD_TEMPLATE_DIR : ${kicad-libraries.symbols}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${libraries.symbols}/share/kicad/template"
"--prefix KICAD_TEMPLATE_DIR : ${kicad-libraries.footprints}/share/kicad/template" "--prefix KICAD_TEMPLATE_DIR : ${libraries.footprints}/share/kicad/template"
] ]
++ optionals (with3d) [ "--set KISYS3DMOD ${kicad-libraries.packages3d}/share/kicad/modules/packages3d" ] ++ optionals (with3d) [ "--set KISYS3DMOD ${libraries.packages3d}/share/kicad/modules/packages3d" ]
++ optionals (ngspiceSupport) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] ++ optionals (ngspiceSupport) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ]
# infinisil's workaround for #39493 # infinisil's workaround for #39493
@ -88,30 +88,30 @@ stdenv.mkDerivation rec {
# dunno why i have to add $makeWrapperArgs manually... # dunno why i have to add $makeWrapperArgs manually...
# $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set? # $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set?
# not sure if anything has to be done with the other stuff in kicad-base/bin # not sure if anything has to be done with the other stuff in base/bin
# dxf2idf, idf2vrml, idfcyl, idfrect, kicad2step, kicad-ogltest # dxf2idf, idf2vrml, idfcyl, idfrect, kicad2step, kicad-ogltest
installPhase = installPhase =
optionalString (scriptingSupport) '' buildPythonPath "${kicad-base} $pythonPath" optionalString (scriptingSupport) '' buildPythonPath "${base} $pythonPath"
'' + '' +
'' makeWrapper ${kicad-base}/bin/kicad $out/bin/kicad $makeWrapperArgs '' '' makeWrapper ${base}/bin/kicad $out/bin/kicad $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/pcbnew $out/bin/pcbnew $makeWrapperArgs '' '' makeWrapper ${base}/bin/pcbnew $out/bin/pcbnew $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/eeschema $out/bin/eeschema $makeWrapperArgs '' '' makeWrapper ${base}/bin/eeschema $out/bin/eeschema $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/gerbview $out/bin/gerbview $makeWrapperArgs '' '' makeWrapper ${base}/bin/gerbview $out/bin/gerbview $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/pcb_calculator $out/bin/pcb_calculator $makeWrapperArgs '' '' makeWrapper ${base}/bin/pcb_calculator $out/bin/pcb_calculator $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/pl_editor $out/bin/pl_editor $makeWrapperArgs '' '' makeWrapper ${base}/bin/pl_editor $out/bin/pl_editor $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' + '' +
'' makeWrapper ${kicad-base}/bin/bitmap2component $out/bin/bitmap2component $makeWrapperArgs '' '' makeWrapper ${base}/bin/bitmap2component $out/bin/bitmap2component $makeWrapperArgs ''
+ optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH" + optionalString (scriptingSupport) '' --set PYTHONPATH "$program_PYTHONPATH"
'' ''
; ;