From 899463d6051aee5a8a7b577c95891158c964c447 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 16 Aug 2024 16:05:01 +0200 Subject: [PATCH 1/2] brlcad: format --- pkgs/by-name/br/brlcad/package.nix | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/br/brlcad/package.nix b/pkgs/by-name/br/brlcad/package.nix index 031b15baf0bae..df7374640585d 100644 --- a/pkgs/by-name/br/brlcad/package.nix +++ b/pkgs/by-name/br/brlcad/package.nix @@ -1,13 +1,14 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, cmake -, fontconfig -, libX11 -, libXi -, freetype -, mesa +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cmake, + fontconfig, + libX11, + libXi, + freetype, + mesa, }: stdenv.mkDerivation rec { @@ -31,9 +32,7 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ - cmake - ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ fontconfig @@ -43,9 +42,7 @@ stdenv.mkDerivation rec { mesa ]; - cmakeFlags = [ - "-DBRLCAD_ENABLE_STRICT=OFF" - ]; + cmakeFlags = [ "-DBRLCAD_ENABLE_STRICT=OFF" ]; env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 From 8fc053dfb92b3a0f2eaaa2780e20126d73d35533 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 16 Aug 2024 22:26:27 +0200 Subject: [PATCH 2/2] brlcad: 7.38.2 -> 7.40.2 Diff: https://github.com/BRL-CAD/brlcad/compare/rel-7-38-2...rel-7-40-2 Changelog: https://github.com/BRL-CAD/brlcad/releases/tag/rel-7-40-2 --- pkgs/by-name/br/brlcad/package.nix | 61 ++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/br/brlcad/package.nix b/pkgs/by-name/br/brlcad/package.nix index df7374640585d..46c2e3c7195fd 100644 --- a/pkgs/by-name/br/brlcad/package.nix +++ b/pkgs/by-name/br/brlcad/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, fetchpatch, cmake, + git, fontconfig, libX11, libXi, @@ -11,28 +12,43 @@ mesa, }: +let + bext = fetchFromGitHub { + owner = "BRL-CAD"; + repo = "bext"; + rev = ""; + hash = ""; + }; + + version = "7.40.2"; + tag = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}"; +in + stdenv.mkDerivation rec { pname = "brlcad"; - version = "7.38.2"; + inherit version; src = fetchFromGitHub { owner = "BRL-CAD"; repo = "brlcad"; - rev = "refs/tags/rel-${lib.replaceStrings [ "." ] [ "-" ] version}"; - hash = "sha256-23UTeH4gY2x/QGYZ64glAkf6LmsXBAppIOHgoUdxgpo="; + inherit tag; + hash = "sha256-v2MxatzplBpZ4Y/PAlAxAe3uKu8HboBu1+WM0R4yTwo="; }; - patches = [ - # This commit was bringing an impurity in the rpath resulting in: - # RPATH of binary /nix/store/rq2hjvfgq2nvh5zxch51ij34rqqdpark-brlcad-7.38.0/bin/tclsh contains a forbidden reference to /build/ - (fetchpatch { - url = "https://github.com/BRL-CAD/brlcad/commit/fbdbf042b2db4c7d46839a17bbf4985cdb81f0ae.patch"; - revert = true; - hash = "sha256-Wfihd7TLkE8aOpLdDtYmhhd7nZijiVGh1nbUjWr/BjQ="; - }) - ]; + # patches = [ + # # This commit was bringing an impurity in the rpath resulting in: + # # RPATH of binary /nix/store/rq2hjvfgq2nvh5zxch51ij34rqqdpark-brlcad-7.38.0/bin/tclsh contains a forbidden reference to /build/ + # (fetchpatch { + # url = "https://github.com/BRL-CAD/brlcad/commit/fbdbf042b2db4c7d46839a17bbf4985cdb81f0ae.patch"; + # revert = true; + # hash = "sha256-Wfihd7TLkE8aOpLdDtYmhhd7nZijiVGh1nbUjWr/BjQ="; + # }) + # ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + git + ]; buildInputs = [ fontconfig @@ -49,14 +65,19 @@ stdenv.mkDerivation rec { "-Wno-error=array-bounds" ]; - meta = with lib; { + meta = { homepage = "https://brlcad.org"; description = "BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system"; - changelog = "https://github.com/BRL-CAD/brlcad/releases/tag/${lib.removePrefix "refs/tags/" src.rev}"; - license = with licenses; [ lgpl21 bsd2 ]; - maintainers = with maintainers; [ GaetanLepage ]; - platforms = platforms.linux; - # error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined. - broken = stdenv.system == "aarch64-linux"; + changelog = "https://github.com/BRL-CAD/brlcad/releases/tag/${tag}"; + license = with lib.licenses; [ + lgpl21 + bsd2 + ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; + platforms = lib.platforms.linux; + badPlatforms = [ + # error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined. + "aarch64-linux" + ]; }; }