tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
argyllcms: make reproducible
and make binfmt cross-compilable
Artturin
4 years ago
e7a05e90
23f71e94
+61
-53
1 changed file
expand all
collapse all
unified
split
pkgs
tools
graphics
argyllcms
default.nix
+61
-53
pkgs/tools/graphics/argyllcms/default.nix
···
13
13
sha256 = "sha256-umY3wQfG26Okqnw+MCUnlwWTAyJ6MR/FHe5oe61KBh0=";
14
14
};
15
15
16
16
-
# The contents of this file comes from the Jamtop file from the
17
17
-
# root of the ArgyllCMS distribution, rewritten to pick up Nixpkgs
18
18
-
# library paths. When ArgyllCMS is updated, make sure that changes
19
19
-
# in that file is reflected here.
20
20
-
jamTop = writeText "argyllcms_jamtop" ''
21
21
-
DESTDIR = "/" ;
22
22
-
REFSUBDIR = "share/argyllcms" ;
16
16
+
nativeBuildInputs = [ jam unzip ];
23
17
24
24
-
# Keep this DESTDIR anchored to Jamtop. PREFIX is used literally
25
25
-
ANCHORED_PATH_VARS = DESTDIR ;
18
18
+
postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
19
19
+
substituteInPlace Jambase \
20
20
+
--replace "-m64" ""
21
21
+
'';
26
22
27
27
-
# Tell standalone libraries that they are part of Argyll:
28
28
-
DEFINES += ARGYLLCMS ;
23
23
+
preConfigure = let
24
24
+
# The contents of this file comes from the Jamtop file from the
25
25
+
# root of the ArgyllCMS distribution, rewritten to pick up Nixpkgs
26
26
+
# library paths. When ArgyllCMS is updated, make sure that changes
27
27
+
# in that file is reflected here.
28
28
+
jamTop = writeText "argyllcms_jamtop" ''
29
29
+
DESTDIR = "/" ;
30
30
+
REFSUBDIR = "share/argyllcms" ;
29
31
30
30
-
# enable serial instruments & support
31
31
-
USE_SERIAL = true ;
32
32
+
# Keep this DESTDIR anchored to Jamtop. PREFIX is used literally
33
33
+
ANCHORED_PATH_VARS = DESTDIR ;
32
34
33
33
-
# enable fast serial instruments & support
34
34
-
USE_FAST_SERIAL = true ; # (Implicit in USE_SERIAL too)
35
35
+
# Tell standalone libraries that they are part of Argyll:
36
36
+
DEFINES += ARGYLLCMS ;
35
37
36
36
-
# enable USB instruments & support
37
37
-
USE_USB = true ;
38
38
+
# enable serial instruments & support
39
39
+
USE_SERIAL = true ;
38
40
39
39
-
# enable dummy Demo Instrument (only if code is available)
40
40
-
USE_DEMOINST = true ;
41
41
+
# enable fast serial instruments & support
42
42
+
USE_FAST_SERIAL = true ; # (Implicit in USE_SERIAL too)
41
43
42
42
-
# enable Video Test Patch Generator and 3DLUT device support
43
43
-
# (V2.0.0 and above)
44
44
-
USE_VTPGLUT = false ;
44
44
+
# enable USB instruments & support
45
45
+
USE_USB = true ;
45
46
46
46
-
# enable Printer device support
47
47
-
USE_PRINTER = false ;
47
47
+
# enable dummy Demo Instrument (only if code is available)
48
48
+
USE_DEMOINST = true ;
48
49
49
49
-
# enable CMF Measurement device and accessory support (if present)
50
50
-
USE_CMFM = false ;
50
50
+
# enable Video Test Patch Generator and 3DLUT device support
51
51
+
# (V2.0.0 and above)
52
52
+
USE_VTPGLUT = false ;
51
53
52
52
-
# Use ArgyllCMS version of libusb (deprecated - don't use)
53
53
-
USE_LIBUSB = false ;
54
54
+
# enable Printer device support
55
55
+
USE_PRINTER = false ;
54
56
55
55
-
# Compile in graph plotting code (Not fully implemented)
56
56
-
USE_PLOT = true ; # [true]
57
57
+
# enable CMF Measurement device and accessory support (if present)
58
58
+
USE_CMFM = false ;
57
59
58
58
-
JPEGLIB = ;
59
59
-
JPEGINC = ;
60
60
-
HAVE_JPEG = true ;
60
60
+
# Use ArgyllCMS version of libusb (deprecated - don't use)
61
61
+
USE_LIBUSB = false ;
61
62
62
62
-
TIFFLIB = ;
63
63
-
TIFFINC = ;
64
64
-
HAVE_TIFF = true ;
63
63
+
# Compile in graph plotting code (Not fully implemented)
64
64
+
USE_PLOT = true ; # [true]
65
65
66
66
-
PNGLIB = ;
67
67
-
PNGINC = ;
68
68
-
HAVE_PNG = true ;
66
66
+
JPEGLIB = ;
67
67
+
JPEGINC = ;
68
68
+
HAVE_JPEG = true ;
69
69
70
70
-
ZLIB = ;
71
71
-
ZINC = ;
72
72
-
HAVE_Z = true ;
70
70
+
TIFFLIB = ;
71
71
+
TIFFINC = ;
72
72
+
HAVE_TIFF = true ;
73
73
74
74
-
SSLLIB = ;
75
75
-
SSLINC = ;
76
76
-
HAVE_SSL = true ;
74
74
+
PNGLIB = ;
75
75
+
PNGINC = ;
76
76
+
HAVE_PNG = true ;
77
77
78
78
-
LINKFLAGS +=
79
79
-
${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)}
80
80
-
-ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss
81
81
-
-ljpeg -ltiff -lpng -lssl ;
82
82
-
'';
78
78
+
ZLIB = ;
79
79
+
ZINC = ;
80
80
+
HAVE_Z = true ;
83
81
84
84
-
nativeBuildInputs = [ jam unzip ];
82
82
+
SSLLIB = ;
83
83
+
SSLINC = ;
84
84
+
HAVE_SSL = true ;
85
85
86
86
-
preConfigure = ''
86
86
+
LINKFLAGS +=
87
87
+
${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)}
88
88
+
-ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss
89
89
+
-ljpeg -ltiff -lpng -lssl ;
90
90
+
'';
91
91
+
in ''
87
92
cp ${jamTop} Jamtop
88
93
substituteInPlace Makefile --replace "-j 3" "-j $NIX_BUILD_CORES"
89
94
# Remove tiff, jpg and png to be sure the nixpkgs-provided ones are used
90
95
rm -rf tiff jpg png
91
96
92
92
-
unset AR
97
97
+
export AR="$AR rusc"
93
98
'';
94
99
95
100
buildInputs = [
···
110
115
mkdir -p $out/etc/udev/rules.d
111
116
sed -i '/udev-acl/d' usb/55-Argyll.rules
112
117
cp -v usb/55-Argyll.rules $out/etc/udev/rules.d/
118
118
+
119
119
+
sed -i -e 's/^CREATED .*/CREATED "'"$(date -d @$SOURCE_DATE_EPOCH)"'"/g' $out/share/argyllcms/RefMediumGamut.gam
120
120
+
113
121
'';
114
122
115
123
meta = with lib; {