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
35 changes: 35 additions & 0 deletions pkgs/applications/science/electronics/horizon-eda/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ stdenv, fetchFromGitHub, pkgconfig, sqlite, libyamlcpp, libuuid, gnome3, epoxy, librsvg, zeromq, cppzmq, glm, libgit2, curl, boost, python3, opencascade, libzip, podofo, wrapGAppsHook }:

stdenv.mkDerivation rec {
pname = "horizon-eda";
version = "1.0.0";

src = fetchFromGitHub {
owner = "horizon-eda";
repo = "horizon";
rev = "3f777bd2501b953981d64cf2054c265ce8d65c02";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rev = "3f777bd2501b953981d64cf2054c265ce8d65c02";
rev = "v${version}";

sha256 = "1d40lfgylwl3srqazyjgw9l3n7i82xrvkjcxvpx7ddyzy1d2aqmr";
};

buildInputs = [ sqlite libyamlcpp libuuid gnome3.gtkmm epoxy librsvg zeromq cppzmq glm libgit2 curl boost python3 libzip podofo opencascade ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if you were to sort this alphabetically (easier for me to do a quick comparison against https://docs.horizon-eda.org/en/latest/build-linux.html), but more importantly place each entry on a new line, like so:

buildInputs = [
  boost
  curl
  ...
  zeromq
];


nativeBuildInputs = [ pkgconfig wrapGAppsHook ];

NIX_CFLAGS_COMPILE = "-I${opencascade}/include/oce";

installPhase = ''
mkdir -p $out/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golfing: I believe this reduces to install -Dt $out/bin horizon-{eda,imp}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have an install target that also installs icons, desktop entry and such.

cp build/horizon-eda $out/bin/
cp build/horizon-imp $out/bin/
'';

enableParallelBuilding = true;

meta = with stdenv.lib; {
description = "A free EDA software to develop printed circuit boards";
homepage = "https://github.com/horizon-eda/horizon";
maintainers = with maintainers; [ luz ];
license = licenses.gpl3;
platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24391,6 +24391,8 @@ in

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

horizon-eda = callPackage ../applications/science/electronics/horizon-eda { };

kicad = callPackage ../applications/science/electronics/kicad { };
kicad-small = kicad.override { pname = "kicad-small"; with3d = false; };
kicad-unstable = kicad.override { pname = "kicad-unstable"; debug = true; };
Expand Down