From 8f1334f790fcb5ab0e23839828cb06cf5ecb1419 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Mon, 25 Nov 2024 16:00:56 +0800 Subject: [PATCH 1/2] horizon-eda: nixfmt --- pkgs/by-name/ho/horizon-eda/base.nix | 48 +++++++++++++------------ pkgs/by-name/ho/horizon-eda/package.nix | 23 +++++++----- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/ho/horizon-eda/base.nix b/pkgs/by-name/ho/horizon-eda/base.nix index d39fc83823a2..4e504a0027b8 100644 --- a/pkgs/by-name/ho/horizon-eda/base.nix +++ b/pkgs/by-name/ho/horizon-eda/base.nix @@ -1,21 +1,22 @@ -{ lib -, cmake -, cppzmq -, curl -, fetchFromGitHub -, glm -, gtkmm3 -, libarchive -, libepoxy -, libgit2 -, librsvg -, libuuid -, meson -, ninja -, opencascade-occt_7_6 -, pkg-config -, podofo -, sqlite +{ + lib, + cmake, + cppzmq, + curl, + fetchFromGitHub, + glm, + gtkmm3, + libarchive, + libepoxy, + libgit2, + librsvg, + libuuid, + meson, + ninja, + opencascade-occt_7_6, + pkg-config, + podofo, + sqlite, }: let opencascade-occt = opencascade-occt_7_6; @@ -56,11 +57,14 @@ rec { CASROOT = opencascade-occt; - meta = with lib; { + meta = { description = "Free EDA software to develop printed circuit boards"; homepage = "https://horizon-eda.org"; - maintainers = with maintainers; [ guserav jue89 ]; - license = licenses.gpl3Plus; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ + guserav + jue89 + ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/by-name/ho/horizon-eda/package.nix b/pkgs/by-name/ho/horizon-eda/package.nix index 40a91937f07f..92ebc186e8fa 100644 --- a/pkgs/by-name/ho/horizon-eda/package.nix +++ b/pkgs/by-name/ho/horizon-eda/package.nix @@ -1,17 +1,24 @@ -{ stdenv -, boost -, callPackage -, coreutils -, libspnav -, python3 -, wrapGAppsHook3 +{ + stdenv, + boost, + callPackage, + coreutils, + libspnav, + python3, + wrapGAppsHook3, }: let base = callPackage ./base.nix { }; in stdenv.mkDerivation rec { - inherit (base) pname version src meta CASROOT; + inherit (base) + pname + version + src + meta + CASROOT + ; # provide base for python module passthru = { From ab380b8d228f71bc17337a74976e5b37ab296676 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Mon, 25 Nov 2024 16:03:24 +0800 Subject: [PATCH 2/2] horizon-eda: fix build --- pkgs/by-name/ho/horizon-eda/base.nix | 6 ++++++ pkgs/by-name/ho/horizon-eda/package.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/pkgs/by-name/ho/horizon-eda/base.nix b/pkgs/by-name/ho/horizon-eda/base.nix index 4e504a0027b8..31c980998aa4 100644 --- a/pkgs/by-name/ho/horizon-eda/base.nix +++ b/pkgs/by-name/ho/horizon-eda/base.nix @@ -55,6 +55,12 @@ rec { sqlite ]; + env = { + NIX_CFLAGS_COMPILE = toString [ + "-fpermissive" + ]; + }; + CASROOT = opencascade-occt; meta = { diff --git a/pkgs/by-name/ho/horizon-eda/package.nix b/pkgs/by-name/ho/horizon-eda/package.nix index 92ebc186e8fa..069adb345593 100644 --- a/pkgs/by-name/ho/horizon-eda/package.nix +++ b/pkgs/by-name/ho/horizon-eda/package.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { src meta CASROOT + env ; # provide base for python module