about summary refs log tree commit diff
path: root/pkgs/applications/graphics/curv
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2023-02-07 13:50:54 +0100
committerPeder Bergebakken Sundt <pbsds@hotmail.com>2023-06-17 21:28:03 +0200
commit96c0ecaed56b5845e34dcd541f308fe5562492c8 (patch)
tree57e6ed5718f05d7c42bd661d65b576de30ed804b /pkgs/applications/graphics/curv
parentbbce166d72307eda55c9a62b9d70e1f42d887ec8 (diff)
curv: init at 0.5
Diffstat (limited to 'pkgs/applications/graphics/curv')
-rw-r--r--pkgs/applications/graphics/curv/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/curv/default.nix b/pkgs/applications/graphics/curv/default.nix
new file mode 100644
index 0000000000000..6725e525c3768
--- /dev/null
+++ b/pkgs/applications/graphics/curv/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, eigen
+, glm
+, libGL
+, libpng
+, openexr
+, tbb
+, xorg
+, ilmbase
+, llvmPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "curv";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "curv3d";
+    repo = "curv";
+    rev = "refs/tags/${version}";
+    hash = "sha256-m4p5uxRk6kEJUilmbQ1zJcQDRvRCV7pkxnqupZJxyjo=";
+    fetchSubmodules = true;
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    boost
+    eigen
+    glm
+    libGL
+    libpng
+    openexr
+    tbb
+    xorg.libX11
+    xorg.libXcursor
+    xorg.libXext
+    xorg.libXi
+    xorg.libXinerama
+    xorg.libXrandr
+  ] ++ lib.optionals stdenv.isDarwin [
+    ilmbase
+    llvmPackages.openmp
+  ];
+
+  # GPU tests do not work in sandbox, instead we do this for sanity
+  checkPhase = ''
+    runHook preCheck
+    test "$($out/bin/curv -x 2 + 2)" -eq "4"
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "A 2D and 3D geometric modelling programming language for creating art with maths";
+    homepage = "https://github.com/curv3d/curv";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    broken = stdenv.isDarwin;
+    maintainers = with maintainers; [ pbsds ];
+  };
+}