summary refs log tree commit diff
path: root/pkgs/applications/science/electronics/horizon-eda/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/electronics/horizon-eda/default.nix')
-rw-r--r--pkgs/applications/science/electronics/horizon-eda/default.nix59
1 files changed, 11 insertions, 48 deletions
diff --git a/pkgs/applications/science/electronics/horizon-eda/default.nix b/pkgs/applications/science/electronics/horizon-eda/default.nix
index c4c1e798dd5..1fbc92f0611 100644
--- a/pkgs/applications/science/electronics/horizon-eda/default.nix
+++ b/pkgs/applications/science/electronics/horizon-eda/default.nix
@@ -1,62 +1,33 @@
 { stdenv
 , boost
+, callPackage
 , coreutils
-, cppzmq
-, curl
-, libepoxy
-, fetchFromGitHub
-, glm
-, gtkmm3
-, lib
-, libarchive
-, libgit2
-, librsvg
 , libspnav
-, libuuid
-, opencascade-occt
-, pkg-config
-, podofo
 , python3
-, sqlite
 , wrapGAppsHook
 }:
 
+let
+  base = callPackage ./base.nix { };
+in
 stdenv.mkDerivation rec {
-  pname = "horizon-eda";
-  version = "2.5.0";
+  inherit (base) pname version src meta CASROOT;
 
-  src = fetchFromGitHub {
-    owner = "horizon-eda";
-    repo = "horizon";
-    rev = "v${version}";
-    sha256 = "sha256-UcjbDJR6shyETpanNkRoH8LF8r6gFjsyNHVSCMHKqS8=";
+  # provide base for python module
+  passthru = {
+    inherit base;
   };
 
-  buildInputs = [
-    cppzmq
-    curl
-    libepoxy
-    glm
-    gtkmm3
-    libarchive
-    libgit2
-    librsvg
+  buildInputs = base.buildInputs ++ [
     libspnav
-    libuuid
-    opencascade-occt
-    podofo
-    python3
-    sqlite
   ];
 
-  nativeBuildInputs = [
+  nativeBuildInputs = base.nativeBuildInputs ++ [
     boost.dev
-    pkg-config
     wrapGAppsHook
+    python3
   ];
 
-  CASROOT = opencascade-occt;
-
   installFlags = [
     "INSTALL=${coreutils}/bin/install"
     "DESTDIR=$(out)"
@@ -64,12 +35,4 @@ stdenv.mkDerivation rec {
   ];
 
   enableParallelBuilding = true;
-
-  meta = with lib; {
-    description = "A free EDA software to develop printed circuit boards";
-    homepage = "https://horizon-eda.org";
-    maintainers = with maintainers; [ guserav ];
-    license = licenses.gpl3;
-    platforms = platforms.linux;
-  };
 }