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