nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 fontconfig,
8 libX11,
9 libXi,
10 freetype,
11 libgbm,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "brlcad";
16 version = "7.38.2";
17
18 src = fetchFromGitHub {
19 owner = "BRL-CAD";
20 repo = "brlcad";
21 rev = "refs/tags/rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
22 hash = "sha256-23UTeH4gY2x/QGYZ64glAkf6LmsXBAppIOHgoUdxgpo=";
23 };
24
25 patches = [
26 # This commit was bringing an impurity in the rpath resulting in:
27 # RPATH of binary /nix/store/rq2hjvfgq2nvh5zxch51ij34rqqdpark-brlcad-7.38.0/bin/tclsh contains a forbidden reference to /build/
28 (fetchpatch {
29 url = "https://github.com/BRL-CAD/brlcad/commit/fbdbf042b2db4c7d46839a17bbf4985cdb81f0ae.patch";
30 revert = true;
31 hash = "sha256-Wfihd7TLkE8aOpLdDtYmhhd7nZijiVGh1nbUjWr/BjQ=";
32 })
33 ];
34
35 nativeBuildInputs = [
36 cmake
37 ];
38
39 buildInputs = [
40 fontconfig
41 libX11
42 libXi
43 freetype
44 libgbm
45 ];
46
47 cmakeFlags = [
48 "-DBRLCAD_ENABLE_STRICT=OFF"
49 ];
50
51 env.NIX_CFLAGS_COMPILE = toString [
52 # Needed with GCC 12
53 "-Wno-error=array-bounds"
54 ];
55
56 meta = with lib; {
57 homepage = "https://brlcad.org";
58 description = "BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system";
59 changelog = "https://github.com/BRL-CAD/brlcad/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
60 license = with licenses; [
61 lgpl21
62 bsd2
63 ];
64 maintainers = with maintainers; [ GaetanLepage ];
65 platforms = platforms.linux;
66 # error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined.
67 broken = stdenv.system == "aarch64-linux";
68 };
69}