diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index dcc13cf99cc6..9765d2fcc1e4 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -15,7 +15,7 @@ , pname ? "kicad" , stable ? true , withOCC ? true -, withNgspice ? true +, withNgspice ? !stdenv.isDarwin , libngspice , withScripting ? true , python3 @@ -170,6 +170,7 @@ stdenv.mkDerivation rec { # $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set? installPhase = let + bin = if stdenv.isDarwin then "*.app/Contents/MacOS" else "bin"; tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ]; utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" ]; in @@ -181,13 +182,13 @@ stdenv.mkDerivation rec { # wrap each of the directly usable tools (map - (tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs" + (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) + (map (util: "ln -s ${base}/${bin}/${util} $out/bin/${util}") utils) "runHook postInstall" ])