2015-09-07 11:41:39 +02:00
|
|
|
{ stdenv, fetchzip, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama
|
|
|
|
, libXrender, libXext, libtiff, libjpeg, libpng, libXScrnSaver, writeText
|
2018-07-21 02:44:44 +02:00
|
|
|
, libXdmcp, libXau, lib, openssl }:
|
2021-07-14 17:10:11 +02:00
|
|
|
|
2012-12-13 15:58:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "argyllcms";
|
2021-09-22 16:39:23 +02:00
|
|
|
version = "2.2.1";
|
2012-12-13 15:58:57 +01:00
|
|
|
|
2015-09-07 11:41:39 +02:00
|
|
|
src = fetchzip {
|
|
|
|
# Kind of flacky URL, it was reaturning 406 and inconsistent binaries for a
|
|
|
|
# while on me. It might be good to find a mirror
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://www.argyllcms.com/Argyll_V${version}_src.zip";
|
2021-09-22 16:39:23 +02:00
|
|
|
sha256 = "sha256-umY3wQfG26Okqnw+MCUnlwWTAyJ6MR/FHe5oe61KBh0=";
|
2012-12-13 15:58:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# The contents of this file comes from the Jamtop file from the
|
|
|
|
# root of the ArgyllCMS distribution, rewritten to pick up Nixpkgs
|
|
|
|
# library paths. When ArgyllCMS is updated, make sure that changes
|
|
|
|
# in that file is reflected here.
|
|
|
|
jamTop = writeText "argyllcms_jamtop" ''
|
|
|
|
DESTDIR = "/" ;
|
2021-09-22 16:39:23 +02:00
|
|
|
REFSUBDIR = "share/argyllcms" ;
|
2015-09-07 11:41:39 +02:00
|
|
|
|
2012-12-13 15:58:57 +01:00
|
|
|
# Keep this DESTDIR anchored to Jamtop. PREFIX is used literally
|
|
|
|
ANCHORED_PATH_VARS = DESTDIR ;
|
2015-09-07 11:41:39 +02:00
|
|
|
|
2012-12-13 15:58:57 +01:00
|
|
|
# Tell standalone libraries that they are part of Argyll:
|
|
|
|
DEFINES += ARGYLLCMS ;
|
2015-09-07 11:41:39 +02:00
|
|
|
|
|
|
|
# enable serial instruments & support
|
|
|
|
USE_SERIAL = true ;
|
|
|
|
|
|
|
|
# enable fast serial instruments & support
|
|
|
|
USE_FAST_SERIAL = true ; # (Implicit in USE_SERIAL too)
|
|
|
|
|
|
|
|
# enable USB instruments & support
|
|
|
|
USE_USB = true ;
|
|
|
|
|
|
|
|
# enable dummy Demo Instrument (only if code is available)
|
|
|
|
USE_DEMOINST = true ;
|
|
|
|
|
2021-09-22 16:39:23 +02:00
|
|
|
# enable Video Test Patch Generator and 3DLUT device support
|
|
|
|
# (V2.0.0 and above)
|
|
|
|
USE_VTPGLUT = false ;
|
|
|
|
|
|
|
|
# enable Printer device support
|
|
|
|
USE_PRINTER = false ;
|
|
|
|
|
|
|
|
# enable CMF Measurement device and accessory support (if present)
|
|
|
|
USE_CMFM = false ;
|
|
|
|
|
2015-09-07 11:41:39 +02:00
|
|
|
# Use ArgyllCMS version of libusb (deprecated - don't use)
|
|
|
|
USE_LIBUSB = false ;
|
|
|
|
|
2021-09-22 16:39:23 +02:00
|
|
|
# Compile in graph plotting code (Not fully implemented)
|
|
|
|
USE_PLOT = true ; # [true]
|
2012-12-13 15:58:57 +01:00
|
|
|
|
|
|
|
JPEGLIB = ;
|
|
|
|
JPEGINC = ;
|
|
|
|
HAVE_JPEG = true ;
|
|
|
|
|
|
|
|
TIFFLIB = ;
|
|
|
|
TIFFINC = ;
|
|
|
|
HAVE_TIFF = true ;
|
|
|
|
|
2015-09-07 11:41:39 +02:00
|
|
|
PNGLIB = ;
|
|
|
|
PNGINC = ;
|
|
|
|
HAVE_PNG = true ;
|
|
|
|
|
|
|
|
ZLIB = ;
|
|
|
|
ZINC = ;
|
|
|
|
HAVE_Z = true ;
|
|
|
|
|
|
|
|
SSLLIB = ;
|
|
|
|
SSLINC = ;
|
|
|
|
HAVE_SSL = true ;
|
|
|
|
|
2012-12-13 15:58:57 +01:00
|
|
|
LINKFLAGS +=
|
|
|
|
${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)}
|
|
|
|
-ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss
|
2015-09-07 11:41:39 +02:00
|
|
|
-ljpeg -ltiff -lpng -lssl ;
|
2012-12-13 15:58:57 +01:00
|
|
|
'';
|
|
|
|
|
2013-01-13 11:33:45 +01:00
|
|
|
nativeBuildInputs = [ jam unzip ];
|
2012-12-13 15:58:57 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cp ${jamTop} Jamtop
|
|
|
|
substituteInPlace Makefile --replace "-j 3" "-j $NIX_BUILD_CORES"
|
2015-09-07 11:41:39 +02:00
|
|
|
# Remove tiff, jpg and png to be sure the nixpkgs-provided ones are used
|
|
|
|
rm -rf tiff jpg png
|
2017-07-23 02:54:57 +02:00
|
|
|
|
|
|
|
unset AR
|
2012-12-13 15:58:57 +01:00
|
|
|
'';
|
|
|
|
|
2015-09-07 11:41:39 +02:00
|
|
|
buildInputs = [
|
|
|
|
libtiff libjpeg libpng libX11 libXxf86vm libXrandr libXinerama libXext
|
|
|
|
libXrender libXScrnSaver libXdmcp libXau openssl
|
2012-12-13 15:58:57 +01:00
|
|
|
];
|
|
|
|
|
2019-10-26 17:39:27 +02:00
|
|
|
buildFlags = [ "all" ];
|
2012-12-13 15:58:57 +01:00
|
|
|
|
2019-10-26 17:39:27 +02:00
|
|
|
makeFlags = [
|
2021-01-24 10:19:10 +01:00
|
|
|
"PREFIX=${placeholder "out"}"
|
2019-10-26 17:39:27 +02:00
|
|
|
];
|
2012-12-13 15:58:57 +01:00
|
|
|
|
2015-09-07 11:41:39 +02:00
|
|
|
# Install udev rules, but remove lines that set up the udev-acl
|
2012-12-13 15:58:57 +01:00
|
|
|
# stuff, since that is handled by udev's own rules (70-udev-acl.rules)
|
|
|
|
postInstall = ''
|
|
|
|
rm -v $out/bin/License.txt
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
2015-09-07 11:41:39 +02:00
|
|
|
sed -i '/udev-acl/d' usb/55-Argyll.rules
|
|
|
|
cp -v usb/55-Argyll.rules $out/etc/udev/rules.d/
|
2012-12-13 15:58:57 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.argyllcms.com";
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "Color management system (compatible with ICC)";
|
2012-12-13 15:58:57 +01:00
|
|
|
license = licenses.gpl3;
|
2019-08-20 15:24:01 +02:00
|
|
|
maintainers = [];
|
2012-12-13 15:58:57 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|