nixpkgs/pkgs/applications/video/natron/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

104 lines
2.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
2023-06-13 21:51:29 +00:00
, wrapQtAppsHook
, boost
, cairo
, ceres-solver
, expat
, extra-cmake-modules
, glog
, libXdmcp
, python3
, wayland
}:
2015-09-13 22:44:00 +00:00
let
minorVersion = "2.5";
version = "${minorVersion}.0";
OpenColorIO-Configs = fetchFromGitHub {
owner = "NatronGitHub";
repo = "OpenColorIO-Configs";
rev = "Natron-v${minorVersion}";
2023-06-13 21:51:29 +00:00
hash = "sha256-TD7Uge9kKbFxOmOCn+TSQovnKTmFS3uERTu5lmZFHbc=";
2015-09-13 22:44:00 +00:00
};
in
2023-06-13 21:51:29 +00:00
stdenv.mkDerivation {
2015-09-13 22:44:00 +00:00
inherit version;
2021-02-16 14:17:42 +00:00
pname = "natron";
2015-09-13 22:44:00 +00:00
2021-02-16 14:17:42 +00:00
src = fetchFromGitHub {
owner = "NatronGitHub";
repo = "Natron";
rev = "v${version}";
fetchSubmodules = true;
2023-06-13 21:51:29 +00:00
hash = "sha256-dgScbfyulZPlrngqSw7xwipldoRd8uFO8VP9mlJyhQ8=";
2015-09-13 22:44:00 +00:00
};
patches = [
# Fix gcc-13 build:
# https://github.com/NatronGitHub/Natron/pull/929
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/NatronGitHub/Natron/commit/4b44fb18293035873b35c3a2d2aa29da78cb8740.patch";
includes = ["Global/GlobalDefines.h"];
hash = "sha256-9E1tJCvO7zA1iQAhrlL3GaBFIGpkjxNOr31behQXdhQ=";
})
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/NatronGitHub/Natron/commit/f21f58622e32c1684567c82e2ab361f33030bda7.patch";
includes = ["Engine/Noise.cpp"];
hash = "sha256-t2mzTsRuXVs8d1BB/5uAY1OPxWRa3JTK1iAWLAMsrgs=";
})
];
cmakeFlags = [ "-DNATRON_SYSTEM_LIBS=ON" ];
nativeBuildInputs = [
cmake
pkg-config
2023-06-13 21:51:29 +00:00
wrapQtAppsHook
];
2015-09-13 22:44:00 +00:00
buildInputs = [
boost
expat
cairo
python3
2023-06-13 21:51:29 +00:00
python3.pkgs.pyside2
python3.pkgs.shiboken2
extra-cmake-modules
wayland
glog
ceres-solver
libXdmcp
2015-09-13 22:44:00 +00:00
];
postInstall = ''
mkdir -p $out/share
cp -r ${OpenColorIO-Configs} $out/share/OpenColorIO-Configs
2015-09-13 22:44:00 +00:00
'';
postFixup = ''
wrapProgram $out/bin/Natron \
2023-06-13 21:51:29 +00:00
--prefix PYTHONPATH : "${python3.pkgs.makePythonPath [ python3.pkgs.qtpy python3.pkgs.pyside2 ]}" \
--set-default OCIO "$out/share/OpenColorIO-Configs/blender/config.ocio"
2015-09-13 22:44:00 +00:00
'';
meta = with lib; {
2015-09-13 22:44:00 +00:00
description = "Node-graph based, open-source compositing software";
longDescription = ''
Node-graph based, open-source compositing software. Similar in
functionalities to Adobe After Effects and Nuke by The Foundry.
'';
homepage = "https://natron.fr/";
2021-01-15 05:42:41 +00:00
license = lib.licenses.gpl2;
2015-09-13 22:44:00 +00:00
maintainers = [ maintainers.puffnfresh ];
platforms = platforms.linux;
2023-06-13 21:51:29 +00:00
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
2015-09-13 22:44:00 +00:00
};
}