djv: init at 2.0.8-unstable-2021-07-31

+154
+152
pkgs/applications/graphics/djv/default.nix
··· 1 + { stdenv 2 + , cmake 3 + , fetchFromGitHub 4 + , lib 5 + , alsa-lib 6 + , libGL 7 + , libX11 8 + , libXinerama 9 + , libXi 10 + , zlib 11 + , rtaudio 12 + , rapidjson 13 + , ilmbase 14 + , glm 15 + , glfw3 16 + , libpng 17 + , opencolorio_1 18 + , freetype 19 + }: 20 + 21 + let 22 + 23 + # The way third-party dependencies are packaged has changed 24 + # significantly from the 2.0.8 release. This means any packaging 25 + # effort for the 2.0.8 release would have to be redone for the next 26 + # release. Hence we package the git version for now and can easily 27 + # jump onto the next release once it's available. 28 + djvVersion = "2.0.8-unstable-2021-07-31"; 29 + 30 + djvSrc = fetchFromGitHub { 31 + owner = "darbyjohnston"; 32 + repo = "djv"; 33 + rev = "ae31712c4f2802a874217ac194bde26287993934"; 34 + sha256 = "1qgia6vqb6fhyfj8w925xl6k6zidrp2gj5f32bpi94lwwhi6p9pd"; 35 + }; 36 + 37 + # DJV's build system tries to automatically pull in FSeq, another 38 + # library by the DJV author. 39 + # 40 + # When updating, check the following file in the DJV source: 41 + # etc/SuperBuild/cmake/Modules/BuildFSeq.cmake 42 + # 43 + # If there is revision or tag specified, DJV wants to use the most 44 + # recent master version 45 + fseqSrc = fetchFromGitHub { 46 + owner = "darbyjohnston"; 47 + repo = "fseq"; 48 + rev = "545fac6018100f7fca474b8ee4f1efa7cbf6bf45"; 49 + sha256 = "0qfhbrzji05hh5kwgd1wvq2lbf81ylbi7v7aqk28aws27f8d2hk0"; 50 + }; 51 + 52 + djv-deps = stdenv.mkDerivation rec { 53 + pname = "djv-dependencies"; 54 + version = djvVersion; 55 + 56 + src = djvSrc; 57 + 58 + sourceRoot = "source/etc/SuperBuild"; 59 + 60 + nativeBuildInputs = [ cmake ]; 61 + buildInputs = [ 62 + libGL 63 + ]; 64 + 65 + postPatch = '' 66 + chmod -R +w . 67 + 68 + sed -i 's,GIT_REPOSITORY https://github.com/darbyjohnston/FSeq.git,SOURCE_DIR ${fseqSrc},' \ 69 + cmake/Modules/BuildFSeq.cmake 70 + 71 + # We pull these projects in as normal Nix dependencies. No need 72 + # to build them again here. 73 + 74 + sed -i CMakeLists.txt \ 75 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS RapidJSON)/d' \ 76 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS RtAudio)/d' \ 77 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS IlmBase)/d' \ 78 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS GLM)/d' \ 79 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS GLFW)/d' \ 80 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS ZLIB)/d' \ 81 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS PNG)/d' \ 82 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS FreeType)/d' \ 83 + -e '/list(APPEND DJV_THIRD_PARTY_DEPS OCIO)/d' 84 + 85 + # The "SuperBuild" wants to build DJV right here. This is 86 + # inconvenient, because then the `make install` target is not generated 87 + # by CMake. We build DJV in its own derivation below. This also makes 88 + # the build a bit more modular. 89 + 90 + sed -i '/include(BuildDJV)/d' \ 91 + CMakeLists.txt 92 + ''; 93 + 94 + cmakeFlags = [ 95 + "-DDJV_THIRD_PARTY_OpenEXR:BOOL=False" 96 + "-DDJV_THIRD_PARTY_JPEG:BOOL=False" 97 + "-DDJV_THIRD_PARTY_TIFF:BOOL=False" 98 + ]; 99 + 100 + dontInstall = true; 101 + doCheck = true; 102 + }; 103 + 104 + in 105 + stdenv.mkDerivation rec { 106 + pname = "djv"; 107 + version = djvVersion; 108 + 109 + src = djvSrc; 110 + 111 + nativeBuildInputs = [ cmake ]; 112 + buildInputs = [ 113 + alsa-lib 114 + libGL 115 + libX11 116 + libXinerama 117 + libXi 118 + rapidjson 119 + rtaudio 120 + ilmbase 121 + glm 122 + glfw3 123 + zlib.dev 124 + libpng 125 + freetype 126 + opencolorio_1 127 + djv-deps 128 + ]; 129 + 130 + postPatch = '' 131 + chmod -R +w . 132 + 133 + # When linking opencolorio statically this results in failing to 134 + # pull in opencolorio's dependencies (tixml and yaml libraries). Avoid 135 + # this by linking it statically instead. 136 + 137 + sed -i cmake/Modules/FindOCIO.cmake \ 138 + -e 's/PATH_SUFFIXES static//' \ 139 + -e '/OpenColorIO_STATIC/d' 140 + ''; 141 + 142 + # GLFW requires a working X11 session. 143 + doCheck = false; 144 + 145 + meta = with lib; { 146 + description = "A professional review software for VFX, animation, and film production"; 147 + homepage = "https://darbyjohnston.github.io/DJV/"; 148 + platforms = platforms.linux; 149 + maintainers = [ maintainers.blitz ]; 150 + license = licenses.bsd3; 151 + }; 152 + }
+2
pkgs/top-level/all-packages.nix
··· 2551 2551 2552 2552 dino = callPackage ../applications/networking/instant-messengers/dino { }; 2553 2553 2554 + djv = callPackage ../applications/graphics/djv { }; 2555 + 2554 2556 dlx = callPackage ../misc/emulators/dlx { }; 2555 2557 2556 2558 dgen-sdl = callPackage ../misc/emulators/dgen-sdl { };