From 4ef2d19981edda91b626750b75281a969abb3c79 Mon Sep 17 00:00:00 2001 From: Samuel Rivas Date: Mon, 7 Sep 2015 11:37:18 +0200 Subject: [PATCH 1/3] jam: add yacc as build input I am not sure why do I need this locally, it seems to be passing in hydra anyway... --- pkgs/development/tools/build-managers/jam/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/jam/default.nix b/pkgs/development/tools/build-managers/jam/default.nix index 8f56577de32..9c7a7287cfd 100644 --- a/pkgs/development/tools/build-managers/jam/default.nix +++ b/pkgs/development/tools/build-managers/jam/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, yacc}: let bindir = if stdenv.system == "i686-linux" then "bin.linuxx86" @@ -13,6 +13,8 @@ stdenv.mkDerivation { sha256 = "04c6khd7gdkqkvx4h3nbz99lyz7waid4fd221hq5chcygyx1sj3i"; }; + buildInputs = [ yacc ]; + installPhase = '' mkdir -p $out/bin cp ${bindir}/jam $out/bin From 6ef885defba16ddb163de60407a69ee8db2082f3 Mon Sep 17 00:00:00 2001 From: Samuel Rivas Date: Mon, 7 Sep 2015 11:41:39 +0200 Subject: [PATCH 2/3] argyllcms 1.4.0 -> 1.8.1 --- pkgs/tools/graphics/argyllcms/default.nix | 87 +++++++++++++++-------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/pkgs/tools/graphics/argyllcms/default.nix b/pkgs/tools/graphics/argyllcms/default.nix index d9eed4df224..4eb2344e7b0 100644 --- a/pkgs/tools/graphics/argyllcms/default.nix +++ b/pkgs/tools/graphics/argyllcms/default.nix @@ -1,13 +1,17 @@ -{ stdenv, fetchurl, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama -, libXrender, libXext, libtiff, libjpeg, libXScrnSaver, writeText -, libXdmcp, libXau, lib }: - +{ stdenv, fetchzip, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama +, libXrender, libXext, libtiff, libjpeg, libpng, libXScrnSaver, writeText +, libXdmcp, libXau, lib, openssl, zlib }: +let + version = "1.8.1"; + in stdenv.mkDerivation rec { - name = "argyllcms-1.4.0"; + name = "argyllcms-${version}"; - src = fetchurl { - url = "http://www.argyllcms.com/Argyll_V1.4.0_src.zip"; - sha256 = "1a5i0972cjp6asmawmyzih2y4bv3i0qvf7p6z5lxnr199mq38cfk"; + 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 + url = "http://www.argyllcms.com/Argyll_V${version}_src.zip"; + sha256 = "1nnhqcvx65m5rzrlry5kkjgrnl90shjgz7dbin8nz27lzni6c3xz"; }; # The contents of this file comes from the Jamtop file from the @@ -17,21 +21,30 @@ stdenv.mkDerivation rec { jamTop = writeText "argyllcms_jamtop" '' DESTDIR = "/" ; REFSUBDIR = "ref" ; - + # Keep this DESTDIR anchored to Jamtop. PREFIX is used literally ANCHORED_PATH_VARS = DESTDIR ; - + # Tell standalone libraries that they are part of Argyll: DEFINES += ARGYLLCMS ; - - # Use libusb1 rather than libusb0 & libusb0-win32 - USE_LIBUSB1 = true ; - - # Make the USB V1 library static - LIBUSB_IS_DLL = false ; - - # Set the libubs1 library name. - LIBUSB1NAME = libusb-1A ; + + # 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 ; + + # Use ArgyllCMS version of libusb (deprecated - don't use) + USE_LIBUSB = false ; + + # For testing CCast + DEFINES += CCTEST_PATTERN ; JPEGLIB = ; JPEGINC = ; @@ -41,10 +54,22 @@ stdenv.mkDerivation rec { TIFFINC = ; HAVE_TIFF = true ; + PNGLIB = ; + PNGINC = ; + HAVE_PNG = true ; + + ZLIB = ; + ZINC = ; + HAVE_Z = true ; + + SSLLIB = ; + SSLINC = ; + HAVE_SSL = true ; + LINKFLAGS += ${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)} -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss - -ljpeg -ltiff ; + -ljpeg -ltiff -lpng -lssl ; ''; nativeBuildInputs = [ jam unzip ]; @@ -52,27 +77,31 @@ stdenv.mkDerivation rec { preConfigure = '' cp ${jamTop} Jamtop substituteInPlace Makefile --replace "-j 3" "-j $NIX_BUILD_CORES" - # Remove tiff and jpg to be sure the nixpkgs-provided ones are used - rm -rf tiff jpg + # Remove tiff, jpg and png to be sure the nixpkgs-provided ones are used + rm -rf tiff jpg png ''; - buildInputs = [ - libtiff libjpeg libX11 libXxf86vm libXrandr libXinerama libXext - libXrender libXScrnSaver libXdmcp libXau + buildInputs = [ + libtiff libjpeg libpng libX11 libXxf86vm libXrandr libXinerama libXext + libXrender libXScrnSaver libXdmcp libXau openssl ]; buildFlags = "PREFIX=$(out) all"; installFlags = "PREFIX=$(out)"; - # Install udev rules, but remove lines that set up the udev-acl and plugdev + # Install udev rules, but remove lines that set up the udev-acl # stuff, since that is handled by udev's own rules (70-udev-acl.rules) + # + # Move ref to a better place (there must be a way to make the install target + # do that for us) postInstall = '' rm -v $out/bin/License.txt mkdir -p $out/etc/udev/rules.d - sed -i '/udev-acl/d' libusb1/55-Argyll.rules - sed -i '/plugdev/d' libusb1/55-Argyll.rules - cp -v libusb1/55-Argyll.rules $out/etc/udev/rules.d/ + sed -i '/udev-acl/d' usb/55-Argyll.rules + cp -v usb/55-Argyll.rules $out/etc/udev/rules.d/ + mkdir -p $out/share/ + mv $out/ref $out/share/argyllcms ''; meta = with stdenv.lib; { From 7cc66a1c95ca36256e8cbd392a64e7a191306f85 Mon Sep 17 00:00:00 2001 From: Samuel Rivas Date: Sun, 13 Sep 2015 22:08:40 +0200 Subject: [PATCH 3/3] Update to 1.8.2 and make curl look like mozilla This commit is supposed to be squashed, keeping it just for traceability during the pull request. --- pkgs/tools/graphics/argyllcms/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/argyllcms/default.nix b/pkgs/tools/graphics/argyllcms/default.nix index 4eb2344e7b0..a8ffc634d0e 100644 --- a/pkgs/tools/graphics/argyllcms/default.nix +++ b/pkgs/tools/graphics/argyllcms/default.nix @@ -2,7 +2,7 @@ , libXrender, libXext, libtiff, libjpeg, libpng, libXScrnSaver, writeText , libXdmcp, libXau, lib, openssl, zlib }: let - version = "1.8.1"; + version = "1.8.2"; in stdenv.mkDerivation rec { name = "argyllcms-${version}"; @@ -11,7 +11,10 @@ stdenv.mkDerivation rec { # Kind of flacky URL, it was reaturning 406 and inconsistent binaries for a # while on me. It might be good to find a mirror url = "http://www.argyllcms.com/Argyll_V${version}_src.zip"; - sha256 = "1nnhqcvx65m5rzrlry5kkjgrnl90shjgz7dbin8nz27lzni6c3xz"; + sha256 = "0hnsciwak5chy4a421l8fz7amxzg8kbmy57a07dn460gdg6r63cy"; + + # The argyllcms web server doesn't like curl ... + curlOpts = "--user-agent 'Mozilla/5.0'"; }; # The contents of this file comes from the Jamtop file from the