about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorGaetan Lepage <gaetan@glepage.com>2024-01-07 00:05:39 +0100
committerGaetan Lepage <gaetan@glepage.com>2024-06-16 13:47:57 +0200
commit1eca3fd31ccdc90408d06995ebf00cbeae648388 (patch)
tree8a6b3c81fca80aa3f9f22e2331e97346aa6ba7d8 /pkgs/applications/graphics
parent8627d8aeb46a04b66e0c3fa2f7d5d39d32a81ba0 (diff)
brlcad: 7.34.2 -> 7.38.2
Changelog: https://github.com/BRL-CAD/brlcad/releases/tag/rel-7-38-2
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/brlcad/default.nix25
1 files changed, 22 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/brlcad/default.nix b/pkgs/applications/graphics/brlcad/default.nix
index f30a6acbbbee7..91b063f8fc935 100644
--- a/pkgs/applications/graphics/brlcad/default.nix
+++ b/pkgs/applications/graphics/brlcad/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , fontconfig
 , libX11
@@ -11,15 +12,25 @@
 
 stdenv.mkDerivation rec {
   pname = "brlcad";
-  version = "7.34.2";
+  version = "7.38.2";
 
   src = fetchFromGitHub {
     owner = "BRL-CAD";
-    repo = pname;
+    repo = "brlcad";
     rev = "refs/tags/rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
-    hash = "sha256-oafu255xElEIk8p4yvNyR2maykUfxQui/L5MkicA+JA=";
+    hash = "sha256-23UTeH4gY2x/QGYZ64glAkf6LmsXBAppIOHgoUdxgpo=";
   };
 
+  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
   ];
@@ -36,11 +47,19 @@ stdenv.mkDerivation rec {
     "-DBRLCAD_ENABLE_STRICT=OFF"
   ];
 
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=array-bounds"
+  ];
+
   meta = with lib; {
     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/${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";
   };
 }