diff --git a/.gitignore b/.gitignore index b2d5a9aa5bd7..165e92c7fc32 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ ,* .*.swp .*.swo -cpan-info -cpan_tmp/ result +doc/NEWS.html +doc/NEWS.txt +doc/manual.html +doc/manual.pdf diff --git a/doc/language-support.xml b/doc/language-support.xml index 6cc028c0b0a2..cb40be4bf57f 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -21,7 +21,7 @@ standard Makefile.PL. It’s implemented in pkgs/development/perl-modules/generic. Perl packages from CPAN are defined in pkgs/perl-packages.nix, +xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix">pkgs/top-level/perl-packages.nix, rather than pkgs/all-packages.nix. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package @@ -151,6 +151,43 @@ ClassC3Componentised = buildPerlPackage rec { +
Generation from CPAN + +Nix expressions for Perl packages can be generated (almost) +automatically from CPAN. This is done by the program +nix-generate-from-cpan, which can be installed +as follows: + + +$ nix-env -i nix-generate-from-cpan + + +This program takes a Perl module name, looks it up on CPAN, +fetches and unpacks the corresponding package, and prints a Nix +expression on standard output. For example: + + +$ nix-generate-from-cpan XML::Simple + XMLSimple = buildPerlPackage { + name = "XML-Simple-2.20"; + src = fetchurl { + url = mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-2.20.tar.gz; + sha256 = "5cff13d0802792da1eb45895ce1be461903d98ec97c9c953bc8406af7294434a"; + }; + propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ]; + meta = { + description = "Easily read/write XML (esp config files)"; + license = "perl"; + }; + }; + + +The output can be pasted into +pkgs/top-level/perl-packages.nix or wherever else +you need it. + +
+ diff --git a/doc/release-notes.xml b/doc/release-notes.xml index 0551b36cdbff..2a1fb9f31091 100644 --- a/doc/release-notes.xml +++ b/doc/release-notes.xml @@ -237,12 +237,12 @@ fetchurl { fetchurl will first try to download this file from . + xlink:href="http://tarballs.nixos.org/sha1/eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082"/>. If that file doesn’t exist, it will try the original URL. In general, the “content-addressed” location is mirror/hash-type/hash. There is currently only one content-addressable mirror (), but more can be + xlink:href="http://tarballs.nixos.org"/>), but more can be specified in the hashedMirrors attribute in pkgs/build-support/fetchurl/mirrors.nix, or by setting the NIX_HASHED_MIRRORS environment variable diff --git a/maintainers/scripts/generate-cpan-package b/maintainers/scripts/generate-cpan-package deleted file mode 100755 index 2817e23e2fa9..000000000000 --- a/maintainers/scripts/generate-cpan-package +++ /dev/null @@ -1,120 +0,0 @@ -#! /bin/sh -e - -name="$1" -[ -n "$name" ] || { echo "no name"; exit 1; } - -cpan -D "$name" > cpan-info - -url="$(echo $(cat cpan-info | sed '6!d'))" -[ -n "$url" ] || { echo "no URL"; exit 1; } -url="mirror://cpan/authors/id/$url" -echo "URL = $url" >&2 - -version=$(cat cpan-info | grep 'CPAN: ' | awk '{ print $2 }') -echo "VERSION = $version" - -declare -a xs=($(PRINT_PATH=1 nix-prefetch-url "$url")) -hash=${xs[0]} -path=${xs[1]} -echo "HASH = $hash" >&2 - -namedash="$(echo $name | sed s/::/-/g)-$version" - -attr=$(echo $name | sed s/:://g) - -rm -rf cpan_tmp -mkdir cpan_tmp -tar xf "$path" -C cpan_tmp - -shopt -s nullglob -meta=$(echo cpan_tmp/*/META.json) -if [ -z "$meta" ]; then - yaml=$(echo cpan_tmp/*/META.yml) - [ -n "$yaml" ] || { echo "no meta file"; exit 1; } - meta=$(echo $yaml | sed s/\.yml$/.json/) - perl -e ' - use YAML; - use JSON; - local $/; - $x = YAML::Load(<>); - print encode_json $x; - ' < $yaml > $meta -fi - -description="$(json abstract < $meta | perl -e '$x = <>; print uc(substr($x, 0, 1)), substr($x, 1);')" -homepage="$(json resources.homepage < $meta)" -if [ -z "$homepage" ]; then - #homepage="$(json meta-spec.url < $meta)" - true -fi - -license="$(json license < $meta | json -a 2> /dev/null || true)" -if [ -z "$license" ]; then - license="$(json -a license < $meta)" -fi -license="$(echo $license | sed s/perl_5/perl5/)" - -f() { - local type="$1" - perl -e ' - use JSON; - local $/; - $x = decode_json <>; - if (defined $x->{prereqs}) { - $x2 = $x->{prereqs}->{'$type'}->{requires}; - } elsif ("'$type'" eq "runtime") { - $x2 = $x->{requires}; - } elsif ("'$type'" eq "configure") { - $x2 = $x->{configure_requires}; - } elsif ("'$type'" eq "build") { - $x2 = $x->{build_requires}; - } - foreach my $y (keys %{$x2}) { - next if $y eq "perl"; - eval "use $y;"; - if (!$@) { - print STDERR "skipping Perl-builtin module $y\n"; - next; - } - print $y, "\n"; - }; - ' < $meta | sed s/:://g -} - -confdeps=$(f configure) -builddeps=$(f build) -testdeps=$(f test) -runtimedeps=$(f runtime) - -buildInputs=$(echo $(for i in $confdeps $builddeps $testdeps; do echo $i; done | sort | uniq)) -propagatedBuildInputs=$(echo $(for i in $runtimedeps; do echo $i; done | sort | uniq)) - -echo "===" >&2 - -cat <\n" unless defined $module_name; + +my $cb = CPANPLUS::Backend->new; + +my @modules = $cb->search(type => "name", allow => [$module_name]); +die "module $module_name not found\n" if scalar @modules == 0; +die "multiple packages that match module $module_name\n" if scalar @modules > 1; +my $module = $modules[0]; + +sub pkg_to_attr { + my ($pkg_name) = @_; + my $attr_name = $pkg_name; + $attr_name =~ s/-\d.*//; # strip version + return "LWP" if $attr_name eq "libwww-perl"; + $attr_name =~ s/-//g; + return $attr_name; +} + +sub get_pkg_name { + my ($module) = @_; + my $pkg_name = $module->package; + $pkg_name =~ s/\.tar.*//; + $pkg_name =~ s/\.zip//; + return $pkg_name; +} + +my $pkg_name = get_pkg_name $module; +my $attr_name = pkg_to_attr $pkg_name; + +print STDERR "attribute name: ", $attr_name, "\n"; +print STDERR "module: ", $module->module, "\n"; +print STDERR "version: ", $module->version, "\n"; +print STDERR "package: ", $module->package, , " (", $pkg_name, ", ", $attr_name, ")\n"; +print STDERR "path: ", $module->path, "\n"; + +my $tar_path = $module->fetch(); +print STDERR "downloaded to: $tar_path\n"; +print STDERR "sha-256: ", $module->status->checksum_value, "\n"; + +my $pkg_path = $module->extract(); +print STDERR "unpacked to: $pkg_path\n"; + +my $meta; +if (-e "$pkg_path/META.yml") { + eval { + $meta = YAML::XS::LoadFile("$pkg_path/META.yml"); + }; + if ($@) { + system("iconv -f windows-1252 -t utf-8 '$pkg_path/META.yml' > '$pkg_path/META.yml.tmp'"); + $meta = YAML::XS::LoadFile("$pkg_path/META.yml.tmp"); + } +} + +print STDERR "metadata: ", encode_json($meta), "\n"; + +# Map a module to the attribute corresponding to its package +# (e.g. HTML::HeadParser will be mapped to HTMLParser, because that +# module is in the HTML-Parser package). +sub module_to_pkg { + my ($module_name) = @_; + my @modules = $cb->search(type => "name", allow => [$module_name]); + if (scalar @modules == 0) { + # Fallback. + $module_name =~ s/:://g; + return $module_name; + } + my $module = $modules[0]; + my $attr_name = pkg_to_attr(get_pkg_name $module); + print STDERR "mapped dep $module_name to $attr_name\n"; + return $attr_name; +} + +sub get_deps { + my ($type) = @_; + my $deps; + if (defined $meta->{prereqs}) { + die "unimplemented"; + } elsif ($type eq "runtime") { + $deps = $meta->{requires}; + } elsif ($type eq "configure") { + $deps = $meta->{configure_requires}; + } elsif ($type eq "build") { + $deps = $meta->{build_requires}; + } + my @res; + foreach my $n (keys %{$deps}) { + next if $n eq "perl"; + # Hacky way to figure out if this module is part of Perl. + if ($n !~ /^JSON/ && $n !~ /^YAML/) { + eval "use $n;"; + if (!$@) { + print STDERR "skipping Perl-builtin module $n\n"; + next; + } + } + push @res, module_to_pkg($n); + } + return @res; +} + +sub uniq { + return keys %{{ map { $_ => 1 } @_ }}; +} + +my @build_deps = sort(uniq(get_deps("configure"), get_deps("build"), get_deps("test"))); +print STDERR "build deps: @build_deps\n"; + +my @runtime_deps = sort(uniq(get_deps("runtime"))); +print STDERR "runtime deps: @runtime_deps\n"; + +my $homepage = $meta->{resources}->{homepage}; +print STDERR "homepage: $homepage\n" if defined $homepage; + +my $description = $meta->{abstract}; +$description = uc(substr($description, 0, 1)) . substr($description, 1); # capitalise first letter +$description =~ s/\.$//; # remove period at the end +$description =~ s/\s*$//; +$description =~ s/^\s*//; +print STDERR "description: $description\n"; + +my $license = $meta->{license}; +if (defined $license) { + $license = "perl5" if $license eq "perl_5"; + print STDERR "license: $license\n"; +} + +my $build_fun = -e "$pkg_path/Build.PL" && ! -e "$pkg_path/Makefile.PL" ? "buildPerlModule" : "buildPerlPackage"; + +print STDERR "===\n"; + +print <path}/${\$module->package}; + sha256 = "${\$module->status->checksum_value}"; + }; +EOF +print < 0; + buildInputs = [ @build_deps ]; +EOF +print < 0; + propagatedBuildInputs = [ @runtime_deps ]; +EOF +print < $out/share/tessdata/${lang}.traineddata"; + "tar xfvz ${src} -C $out/share/ --strip=1"; extraLanguages = '' - ${f "cat" "1qndk8qygw9bq7nzn7kzgxkm3jhlq7jgvdqpj5id4rrcaavjvifw"} - ${f "rus" "0yjzks189bgcmi2vr4v0l0fla11qdrw3cb1nvpxl9mdis8qr9vcc"} - ${f "spa" "1q1hw3qi95q5ww3l02fbhjqacxm34cp65fkbx10wjdcg0s5p9q2x"} - ${f "nld" "0cbqfhl2rwb1mg4y1140nw2vhhcilc0nk7bfbnxw6bzj1y5n49i8"} + ${f "cat" "0d1smiv1b3k9ay2s05sl7q08mb3ln4w5iiiymv2cs8g8333z8jl9"} + ${f "rus" "059336mkhsj9m3hwfb818xjlxkcdpy7wfgr62qwz65cx914xl709"} + ${f "spa" "1c9iza5mbahd9pa7znnq8yv09v5kz3gbd2sarcgcgc1ps1jc437l"} + ${f "nld" "162acxp1yb6gyki2is3ay2msalmfcsnrlsd9wml2ja05k94m6bjy"} + ${f "eng" "1y5xf794n832s3lymzlsdm2s9nlrd2v27jjjp0fd9xp7c2ah4461"} + ${f "slv" "0rqng43435cly32idxm1lvxkcippvc3xpxbfizwq5j0155ym00dr"} ''; in -stdenv.mkDerivation { - name = "tesseract-3.0.1"; +stdenv.mkDerivation rec { + name = "tesseract-${version}"; src = fetchurl { - url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz; - sha256 = "c24b0bd278291bc93ab242f93841c1d8743689c943bd804afbc5b898dc0a1c9b"; + url = "http://tesseract-ocr.googlecode.com/files/tesseract-ocr-${version}.tar.gz"; + sha256 = "0g81m9y4iydp7kgr56mlkvjdwpp3mb01q385yhdnyvra7z5kkk96"; }; buildInputs = [ autoconf automake libtool leptonica libpng libtiff ]; diff --git a/pkgs/applications/misc/blender/fix-include.patch b/pkgs/applications/misc/blender/fix-include.patch new file mode 100644 index 000000000000..44e2147d073c --- /dev/null +++ b/pkgs/applications/misc/blender/fix-include.patch @@ -0,0 +1,12 @@ +diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h +index fce901b..1f73c5e 100644 +--- a/intern/smoke/intern/WAVELET_NOISE.h ++++ b/intern/smoke/intern/WAVELET_NOISE.h +@@ -43,6 +43,7 @@ + #ifndef WAVELET_NOISE_H + #define WAVELET_NOISE_H + ++#include + #include + + #ifdef WIN32 diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 562a9dd52ad4..23b5092cd4d8 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -1,17 +1,15 @@ { stdenv, fetchurl, python, pyqt4, sip, popplerQt4, pkgconfig, libpng , imagemagick, libjpeg, fontconfig, podofo, qt4, icu, sqlite -, pil, makeWrapper, unrar, chmlib, pythonPackages, xz +, pil, makeWrapper, unrar, chmlib, pythonPackages, xz, udisks, libusb1, libmtp }: stdenv.mkDerivation rec { - name = "calibre-0.8.51"; + name = "calibre-0.8.70"; + # 0.9.* versions won't build: https://bugs.launchpad.net/calibre/+bug/1094719 src = fetchurl { - urls = [ - "http://calibre-ebook.googlecode.com/files/${name}.tar.xz" - "mirror://sourceforge/calibre/${name}.tar.xz" - ]; - sha256 = "1grcc0k9qpfpwp863x52rl9wj4wz61hcz67l8h2jmli0wxiq44z1"; + url = "mirror://sourceforge/calibre/${name}.tar.xz"; + sha256 = "12avwp8r6cnrw6c32gmd2hksa9rszdb76zs6fcmr3n8r1wkwa71g"; }; inherit python; @@ -23,7 +21,7 @@ stdenv.mkDerivation rec { fontconfig podofo qt4 pil chmlib icu pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil pythonPackages.cssutils pythonPackages.beautifulsoup - pythonPackages.sqlite3 sqlite + pythonPackages.sqlite3 sqlite udisks libusb1 libmtp ]; installPhase = '' diff --git a/pkgs/applications/misc/cgminer/default.nix b/pkgs/applications/misc/cgminer/default.nix new file mode 100644 index 000000000000..4ae404a002f1 --- /dev/null +++ b/pkgs/applications/misc/cgminer/default.nix @@ -0,0 +1,44 @@ +{ fetchgit, stdenv, pkgconfig, libtool, autoconf, automake, + curl, ncurses, amdappsdk, amdadlsdk, xorg }: + +stdenv.mkDerivation rec { + version = "2.11.4"; + name = "cgminer-${version}"; + + src = fetchgit { + url = "https://github.com/ckolivas/cgminer.git"; + rev = "96c8ff5f10f2d8f0cf4d1bd889e8eeac2e4aa715"; + sha256 = "1vf9agy4vw50cap03qig2y65hdrsdy7cknkzyagv89w5xb230r9a"; + }; + + buildInputs = [ autoconf automake pkgconfig libtool curl ncurses amdappsdk amdadlsdk xorg.libX11 xorg.libXext xorg.libXinerama ]; + configureScript = "./autogen.sh"; + configureFlags = "--enable-scrypt"; + NIX_LDFLAGS = "-lgcc_s -lX11 -lXext -lXinerama"; + + preConfigure = '' + ln -s ${amdadlsdk}/include/* ADL_SDK/ + ''; + + postBuild = '' + gcc api-example.c -I compat/jansson -o cgminer-api + ''; + + postInstall = '' + cp cgminer-api $out/bin/ + chmod 444 $out/bin/*.cl + ''; + + meta = with stdenv.lib; { + description = "CPU/GPU miner in c for bitcoin"; + longDescription= '' + This is a multi-threaded multi-pool GPU, FPGA and ASIC miner with ATI GPU + monitoring, (over)clocking and fanspeed support for bitcoin and derivative + coins. Do not use on multiple block chains at the same time! + ''; + homepage = "https://github.com/ckolivas/cgminer"; + license = licenses.gpl3; + maintainers = [ maintainers.offline ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index e22dce72b628..4a51ec2d1acd 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -1,16 +1,14 @@ -{ stdenv, fetchurl, libjpeg, libtiff, libpng, ghostscript, libungif, zlib }: +{ stdenv, fetchurl, libjpeg, libtiff, librsvg }: stdenv.mkDerivation rec { - name = "djvulibre-3.5.24"; + name = "djvulibre-3.5.25.3"; src = fetchurl { url = "mirror://sourceforge/djvu/${name}.tar.gz"; - sha256 = "0d1592cmc7scg2jzah47mnvbqldhxb1x9vxm7y64a3iasa0lqwy0"; + sha256 = "1q5i5ha4zmj2ahjfhi8cv1rah80vm43m9ads46ji38rgvpb7x3c9"; }; - buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ]; - - patches = [ ./gcc-4.6.patch ]; + buildInputs = [ libjpeg libtiff librsvg ]; meta = { description = "A library and viewer for the DJVU file format for scanned images"; diff --git a/pkgs/applications/misc/djvulibre/gcc-4.6.patch b/pkgs/applications/misc/djvulibre/gcc-4.6.patch deleted file mode 100644 index 48fbc2bc7aca..000000000000 --- a/pkgs/applications/misc/djvulibre/gcc-4.6.patch +++ /dev/null @@ -1,658 +0,0 @@ -commit 3341545edba359b292a8ef6db1b7d342caf3dcf1 -Author: Leon Bottou -Date: Wed May 4 21:25:35 2011 -0700 - - Added include for gcc-4.6 - -diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp -index b762ccf..d662ab0 100644 ---- a/libdjvu/BSByteStream.cpp -+++ b/libdjvu/BSByteStream.cpp -@@ -62,6 +62,7 @@ - - // - Author: Leon Bottou, 07/1998 - -+#include - #include - #include - #include -diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp -index 5d80e51..68bc3e3 100644 ---- a/libdjvu/BSEncodeByteStream.cpp -+++ b/libdjvu/BSEncodeByteStream.cpp -@@ -71,6 +71,7 @@ - #include "GOS.h" - #endif - -+#include - #include - #include - #include -diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp -index 158c33c..be01847 100644 ---- a/libdjvu/ByteStream.cpp -+++ b/libdjvu/ByteStream.cpp -@@ -73,6 +73,7 @@ - #include "GOS.h" - #include "GURL.h" - #include "DjVuMessage.h" -+#include - #include - #if defined(WIN32) || defined(__CYGWIN32__) - # include -diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp -index 6b1e85d..7d7a192 100644 ---- a/libdjvu/DjVuFileCache.cpp -+++ b/libdjvu/DjVuFileCache.cpp -@@ -63,6 +63,7 @@ - #include "DjVuFileCache.h" - #include "debug.h" - -+#include - #include - - -diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp -index e6d3cec..df9278e 100644 ---- a/libdjvu/DjVuGlobal.cpp -+++ b/libdjvu/DjVuGlobal.cpp -@@ -76,6 +76,8 @@ - #include "GThreads.h" - #include "GException.h" - #include "GContainer.h" -+ -+#include - #include - #include - #include -diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp -index 3c6012c..c8ba309 100644 ---- a/libdjvu/DjVuGlobalMemory.cpp -+++ b/libdjvu/DjVuGlobalMemory.cpp -@@ -67,6 +67,8 @@ - - #include "DjVuGlobal.h" - #include "GException.h" -+ -+#include - #include - #include - #include "debug.h" -diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp -index 6f5a735..1726025 100644 ---- a/libdjvu/DjVuMessage.cpp -+++ b/libdjvu/DjVuMessage.cpp -@@ -71,6 +71,7 @@ - #include "debug.h" - #include - #include -+#include - #include - #ifdef WIN32 - # include -diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp -index b8c1010..5daa9d9 100644 ---- a/libdjvu/DjVuMessageLite.cpp -+++ b/libdjvu/DjVuMessageLite.cpp -@@ -73,8 +73,8 @@ - #include "debug.h" - #include - #include -+#include - #include --// #include - #ifdef WIN32 - #include - #include -diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp -index c489f7b..76b0bf4 100644 ---- a/libdjvu/DjVuPalette.cpp -+++ b/libdjvu/DjVuPalette.cpp -@@ -64,6 +64,8 @@ - #include "ByteStream.h" - #include "BSByteStream.h" - #include "DjVuPalette.h" -+ -+#include - #include - #include - -diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h -index f6a92f6..e2b3125 100644 ---- a/libdjvu/DjVuPort.h -+++ b/libdjvu/DjVuPort.h -@@ -65,6 +65,7 @@ - - #include "GThreads.h" - #include "GURL.h" -+#include "stddef.h" - - #ifdef HAVE_NAMESPACES - namespace DJVU { -diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp -index 5517bf3..6914ff9 100644 ---- a/libdjvu/DjVuToPS.cpp -+++ b/libdjvu/DjVuToPS.cpp -@@ -72,6 +72,7 @@ - #include "GPixmap.h" - #include "debug.h" - #include -+#include - #include - #include - #include -diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp -index ab5c0de..797edcc 100644 ---- a/libdjvu/GBitmap.cpp -+++ b/libdjvu/GBitmap.cpp -@@ -66,6 +66,8 @@ - #include "GString.h" - #include "GThreads.h" - #include "GException.h" -+#include -+#include - #include - - // - Author: Leon Bottou, 05/1997 -diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp -index 2ea179a..89da70f 100644 ---- a/libdjvu/GException.cpp -+++ b/libdjvu/GException.cpp -@@ -60,6 +60,7 @@ - # pragma implementation - #endif - -+#include - #include - #include - #include -diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp -index e784932..d2088e2 100644 ---- a/libdjvu/GOS.cpp -+++ b/libdjvu/GOS.cpp -@@ -65,6 +65,7 @@ - #include "GOS.h" - #include "GURL.h" - -+#include - #include - #include - #include -diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp -index 392df54..4bf6f57 100644 ---- a/libdjvu/GPixmap.cpp -+++ b/libdjvu/GPixmap.cpp -@@ -75,6 +75,8 @@ - #include "GThreads.h" - #include "Arrays.h" - #include "JPEGDecoder.h" -+ -+#include - #include - #include - #include -diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp -index 6e523e7..58aef5b 100644 ---- a/libdjvu/GSmartPointer.cpp -+++ b/libdjvu/GSmartPointer.cpp -@@ -67,6 +67,7 @@ - // Our original implementation consisted of multiple classes. - // . - -+#include - #include - #if PARANOID_DEBUG - # include -diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h -index 82781bd..8a8bb8a 100644 ---- a/libdjvu/GSmartPointer.h -+++ b/libdjvu/GSmartPointer.h -@@ -97,6 +97,8 @@ - #include "DjVuGlobal.h" - #include "atomic.h" - -+#include -+ - #ifdef HAVE_NAMESPACES - namespace DJVU { - # ifdef NOT_DEFINED // Just to fool emacs c++ mode -diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp -index 03f6226..350b11b 100644 ---- a/libdjvu/GString.cpp -+++ b/libdjvu/GString.cpp -@@ -73,6 +73,7 @@ - #include "GThreads.h" - #include "debug.h" - -+#include - #include - #include - #include -diff --git a/libdjvu/GString.h b/libdjvu/GString.h -index b63b753..3aa1f76 100644 ---- a/libdjvu/GString.h -+++ b/libdjvu/GString.h -@@ -108,6 +108,7 @@ - #include "DjVuGlobal.h" - #include "GContainer.h" - -+#include - #include - #include - #ifdef WIN32 -diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp -index d81f3c3..253fed8 100644 ---- a/libdjvu/GThreads.cpp -+++ b/libdjvu/GThreads.cpp -@@ -71,6 +71,8 @@ - #include "GThreads.h" - #include "GException.h" - #include "DjVuMessageLite.h" -+ -+#include - #include - #include - -diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp -index c37bf52..a80078c 100644 ---- a/libdjvu/GURL.cpp -+++ b/libdjvu/GURL.cpp -@@ -72,6 +72,7 @@ - #include "GURL.h" - #include "debug.h" - -+#include - #include - #include - #include -diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp -index 415c081..a8b25b8 100644 ---- a/libdjvu/GUnicode.cpp -+++ b/libdjvu/GUnicode.cpp -@@ -62,6 +62,8 @@ - - #include "GString.h" - -+#include -+ - #if HAS_ICONV - #include - #endif -diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h -index a653f8c..e31b216 100644 ---- a/libdjvu/IFFByteStream.h -+++ b/libdjvu/IFFByteStream.h -@@ -124,6 +124,7 @@ - - - #include "DjVuGlobal.h" -+#include - #include - #include - #include -diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp -index 8d7b12c..49081b7 100644 ---- a/libdjvu/IW44EncodeCodec.cpp -+++ b/libdjvu/IW44EncodeCodec.cpp -@@ -76,6 +76,7 @@ - #include "IFFByteStream.h" - #include "GRect.h" - -+#include - #include - #include - #include -diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp -index 9476726..4a19fb5 100644 ---- a/libdjvu/IW44Image.cpp -+++ b/libdjvu/IW44Image.cpp -@@ -76,6 +76,7 @@ - #include "IFFByteStream.h" - #include "GRect.h" - -+#include - #include - #include - #include -diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h -index bd430a0..fad1d4c 100644 ---- a/libdjvu/JPEGDecoder.h -+++ b/libdjvu/JPEGDecoder.h -@@ -64,6 +64,7 @@ - - #ifdef NEED_JPEG_DECODER - -+#include - #include - #include - -diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp -index 5ab60bb..528dab6 100644 ---- a/libdjvu/MMX.cpp -+++ b/libdjvu/MMX.cpp -@@ -62,6 +62,7 @@ - - #include "MMX.h" - #include -+#include - #include - - -diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h -index 0ae112b..9b49a17 100644 ---- a/libdjvu/UnicodeByteStream.h -+++ b/libdjvu/UnicodeByteStream.h -@@ -88,6 +88,7 @@ - #include "GString.h" - #include "ByteStream.h" - -+#include - - #ifdef HAVE_NAMESPACES - namespace DJVU { -diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp -index 84386c5..7da923a 100644 ---- a/libdjvu/XMLParser.cpp -+++ b/libdjvu/XMLParser.cpp -@@ -75,6 +75,7 @@ - #include "debug.h" - #include - #include -+#include - #include - - -diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp -index f6e971d..ff5b9bf 100644 ---- a/libdjvu/ZPCodec.cpp -+++ b/libdjvu/ZPCodec.cpp -@@ -66,6 +66,8 @@ - #include "ZPCodec.h" - #include "ByteStream.h" - #include "GException.h" -+ -+#include - #include - #include - #include -diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp -index bdc193e..63fd483 100644 ---- a/libdjvu/atomic.cpp -+++ b/libdjvu/atomic.cpp -@@ -28,6 +28,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include "atomic.h" -diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp -index b18b84b..f40f5aa 100644 ---- a/libdjvu/ddjvuapi.cpp -+++ b/libdjvu/ddjvuapi.cpp -@@ -60,6 +60,7 @@ - # pragma implementation "ddjvuapi.h" - #endif - -+#include - #include - #include - #include -diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h -index d0ed48f..841f223 100644 ---- a/libdjvu/ddjvuapi.h -+++ b/libdjvu/ddjvuapi.h -@@ -64,6 +64,7 @@ extern "C" { - } - #endif - -+#include - #include - #include - -diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp -index e0fb087..fc51297 100644 ---- a/libdjvu/miniexp.cpp -+++ b/libdjvu/miniexp.cpp -@@ -23,6 +23,7 @@ - # pragma implementation "miniexp.h" - #endif - -+#include - #include - #include - #include -diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h -index 91e345d..993005b 100644 ---- a/libdjvu/miniexp.h -+++ b/libdjvu/miniexp.h -@@ -38,7 +38,8 @@ extern "C" { - #ifndef MINILISPAPI - # define MINILISPAPI /**/ - #endif -- -+ -+#include - - /* -------------------------------------------------- */ - /* LISP EXPRESSIONS */ -diff --git a/tools/bzz.cpp b/tools/bzz.cpp -index ca092e1..2ebc7b9 100644 ---- a/tools/bzz.cpp -+++ b/tools/bzz.cpp -@@ -94,6 +94,7 @@ - #include "GURL.h" - #include "DjVuMessage.h" - #include -+#include - #include - - static const char *program = "(unknown)"; -diff --git a/tools/c44.cpp b/tools/c44.cpp -index 6f23b53..855504b 100644 ---- a/tools/c44.cpp -+++ b/tools/c44.cpp -@@ -226,6 +226,7 @@ - #include - #include - #include -+#include - #include - - // command line data -diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp -index 8cf89b9..11eb662 100644 ---- a/tools/cjb2.cpp -+++ b/tools/cjb2.cpp -@@ -120,6 +120,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - #if HAVE_TIFF - #include -diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp -index 111cbd3..b640a7a 100644 ---- a/tools/cpaldjvu.cpp -+++ b/tools/cpaldjvu.cpp -@@ -118,6 +118,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - #include - -diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp -index cd721f8..d5203d5 100644 ---- a/tools/csepdjvu.cpp -+++ b/tools/csepdjvu.cpp -@@ -162,6 +162,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - - #undef MIN -diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp -index 817e045..981a270 100644 ---- a/tools/ddjvu.cpp -+++ b/tools/ddjvu.cpp -@@ -62,6 +62,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include -diff --git a/tools/djvm.cpp b/tools/djvm.cpp -index 951bd66..6ea88c2 100644 ---- a/tools/djvm.cpp -+++ b/tools/djvm.cpp -@@ -135,9 +135,9 @@ - #include "DjVuMessage.h" - - #include -+#include - #include - #include --#include - - static const char * progname; - -diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp -index 9ca1c54..20b468a 100644 ---- a/tools/djvmcvt.cpp -+++ b/tools/djvmcvt.cpp -@@ -144,6 +144,7 @@ - - #include - #include -+#include - #include - - static const char * progname; -diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp -index 6a0215a..2dddbdf 100644 ---- a/tools/djvudump.cpp -+++ b/tools/djvudump.cpp -@@ -119,6 +119,7 @@ xxx - #include - #include - #include -+#include - #include - - void -diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp -index 4a9f381..907b99c 100644 ---- a/tools/djvuextract.cpp -+++ b/tools/djvuextract.cpp -@@ -105,6 +105,7 @@ - #include "GOS.h" - #include "DjVuMessage.h" - #include -+#include - #include - - -diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp -index 7020484..4c5fc0f 100644 ---- a/tools/djvumake.cpp -+++ b/tools/djvumake.cpp -@@ -153,6 +153,7 @@ - - #include - #include -+#include - #include - #include - -diff --git a/tools/djvups.cpp b/tools/djvups.cpp -index 51aa999..632b832 100644 ---- a/tools/djvups.cpp -+++ b/tools/djvups.cpp -@@ -57,6 +57,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include -diff --git a/tools/djvused.cpp b/tools/djvused.cpp -index de84dcd..687fdca 100644 ---- a/tools/djvused.cpp -+++ b/tools/djvused.cpp -@@ -61,6 +61,7 @@ - #endif - - #include -+#include - #include - #include - #include -diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp -index 19a17da..818fe78 100644 ---- a/tools/djvuserve.cpp -+++ b/tools/djvuserve.cpp -@@ -73,6 +73,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp -index ba2c745..9e9124c 100644 ---- a/tools/djvutxt.cpp -+++ b/tools/djvutxt.cpp -@@ -61,6 +61,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include -diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h -index 082f5fb..656dc43 100644 ---- a/tools/tiff2pdf.h -+++ b/tools/tiff2pdf.h -@@ -22,6 +22,7 @@ - # endif - # if HAVE_TIFF - # include -+# include - # include - # include - # include -diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp -index 17c769b..b40535e 100644 ---- a/xmltools/djvutoxml.cpp -+++ b/xmltools/djvutoxml.cpp -@@ -71,6 +71,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp -index bdc5768..6679a9d 100644 ---- a/xmltools/djvuxmlparser.cpp -+++ b/xmltools/djvuxmlparser.cpp -@@ -70,6 +70,7 @@ - #include - #include - #include -+#include - #include - - static void diff --git a/pkgs/applications/misc/evince/default.nix b/pkgs/applications/misc/evince/default.nix deleted file mode 100644 index 793c7bda2994..000000000000 --- a/pkgs/applications/misc/evince/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ fetchurl, stdenv, perl, perlXMLParser, gettext, intltool -, pkgconfig, glib, gtk, gnomedocutils, gnomeicontheme -, libgnome, libgnomeui, scrollkeeper, libxslt -, libglade, libgnome_keyring, dbus, dbus_glib -, poppler, libspectre, djvulibre, shared_mime_info -, makeWrapper, which, ghostscript -, recentListSize ? null # 5 is not enough, allow passing a different number -}: - -stdenv.mkDerivation rec { - name = "evince-2.32.0"; - - src = fetchurl { - url = "http://ftp.gnome.org/pub/GNOME/sources/evince/2.32/${name}.tar.bz2"; - sha256 = "2a4c91ae38f8b5028cebb91b9da9ddc50ea8ae3f3d429df89ba351da2d787ff7"; - }; - - buildInputs = [ - perl perlXMLParser gettext intltool pkgconfig glib gtk - gnomedocutils gnomeicontheme libgnome libgnomeui libglade - scrollkeeper libgnome_keyring - libxslt # for `xsltproc' - dbus dbus_glib poppler libspectre djvulibre makeWrapper which - ghostscript - ]; - - configureFlags = "--with-libgnome --enable-dbus --enable-pixbuf " - - # Do not use nautilus - + " --disable-nautilus " - # Do not update Scrollkeeper's database (GNOME's help system). - + "--disable-scrollkeeper"; - - postUnpack = if recentListSize != null then '' - sed -i 's/\(gtk_recent_chooser_set_limit .*\)5)/\1${builtins.toString recentListSize})/' */shell/ev-open-recent-action.c - sed -i 's/\(if (++n_items == \)5\(.*\)/\1${builtins.toString recentListSize}\2/' */shell/ev-window.c - '' else ""; - - postInstall = '' - # Tell Glib/GIO about the MIME info directory, which is used - # by `g_file_info_get_content_type ()'. - wrapProgram "$out/bin/evince" \ - --prefix XDG_DATA_DIRS : "${shared_mime_info}/share:$out/share" - ''; - - meta = { - homepage = http://www.gnome.org/projects/evince/; - description = "Evince, GNOME's document viewer"; - - longDescription = '' - Evince is a document viewer for multiple document formats. It - currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal - of Evince is to replace the multiple document viewers that exist - on the GNOME Desktop with a single simple application. - ''; - - license = "GPLv2+"; - }; -} diff --git a/pkgs/applications/misc/keepass/default.nix b/pkgs/applications/misc/keepass/default.nix new file mode 100644 index 000000000000..0098e626b424 --- /dev/null +++ b/pkgs/applications/misc/keepass/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, unzip, makeDesktopItem, mono }: + +stdenv.mkDerivation rec { + name = "keepass-${version}"; + version = "2.22"; + + src = fetchurl { + url = "mirror://sourceforge/keepass/KeePass-${version}.zip"; + sha256 = "0mman7r1jmirfwzix5qww0yn4rrgzcg7546basxjvvfc8flp43j0"; + }; + + sourceRoot = "."; + + phases = [ "unpackPhase" "installPhase" ]; + + desktopItem = makeDesktopItem { + name = "keepass"; + exec = "keepass"; + comment = "Password manager"; + desktopName = "Keepass"; + genericName = "Password manager"; + categories = "Application;Other;"; + }; + + + installPhase = '' + ensureDir "$out/bin" + echo "${mono}/bin/mono $out/KeePass.exe" > $out/bin/keepass + chmod +x $out/bin/keepass + echo $out + cp -r ./* $out/ + ensureDir "$out/share/applications" + cp ${desktopItem}/share/applications/* $out/share/applications + ''; + + buildInputs = [ unzip ]; + + meta = { + description = "GUI password manager with strong cryptography"; + homepage = http://www.keepass.info/; + maintainers = with stdenv.lib.maintainers; [amorsillo]; + platforms = with stdenv.lib.platforms; all; + license = stdenv.lib.licenses.gpl2; + }; +} diff --git a/pkgs/applications/misc/sdcv/default.nix b/pkgs/applications/misc/sdcv/default.nix new file mode 100644 index 000000000000..8ac4730de9a7 --- /dev/null +++ b/pkgs/applications/misc/sdcv/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, pkgconfig, glib, gettext }: + +stdenv.mkDerivation rec { + name= "sdcv-0.4.2"; + + meta = { + homepage = http://sdcv.sourceforge.net/; + description = "Console version of StarDict program"; + maintainers = with stdenv.lib.maintainers; [ lovek323 ]; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; + }; + + src = fetchurl { + url = "mirror://sourceforge/sdcv/${name}.tar.bz2"; + sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51"; + }; + + patches = ( if stdenv.isDarwin + then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ] + else [ ./sdcv.cpp.patch ] ); + + buildInputs = [ pkgconfig glib gettext ]; + + preBuild = '' + sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp + ''; + + NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; +} + diff --git a/pkgs/applications/misc/sdcv/sdcv.cpp.patch b/pkgs/applications/misc/sdcv/sdcv.cpp.patch new file mode 100644 index 000000000000..6f835f16e458 --- /dev/null +++ b/pkgs/applications/misc/sdcv/sdcv.cpp.patch @@ -0,0 +1,12 @@ +--- a/src/utils.hpp ++++ b/src/utils.hpp +@@ -2,6 +2,9 @@ + #define _UTILS_HPP_ + + #include ++#include ++#include ++ + using std::string; + + extern bool stdio_getline(FILE *in, string &str); diff --git a/pkgs/applications/misc/sdcv/sdcv.cpp.patch-darwin b/pkgs/applications/misc/sdcv/sdcv.cpp.patch-darwin new file mode 100644 index 000000000000..2ee9a24e0347 --- /dev/null +++ b/pkgs/applications/misc/sdcv/sdcv.cpp.patch-darwin @@ -0,0 +1,19 @@ +--- a/src/sdcv.cpp ++++ b/src/sdcv.cpp +@@ -27,13 +27,13 @@ + #include + #include + #include ++#include ++#include ++#include + #include + #include + #include + #include +-#include +-#include +-#include + + #include "libwrapper.hpp" + #include "readline.hpp" diff --git a/pkgs/applications/misc/sdcv/utils.hpp.patch b/pkgs/applications/misc/sdcv/utils.hpp.patch new file mode 100644 index 000000000000..c08641abd6b9 --- /dev/null +++ b/pkgs/applications/misc/sdcv/utils.hpp.patch @@ -0,0 +1,10 @@ +--- a/src/utils.hpp ++++ b/src/utils.hpp +@@ -2,6 +2,7 @@ + #define _UTILS_HPP_ + + #include ++#include + using std::string; + + extern bool stdio_getline(FILE *in, string &str); diff --git a/pkgs/applications/misc/synergy/cryptopp.patch b/pkgs/applications/misc/synergy/cryptopp.patch new file mode 100644 index 000000000000..f20ef9544a22 --- /dev/null +++ b/pkgs/applications/misc/synergy/cryptopp.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b61fc0..2206646 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,6 +133,9 @@ if (UNIX) + check_type_size(long SIZEOF_LONG) + check_type_size(short SIZEOF_SHORT) + ++ # let's just assume cryptopp exists (provided by the Nix expression) ++ list(APPEND libs cryptopp) ++ + # pthread is used on both Linux and Mac + check_library_exists("pthread" pthread_create "" HAVE_PTHREAD) + if (HAVE_PTHREAD) +@@ -303,7 +306,6 @@ if (VNC_SUPPORT) + endif() + + add_subdirectory(src) +-add_subdirectory(tools) + + if (WIN32) + # add /analyze in order to unconver potential bugs in the source code +diff --git a/src/lib/synergy/CCryptoMode.h b/src/lib/synergy/CCryptoMode.h +index 9b7e8ad..0d659ac 100644 +--- a/src/lib/synergy/CCryptoMode.h ++++ b/src/lib/synergy/CCryptoMode.h +@@ -17,9 +17,9 @@ + + #pragma once + +-#include +-#include +-#include ++#include ++#include ++#include + #include "ECryptoMode.h" + #include "CString.h" + +diff --git a/src/lib/synergy/CCryptoStream.h b/src/lib/synergy/CCryptoStream.h +index 104b1f6..09c4dc4 100644 +--- a/src/lib/synergy/CCryptoStream.h ++++ b/src/lib/synergy/CCryptoStream.h +@@ -20,8 +20,8 @@ + #include "BasicTypes.h" + #include "CStreamFilter.h" + #include "CCryptoMode.h" +-#include +-#include ++#include ++#include + + class CCryptoOptions; + diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index 4bb3ef9e64a4..0b3734ea147a 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -1,19 +1,34 @@ -{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst }: +{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, libXrandr, xinput +, cryptopp ? null, unzip ? null }: + +assert stdenv.isLinux -> cryptopp != null; +assert !stdenv.isLinux -> unzip != null; + +with stdenv.lib; stdenv.mkDerivation rec { - name = "synergy-1.4.10"; + name = "synergy-1.4.12"; src = fetchurl { url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz"; - sha256 = "1ghgf96gbk4sdw8sqlc3pjschkmmqybihi12mg6hi26gnk7a5m86"; + sha256 = "0j884skwqy8r8ckj9a4rlwsbjwb1yrj9wqma1nwhr2inff6hrdim"; }; - buildInputs = [ cmake x11 libX11 libXi libXtst ]; - + patches = optional stdenv.isLinux ./cryptopp.patch; + + postPatch = if stdenv.isLinux then '' + sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \ + set(HAVE_X11_EXTENSIONS_XRANDR_H true)' CMakeLists.txt + '' else '' + ${unzip}/bin/unzip -d tools/cryptopp562 tools/cryptopp562.zip + ''; + + buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr xinput ] + ++ optional stdenv.isLinux cryptopp; + # At this moment make install doesn't work for synergy # http://synergy-foss.org/spit/issues/details/3317/ - installPhase = '' ensureDir $out/bin cp ../bin/synergyc $out/bin @@ -21,10 +36,14 @@ stdenv.mkDerivation rec { cp ../bin/synergyd $out/bin ''; - meta = { + doCheck = true; + checkPhase = "../bin/unittests"; + + meta = { description = "Tool to share the mouse keyboard and the clipboard between computers"; homepage = http://synergy-foss.org; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.all; + license = licenses.gpl2; + maintainers = [ maintainers.aszlig ]; + platforms = platforms.all; }; } diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index b0dc87217476..b5557cc1200f 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -84,6 +84,11 @@ let buildPath = "out/${buildType}"; libExecPath = "$out/libexec/${packageName}"; + # user namespace sandbox patch + userns_patch = if versionOlder sourceInfo.version "29.0.0.0" + then ./sandbox_userns.patch + else ./sandbox_userns_29.patch; + in stdenv.mkDerivation rec { name = "${packageName}-${version}"; inherit packageName; @@ -116,18 +121,14 @@ in stdenv.mkDerivation rec { prePatch = "patchShebangs ."; - patches = [ ./sandbox_userns.patch ] + patches = [ userns_patch ] ++ optional cupsSupport ./cups_allow_deprecated.patch; postPatch = '' sed -i -r -e 's/-f(stack-protector)(-all)?/-fno-\1/' build/common.gypi + sed -i -e 's|/usr/bin/gcc|gcc|' third_party/WebKit/Source/core/core.gypi '' + optionalString useOpenSSL '' cat $opensslPatches | patch -p1 -d third_party/openssl/openssl - '' + '' - sed -i -e 's|/usr/bin/gcc|gcc|' \ - third_party/WebKit/Source/${if !versionOlder sourceInfo.version "28.0.0.0" - then "core/core.gypi" - else "WebCore/WebCore.gyp/WebCore.gyp"} ''; gypFlags = mkGypFlags (gypFlagsUseSystemLibs // { diff --git a/pkgs/applications/networking/browsers/chromium/sandbox_userns_29.patch b/pkgs/applications/networking/browsers/chromium/sandbox_userns_29.patch new file mode 100644 index 000000000000..c1987c43e150 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/sandbox_userns_29.patch @@ -0,0 +1,287 @@ +commit 557daf9cc9c02b8f17e6ee84f9b1ae6e6132d478 +Author: aszlig +Date: Thu May 16 14:17:56 2013 +0200 + + zygote: Add support for user namespaces on Linux. + + The implementation is done by patching the Zygote host to execute the sandbox + binary with CLONE_NEWUSER and setting the uid and gid mapping so that the child + process is using uid 0 and gid 0 which map to the current user of the parent. + Afterwards, the sandbox will continue as if it was called as a setuid binary. + + In addition, this adds new_user_namespace as an option in process_util in order + to set the UID and GID mapping correctly. The reason for this is that just + passing CLONE_NEWUSER to clone_flags doesn't help in LaunchProcess(), because + without setting the mappings exec*() will clear the process's capability sets. + + If the kernel doesn't support unprivileged user namespaces and the sandbox + binary doesn't have the setuid flag, the Zygote main process will run without a + sandbox. This is to mimic the behaviour if no SUID sandbox binary path is set. + + Signed-off-by: aszlig + +diff --git a/base/process_util.h b/base/process_util.h +index 0bec8e0..6b6f566 100644 +--- a/base/process_util.h ++++ b/base/process_util.h +@@ -175,6 +175,7 @@ struct LaunchOptions { + new_process_group(false) + #if defined(OS_LINUX) + , clone_flags(0) ++ , new_user_namespace(false) + #endif // OS_LINUX + #if defined(OS_CHROMEOS) + , ctrl_terminal_fd(-1) +@@ -249,6 +250,9 @@ struct LaunchOptions { + #if defined(OS_LINUX) + // If non-zero, start the process using clone(), using flags as provided. + int clone_flags; ++ ++ // If true, start the process in a new user namespace. ++ bool new_user_namespace; + #endif // defined(OS_LINUX) + + #if defined(OS_CHROMEOS) +diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc +index 83afe44..e529b2b 100644 +--- a/base/process_util_posix.cc ++++ b/base/process_util_posix.cc +@@ -34,6 +34,13 @@ + #include "base/threading/platform_thread.h" + #include "base/threading/thread_restrictions.h" + ++#if defined(OS_LINUX) ++#include ++#if !defined(CLONE_NEWUSER) ++#define CLONE_NEWUSER 0x10000000 ++#endif ++#endif ++ + #if defined(OS_CHROMEOS) + #include + #endif +@@ -621,8 +628,19 @@ bool LaunchProcess(const std::vector& argv, + + pid_t pid; + #if defined(OS_LINUX) +- if (options.clone_flags) { +- pid = syscall(__NR_clone, options.clone_flags, 0, 0, 0); ++ int map_pipe_fd[2]; ++ int flags = options.clone_flags; ++ ++ if (options.new_user_namespace) { ++ flags |= CLONE_NEWUSER; ++ if (pipe(map_pipe_fd) < 0) { ++ DPLOG(ERROR) << "user namespace pipe"; ++ return false; ++ } ++ } ++ ++ if (options.clone_flags || options.new_user_namespace) { ++ pid = syscall(__NR_clone, flags, 0, 0, 0); + } else + #endif + { +@@ -635,6 +653,21 @@ bool LaunchProcess(const std::vector& argv, + } else if (pid == 0) { + // Child process + ++#if defined(OS_LINUX) ++ if (options.new_user_namespace) { ++ // Close the write end of the pipe so we get an EOF when the parent closes ++ // the FD. This is to avoid race conditions when the UID/GID mappings are ++ // written _after_ execvp(). ++ close(map_pipe_fd[1]); ++ ++ char dummy; ++ if (HANDLE_EINTR(read(map_pipe_fd[0], &dummy, 1)) != 0) { ++ RAW_LOG(ERROR, "Unexpected input in uid/gid mapping pipe."); ++ _exit(127); ++ } ++ } ++#endif ++ + // DANGER: fork() rule: in the child, if you don't end up doing exec*(), + // you call _exit() instead of exit(). This is because _exit() does not + // call any previously-registered (in the parent) exit handlers, which +@@ -749,6 +782,40 @@ bool LaunchProcess(const std::vector& argv, + _exit(127); + } else { + // Parent process ++#if defined(OS_LINUX) ++ if (options.new_user_namespace) { ++ // We need to write UID/GID mapping here to map the current user outside ++ // the namespace to the root user inside the namespace in order to ++ // correctly "fool" the child process. ++ char buf[256]; ++ int map_fd, map_len; ++ ++ snprintf(buf, sizeof(buf), "/proc/%d/uid_map", pid); ++ map_fd = open(buf, O_RDWR); ++ DPCHECK(map_fd >= 0); ++ snprintf(buf, sizeof(buf), "0 %d 1", geteuid()); ++ map_len = strlen(buf); ++ if (write(map_fd, buf, map_len) != map_len) { ++ RAW_LOG(WARNING, "Can't write to uid_map."); ++ } ++ close(map_fd); ++ ++ snprintf(buf, sizeof(buf), "/proc/%d/gid_map", pid); ++ map_fd = open(buf, O_RDWR); ++ DPCHECK(map_fd >= 0); ++ snprintf(buf, sizeof(buf), "0 %d 1", getegid()); ++ map_len = strlen(buf); ++ if (write(map_fd, buf, map_len) != map_len) { ++ RAW_LOG(WARNING, "Can't write to gid_map."); ++ } ++ close(map_fd); ++ ++ // Close the pipe on the parent, so the child can continue doing the ++ // execvp() call. ++ close(map_pipe_fd[1]); ++ } ++#endif ++ + if (options.wait) { + // While this isn't strictly disk IO, waiting for another process to + // finish is the sort of thing ThreadRestrictions is trying to prevent. +diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc +index 130f44a..c1232d4 100644 +--- a/content/browser/zygote_host/zygote_host_impl_linux.cc ++++ b/content/browser/zygote_host/zygote_host_impl_linux.cc +@@ -118,25 +118,31 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) { + + sandbox_binary_ = sandbox_cmd.c_str(); + +- // A non empty sandbox_cmd means we want a SUID sandbox. +- using_suid_sandbox_ = !sandbox_cmd.empty(); ++ bool userns_sandbox = false; ++ const std::vector cmd_line_unwrapped(cmd_line.argv()); + +- if (using_suid_sandbox_) { ++ if (!sandbox_cmd.empty()) { + struct stat st; + if (stat(sandbox_binary_.c_str(), &st) != 0) { + LOG(FATAL) << "The SUID sandbox helper binary is missing: " + << sandbox_binary_ << " Aborting now."; + } + +- if (access(sandbox_binary_.c_str(), X_OK) == 0 && +- (st.st_uid == 0) && +- (st.st_mode & S_ISUID) && +- (st.st_mode & S_IXOTH)) { ++ if (access(sandbox_binary_.c_str(), X_OK) == 0) { ++ using_suid_sandbox_ = true; ++ + cmd_line.PrependWrapper(sandbox_binary_); + + scoped_ptr + sandbox_client(sandbox::SetuidSandboxClient::Create()); + sandbox_client->SetupLaunchEnvironment(); ++ ++ if (!((st.st_uid == 0) && ++ (st.st_mode & S_ISUID) && ++ (st.st_mode & S_IXOTH))) { ++ userns_sandbox = true; ++ sandbox_client->SetNoSuid(); ++ } + } else { + LOG(FATAL) << "The SUID sandbox helper binary was found, but is not " + "configured correctly. Rather than run without sandboxing " +@@ -160,7 +166,19 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) { + base::ProcessHandle process = -1; + base::LaunchOptions options; + options.fds_to_remap = &fds_to_map; ++ if (userns_sandbox) ++ options.new_user_namespace = true; + base::LaunchProcess(cmd_line.argv(), options, &process); ++ ++ if (process == -1 && userns_sandbox) { ++ LOG(ERROR) << "User namespace sandbox failed to start, running without " ++ << "sandbox! You need at least kernel 3.8.0 with CONFIG_USER_NS " ++ << "enabled in order to use the sandbox without setuid bit."; ++ using_suid_sandbox_ = false; ++ options.new_user_namespace = false; ++ base::LaunchProcess(cmd_line_unwrapped, options, &process); ++ } ++ + CHECK(process != -1) << "Failed to launch zygote process"; + + if (using_suid_sandbox_) { +diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc +index 7d01722..2f445ef 100644 +--- a/content/zygote/zygote_main_linux.cc ++++ b/content/zygote/zygote_main_linux.cc +@@ -395,6 +395,13 @@ static bool EnterSandbox(sandbox::SetuidSandboxClient* setuid_sandbox, + *has_started_new_init = true; + } + ++ // Don't set non-dumpable, as it causes trouble when the host tries to find ++ // the zygote process (XXX: Not quite sure why this happens with user ++ // namespaces). Fortunately, we also have the seccomp filter sandbox which ++ // should disallow the use of ptrace. ++ if (setuid_sandbox->IsNoSuid()) ++ return true; ++ + #if !defined(OS_OPENBSD) + // Previously, we required that the binary be non-readable. This causes the + // kernel to mark the process as non-dumpable at startup. The thinking was +diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc +index 34231d4..36e3201 100644 +--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc ++++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc +@@ -166,6 +166,10 @@ bool SetuidSandboxClient::IsInNewNETNamespace() const { + return env_->HasVar(kSandboxNETNSEnvironmentVarName); + } + ++bool SetuidSandboxClient::IsNoSuid() const { ++ return env_->HasVar(kSandboxNoSuidVarName); ++} ++ + bool SetuidSandboxClient::IsSandboxed() const { + return sandboxed_; + } +@@ -175,5 +179,9 @@ void SetuidSandboxClient::SetupLaunchEnvironment() { + SetSandboxAPIEnvironmentVariable(env_); + } + ++void SetuidSandboxClient::SetNoSuid() { ++ env_->SetVar(kSandboxNoSuidVarName, "1"); ++} ++ + } // namespace sandbox + +diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.h b/sandbox/linux/suid/client/setuid_sandbox_client.h +index a9f6536..2e8113a 100644 +--- a/sandbox/linux/suid/client/setuid_sandbox_client.h ++++ b/sandbox/linux/suid/client/setuid_sandbox_client.h +@@ -39,6 +39,8 @@ class SetuidSandboxClient { + bool IsInNewPIDNamespace() const; + // Did the setuid helper create a new network namespace ? + bool IsInNewNETNamespace() const; ++ // Is sandboxed without SUID binary ? ++ bool IsNoSuid() const; + // Are we done and fully sandboxed ? + bool IsSandboxed() const; + +@@ -46,6 +48,8 @@ class SetuidSandboxClient { + // helper. + void SetupLaunchEnvironment(); + ++ void SetNoSuid(); ++ + private: + // Holds the environment. Will never be NULL. + base::Environment* env_; +diff --git a/sandbox/linux/suid/common/sandbox.h b/sandbox/linux/suid/common/sandbox.h +index aad4ff8..bd710d5 100644 +--- a/sandbox/linux/suid/common/sandbox.h ++++ b/sandbox/linux/suid/common/sandbox.h +@@ -18,6 +18,7 @@ static const char kAdjustLowMemMarginSwitch[] = "--adjust-low-mem"; + + static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D"; + static const char kSandboxHelperPidEnvironmentVarName[] = "SBX_HELPER_PID"; ++static const char kSandboxNoSuidVarName[] = "SBX_NO_SUID"; + + static const long kSUIDSandboxApiNumber = 1; + static const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ"; diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix index 54d9f44f7fba..dce02893a56c 100644 --- a/pkgs/applications/networking/browsers/chromium/sources.nix +++ b/pkgs/applications/networking/browsers/chromium/sources.nix @@ -1,18 +1,18 @@ # This file is autogenerated from update.sh in the same directory. { dev = { - version = "29.0.1516.3"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-29.0.1516.3.tar.xz"; - sha256 = "0pdn9c6v0v55d7g4amivxrv132bpj9sfqywk5b8l6kqfjq28mw5k"; + version = "29.0.1541.2"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-29.0.1541.2.tar.xz"; + sha256 = "0i3vp2zrk1sjdhkwdhig08jh0qmzahn96pm0i22r63cp8i9vny1p"; }; beta = { - version = "28.0.1500.36"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-28.0.1500.36.tar.xz"; - sha256 = "1bz9w46ps8gj056hfwbcj4myyxyr7y759nagz9idraia8116m3pp"; + version = "28.0.1500.52"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-28.0.1500.52.tar.xz"; + sha256 = "1d0q8lsvwqkaninmnyc8jjj0pnqxc5rr3lr3mgzj37avksxvyg3v"; }; stable = { - version = "27.0.1453.110"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-27.0.1453.110.tar.xz"; - sha256 = "1y61shbzrkcv70x9zyj559g2yyp40hi9y59f7wwx5g076lsaxsw5"; + version = "28.0.1500.52"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-28.0.1500.52.tar.xz"; + sha256 = "1d0q8lsvwqkaninmnyc8jjj0pnqxc5rr3lr3mgzj37avksxvyg3v"; }; } diff --git a/pkgs/applications/networking/browsers/chromium/update.sh b/pkgs/applications/networking/browsers/chromium/update.sh index 0c21213a751c..0c4881bb3962 100755 --- a/pkgs/applications/networking/browsers/chromium/update.sh +++ b/pkgs/applications/networking/browsers/chromium/update.sh @@ -1,6 +1,7 @@ #!/bin/sh channels_url="http://omahaproxy.appspot.com/all?csv=1"; +history_url="http://omahaproxy.appspot.com/history"; bucket_url="http://commondatastorage.googleapis.com/chromium-browser-official/"; output_file="$(cd "$(dirname "$0")" && pwd)/sources.nix"; @@ -41,6 +42,17 @@ sha_insert() ver_sha_table="$ver_sha_table $version:$sha256"; } +get_newest_ver() +{ + versions="$(for v in $@; do echo "$v"; done)"; + if oldest="$(echo "$versions" | sort -V 2> /dev/null | tail -n1)"; + then + echo "$oldest"; + else + echo "$versions" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n1; + fi; +} + if [ -e "$output_file" ]; then get_sha256() @@ -53,38 +65,55 @@ then echo -n "Checking if $oldver ($channel) is up to date..." >&2; - if [ "x$version" != "x$oldver" ]; + if [ "x$(get_newest_ver "$version" "$oldver")" != "x$oldver" ]; then echo " no, getting sha256 for new version $version:" >&2; - sha256="$(nix-prefetch-url "$url")"; + sha256="$(nix-prefetch-url "$url")" || return 1; else echo " yes, keeping old sha256." >&2; - sha256="$(nix_getattr "$output_file" "$channel.sha256")"; + sha256="$(nix_getattr "$output_file" "$channel.sha256")" \ + || return 1; fi; sha_insert "$version" "$sha256"; echo "$sha256"; + return 0; } else get_sha256() { - nix-prefetch-url "$url"; + nix-prefetch-url "$3"; } fi; +fetch_filtered_history() +{ + curl -s "$history_url" | sed -nr 's/^'"linux,$1"',([^,]+).*$/\1/p'; +} + +get_prev_sha256() +{ + channel="$1"; + current_version="$2"; + + for version in $(fetch_filtered_history "$channel"); + do + [ "x$version" = "x$current_version" ] && continue; + url="${bucket_url%/}/chromium-$version.tar.xz"; + sha256="$(get_sha256 "$channel" "$version" "$url")" || continue; + echo "$sha256:$version:$url"; + return 0; + done; +} + get_channel_exprs() { - for chline in $(echo "$1" | cut -d, -f-2); + for chline in $1; do channel="${chline%%,*}"; version="${chline##*,}"; - # XXX: Remove case after version 26 is stable: - if [ "${version%%.*}" -ge 26 ]; then - url="${bucket_url%/}/chromium-$version.tar.xz"; - else - url="${bucket_url%/}/chromium-$version.tar.bz2"; - fi; + url="${bucket_url%/}/chromium-$version.tar.xz"; echo -n "Checking if sha256 of version $version is cached..." >&2; if sha256="$(sha_lookup "$version")"; @@ -93,6 +122,17 @@ get_channel_exprs() else echo " no." >&2; sha256="$(get_sha256 "$channel" "$version" "$url")"; + if [ $? -ne 0 ]; + then + echo "Whoops, failed to fetch $version, trying previous" \ + "versions:" >&2; + + sha_ver_url="$(get_prev_sha256 "$channel" "$version")"; + sha256="${sha_ver_url%%:*}"; + ver_url="${sha_ver_url#*:}"; + version="${ver_url%%:*}"; + url="${ver_url#*:}"; + fi; fi; sha_insert "$version" "$sha256"; @@ -108,7 +148,7 @@ get_channel_exprs() cd "$(dirname "$0")"; omaha="$(curl -s "$channels_url")"; -versions="$(echo "$omaha" | sed -n -e 's/^linux,\(\([^,]\+,\)\{2\}\).*$/\1/p')"; +versions="$(echo "$omaha" | sed -nr -e 's/^linux,([^,]+,[^,]+).*$/\1/p')"; channel_exprs="$(get_channel_exprs "$versions")"; cat > "$output_file" <<-EOF diff --git a/pkgs/applications/networking/browsers/firefox/20.0.nix b/pkgs/applications/networking/browsers/firefox/20.0.nix index 1480a300820c..39cf69dcfb05 100644 --- a/pkgs/applications/networking/browsers/firefox/20.0.nix +++ b/pkgs/applications/networking/browsers/firefox/20.0.nix @@ -35,7 +35,7 @@ rec { #"--enable-profiling" "--disable-debug" "--enable-strip" - # "--with-system-jpeg" # Too old in nixpkgs + "--with-system-jpeg" # now we use recent libjpeg-turbo "--with-system-zlib" "--with-system-bz2" "--with-system-nspr" @@ -135,7 +135,6 @@ rec { [ "--enable-application=browser" "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}" "--enable-chrome-format=jar" - "--disable-elf-hack" ] ++ commonConfigureFlags ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; diff --git a/pkgs/applications/networking/browsers/firefox/21.0.nix b/pkgs/applications/networking/browsers/firefox/21.0.nix index 02766a9ccff6..35ba2cad1244 100644 --- a/pkgs/applications/networking/browsers/firefox/21.0.nix +++ b/pkgs/applications/networking/browsers/firefox/21.0.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL -, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs +, libjpeg, libpng, zlib, dbus, dbus_glib, bzip2, xlibs , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite - +, hunspell, libevent, libstartup_notification, libvpx +, cairo ? null +, useSystemCairo ? false , # If you want the resulting program to call itself "Firefox" instead # of "Shiretoko" or whatever, enable this option. However, those # binaries may not be distributed without permission from the @@ -12,8 +14,10 @@ }: assert stdenv.gcc ? libc && stdenv.gcc.libc != null; +assert useSystemCairo -> cairo != null; -rec { +let optional = stdenv.lib.optional; +in rec { firefoxVersion = "21.0"; @@ -35,20 +39,25 @@ rec { #"--enable-profiling" "--disable-debug" "--enable-strip" - # "--with-system-jpeg" # Too old in nixpkgs + "--with-system-jpeg" "--with-system-zlib" "--with-system-bz2" "--with-system-nspr" "--with-system-nss" + "--with-system-libevent" + "--with-system-libvpx" # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" - # "--enable-system-cairo" # <-- doesn't build + "--enable-startup-notification" + "--enable-system-ffi" + "--enable-system-hunspell" + "--enable-system-pixman" "--enable-system-sqlite" "--disable-crashreporter" "--disable-tests" "--disable-necko-wifi" # maybe we want to enable this at some point "--disable-installer" "--disable-updater" - ]; + ] ++ optional useSystemCairo "--enable-system-cairo"; xulrunner = stdenv.mkDerivation rec { @@ -57,13 +66,14 @@ rec { inherit src; buildInputs = - [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 + [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib bzip2 python dbus dbus_glib pango freetype fontconfig xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file alsaLib nspr nss libnotify xlibs.pixman yasm mesa xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper - ]; + hunspell libevent libstartup_notification libvpx + ] ++ optional useSystemCairo cairo; configureFlags = [ "--enable-application=xulrunner" @@ -72,6 +82,8 @@ rec { enableParallelBuilding = true; + patches = optional useSystemCairo ./system-cairo.patch; # probably in 22 + preConfigure = '' export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib/xulrunner-${xulVersion}" @@ -124,10 +136,15 @@ rec { enableParallelBuilding = true; buildInputs = - [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python + [ pkgconfig gtk perl zip libIDL libjpeg zlib bzip2 python dbus dbus_glib pango freetype fontconfig alsaLib nspr nss libnotify xlibs.pixman yasm mesa sqlite file unzip pysqlite - ]; + hunspell libevent libstartup_notification libvpx + ] ++ optional useSystemCairo cairo; + + patches = [ + ./disable-reporter.patch # fixes "search box not working when built on xulrunner" + ]; propagatedBuildInputs = [xulrunner]; @@ -135,7 +152,6 @@ rec { [ "--enable-application=browser" "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}" "--enable-chrome-format=jar" - "--disable-elf-hack" ] ++ commonConfigureFlags ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; diff --git a/pkgs/applications/networking/browsers/firefox/disable-reporter.patch b/pkgs/applications/networking/browsers/firefox/disable-reporter.patch new file mode 100644 index 000000000000..0a71a7210f2a --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox/disable-reporter.patch @@ -0,0 +1,20 @@ +# from: +# - https://www.linuxquestions.org/questions/linux-from-scratch-13/blfs-xulrunner-firefox-21-0-and-search-4175462532/ +# - http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg17359.html + +--- mozilla-release/browser/base/content/browser.js.orig 2013-05-11 16:19:21.000000000 -0300 ++++ mozilla-release/browser/base/content/browser.js 2013-06-07 00:39:16.114862388 -0300 +@@ -3559,10 +3559,12 @@ + */ + recordSearchInHealthReport: function (engine, source) { + #ifdef MOZ_SERVICES_HEALTHREPORT +- let reporter = Cc["@mozilla.org/datareporting/service;1"] ++ /*let reporter = Cc["@mozilla.org/datareporting/service;1"] + .getService() + .wrappedJSObject + .healthReporter; ++ */ ++ return; + + // This can happen if the FHR component of the data reporting service is + // disabled. This is controlled by a pref that most will never use. diff --git a/pkgs/applications/networking/browsers/firefox/system-cairo.patch b/pkgs/applications/networking/browsers/firefox/system-cairo.patch new file mode 100644 index 000000000000..76cf4d51c9cb --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox/system-cairo.patch @@ -0,0 +1,73 @@ +# HG changeset patch +# From: https://hg.mozilla.org/mozilla-central/rev/52b02042b27f +# User Connor Behan +# Date 1370038985 -7200 +# Node ID 52b02042b27f75acbcb2bd4822bedb00ab680e67 +# Parent 08ed531fed70978385cf9253bbc8389b0abe76ca +Bug 722975: Unbreak builds using --with-system-cairo. r=bas + +diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp +--- a/gfx/thebes/gfxPlatform.cpp ++++ b/gfx/thebes/gfxPlatform.cpp +@@ -548,23 +548,31 @@ struct SourceSurfaceUserData + BackendType mBackendType; + }; + + void SourceBufferDestroy(void *srcSurfUD) + { + delete static_cast(srcSurfUD); + } + ++#if MOZ_TREE_CAIRO + void SourceSnapshotDetached(cairo_surface_t *nullSurf) + { + gfxImageSurface* origSurf = + static_cast(cairo_surface_get_user_data(nullSurf, &kSourceSurface)); + + origSurf->SetData(&kSourceSurface, NULL, NULL); + } ++#else ++void SourceSnapshotDetached(void *nullSurf) ++{ ++ gfxImageSurface* origSurf = static_cast(nullSurf); ++ origSurf->SetData(&kSourceSurface, NULL, NULL); ++} ++#endif + + RefPtr + gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface) + { + void *userData = aSurface->GetData(&kSourceSurface); + + if (userData) { + SourceSurfaceUserData *surf = static_cast(userData); +@@ -667,24 +675,28 @@ gfxPlatform::GetSourceSurfaceForSurface( + } + + srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(), + imgSurface->Stride(), + size, format); + + } + ++#if MOZ_TREE_CAIRO + cairo_surface_t *nullSurf = + cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA); + cairo_surface_set_user_data(nullSurf, + &kSourceSurface, + imgSurface, + NULL); + cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached); + cairo_surface_destroy(nullSurf); ++#else ++ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic", (const unsigned char*) "data", 4, SourceSnapshotDetached, imgSurface.get()); ++#endif + } + + SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData; + srcSurfUD->mBackendType = aTarget->GetType(); + srcSurfUD->mSrcSurface = srcBuffer; + aSurface->SetData(&kSourceSurface, srcSurfUD, SourceBufferDestroy); + + return srcBuffer; + diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix index 5587f3b732ce..7cb1abf31537 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { preConfigure = '' sed -e 's@/usr/bin/@@g' -i configure sed -e '/gthread[.]h/d' -i src/npw-player.c + export NIX_LDFLAGS="$NIX_LDFLAGS -lgthread-2.0" export configureFlags="$configureFlags --target-cpu=$(uname -m)" ''; diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix index b298b3c9df99..34fe6db8932b 100644 --- a/pkgs/applications/networking/dropbox-cli/default.nix +++ b/pkgs/applications/networking/dropbox-cli/default.nix @@ -1,17 +1,18 @@ -{ stdenv, coreutils, fetchurl, python }: +{ stdenv, coreutils, fetchurl, python, dropbox }: stdenv.mkDerivation { name = "dropbox-cli"; src = fetchurl { + # Note: dropbox doesn't version this file. Annoying. url = "https://linux.dropbox.com/packages/dropbox.py"; - sha256 = "1x46i0aplah4a2nqglb8byl3c60w7h1cjja62myxj2dpxyv7fydy"; + sha256 = "0p1pg8bw6mlhqi5k8y3pgs7byg0kfvq57s53sh188lb5sxvlg7yz"; }; buildInputs = [ coreutils python ]; phases = "installPhase fixupPhase"; - + installPhase = '' mkdir -pv $out/bin/ cp $src $out/bin/dropbox-cli @@ -20,17 +21,18 @@ stdenv.mkDerivation { fixupPhase = '' substituteInPlace $out/bin/dropbox-cli \ --replace "/usr/bin/python" ${python}/bin/python \ - --replace "use dropbox help" "use dropbox-cli help" - + --replace "use dropbox help" "use dropbox-cli help" \ + --replace "~/.dropbox-dist/dropboxd" ${dropbox}/bin/dropbox + chmod +x $out/bin/dropbox-cli ''; - + meta = { homepage = http://dropbox.com; description = "Command line client for the dropbox daemon."; license = stdenv.lib.licenses.gpl3; + maintainers = with stdenv.lib.maintainers; [ the-kenny ]; # NOTE: Dropbox itself only works on linux, so this is ok. platforms = stdenv.lib.platforms.linux; }; } - diff --git a/pkgs/applications/networking/instant-messengers/linphone/default.nix b/pkgs/applications/networking/instant-messengers/linphone/default.nix index 7bdb6cc1452d..a4a32327d0c6 100644 --- a/pkgs/applications/networking/instant-messengers/linphone/default.nix +++ b/pkgs/applications/networking/instant-messengers/linphone/default.nix @@ -19,6 +19,8 @@ stdenv.mkDerivation rec { configureFlags = "--enable-external-ortp --enable-external-mediastreamer"; + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # I'm lazy to fix these for them + meta = { homepage = http://www.linphone.org/; description = "Open Source video SIP softphone"; diff --git a/pkgs/applications/networking/instant-messengers/skype/default.nix b/pkgs/applications/networking/instant-messengers/skype/default.nix index 715f0e5c2deb..aa90c8e70261 100644 --- a/pkgs/applications/networking/instant-messengers/skype/default.nix +++ b/pkgs/applications/networking/instant-messengers/skype/default.nix @@ -5,11 +5,11 @@ assert stdenv.system == "i686-linux"; stdenv.mkDerivation rec { - name = "skype-4.1.0.20"; + name = "skype-4.2.0.11"; src = fetchurl { url = "http://download.skype.com/linux/${name}.tar.bz2"; - sha256 = "1qhcxkfmlpblpy9rqimzdl79rm781swbldkzi6nyw56bbp6lf7n3"; + sha256 = "0kh66p50m3x4ql6j8ciz73c30npcizd00ya9qrhid711rar0mlw7"; }; buildInputs = diff --git a/pkgs/applications/networking/irc/irssi/default.nix b/pkgs/applications/networking/irc/irssi/default.nix index 86d800e0cfe5..67e06be08830 100644 --- a/pkgs/applications/networking/irc/irssi/default.nix +++ b/pkgs/applications/networking/irc/irssi/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl}: +{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintlOrEmpty }: stdenv.mkDerivation rec { name = "irssi-0.8.15"; @@ -8,13 +8,15 @@ stdenv.mkDerivation rec { sha256 = "19m0aah9bhc70dnhh7kpydbsz5n35l0l9knxav1df0sic3xicbf1"; }; - buildInputs = [pkgconfig ncurses glib openssl perl]; + buildInputs = [ pkgconfig ncurses glib openssl perl libintlOrEmpty ]; NIX_LDFLAGS = "-lncurses"; configureFlags = "--with-proxy --with-ncurses --enable-ssl --with-perl=yes"; meta = { - homepage = http://irssi.org; + homepage = http://irssi.org; + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ lovek323 ]; }; } diff --git a/pkgs/applications/networking/irc/irssi/otr/default.nix b/pkgs/applications/networking/irc/irssi/otr/default.nix index ba3a56e642ed..00a9aa1fc683 100644 --- a/pkgs/applications/networking/irc/irssi/otr/default.nix +++ b/pkgs/applications/networking/irc/irssi/otr/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchurl, libotr, automake, autoconf, libtool, glib, pkgconfig, irssi }: let - rev = "59ddcbe66a"; + rev = "cab3fc915c"; in with stdenv.lib; stdenv.mkDerivation rec { - name = "irssi-otr-20130315-${rev}"; + name = "irssi-otr-20130601-${rev}"; src = fetchurl { url = "https://github.com/cryptodotis/irssi-otr/tarball/${rev}"; name = "${name}.tar.gz"; - sha256 = "095dak0d10j6cpkwlqmk967p1wypwzvqr4wdqvb30w14dbn8dy0d"; + sha256 = "0kn9c562zfh36gpcrbpslwjjr78baagdwphczz2d608ndczm1vrk"; }; patchPhase = '' diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index e583551bcf10..a523089e0ed1 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -3,12 +3,12 @@ , pythonPackages, cacert, cmake, makeWrapper }: stdenv.mkDerivation rec { - version = "0.4.0"; + version = "0.4.1"; name = "weechat-${version}"; src = fetchurl { url = "http://weechat.org/files/src/${name}.tar.gz"; - sha256 = "17jxknam1bbakmdfqy1b2cfc8l9ag90l3z1gcxdvwg358wasv9dc"; + sha256 = "0gsn0mp921j7jpvrxc74h0gs0bn0w808j2zqghm1w7xbjw9hl49w"; }; buildInputs = diff --git a/pkgs/applications/networking/mailreaders/sup/default.nix b/pkgs/applications/networking/mailreaders/sup/default.nix new file mode 100644 index 000000000000..058335370266 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/sup/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, ruby, rake, rubygems, makeWrapper, ncursesw_sup +, xapian_ruby, gpgme, libiconvOrEmpty, rmail, mime_types, chronic, trollop +, lockfile, gettext, iconv, locale, text, highline }: + +stdenv.mkDerivation { + name = "sup-896ab66c0263e5ce0fa45857fb08e0fb78fcb6bd"; + + meta = { + homepage = http://supmua.org; + description = "A curses threads-with-tags style email client"; + maintainers = with stdenv.lib.maintainers; [ lovek323 ]; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; + }; + + dontStrip = true; + + src = fetchurl { + url = "https://github.com/sup-heliotrope/sup/archive/896ab66c0263e5ce0fa45857fb08e0fb78fcb6bd.tar.gz"; + sha256 = "0sknf4ha13m2478fa27qnm43bcn59g6qbd8f2nmv64k2zs7xnwmk"; + }; + + buildInputs = + [ ruby rake rubygems makeWrapper gpgme ncursesw_sup xapian_ruby + libiconvOrEmpty ]; + + buildPhase = "rake gem"; + + # TODO: Move gem dependencies out + + installPhase = '' + export HOME=$TMP/home; mkdir -pv "$HOME" + + GEM_PATH="$GEM_PATH:$out/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${chronic}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${gettext}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${gpgme}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${iconv}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${locale}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${lockfile}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${mime_types}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${ncursesw_sup}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${rmail}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${text}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${trollop}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${xapian_ruby}/${ruby.gemPath}" + GEM_PATH="$GEM_PATH:${highline}/${ruby.gemPath}" + + # Don't install some dependencies -- we have already installed + # the dependencies but gem doesn't acknowledge this + gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \ + --bindir "$out/bin" --no-rdoc --no-ri pkg/sup-999.gem \ + --ignore-dependencies + + for prog in $out/bin/*; do + wrapProgram "$prog" --prefix GEM_PATH : "$GEM_PATH" + done + + for prog in $out/gems/*/bin/*; do + [[ -e "$out/bin/$(basename $prog)" ]] + done + ''; +} + diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index 9befe98399da..0981ab394496 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -6,16 +6,14 @@ jackaudio ? null }: stdenv.mkDerivation rec { name = "mumble-" + version; - version = "1.2.3"; + version = "1.2.4"; src = fetchurl { url = "mirror://sourceforge/mumble/${name}.tar.gz"; - sha256 = "0p4as6bcmbzkiff1gvc0f277dzbz2sfys97gcbxw7gjamqi53285"; + sha256 = "16wwj6gwcnyjlnzh7wk0l255ldxmbwx0wi652sdp20lsv61q7kx1"; }; patchPhase = '' - sed -e s/qt_ja_JP.qm// -i src/mumble/mumble.pro src/mumble11x/mumble11x.pro - sed -e /qt_ja_JP.qm/d -i src/mumble/mumble_qt.qrc src/mumble11x/mumble_qt.qrc patch -p1 < ${ ./mumble-jack-support.patch } ''; diff --git a/pkgs/applications/networking/p2p/gnunet/svn.nix b/pkgs/applications/networking/p2p/gnunet/svn.nix index 4bff8239adfc..eb05461ec85b 100644 --- a/pkgs/applications/networking/p2p/gnunet/svn.nix +++ b/pkgs/applications/networking/p2p/gnunet/svn.nix @@ -4,15 +4,15 @@ , makeWrapper, autoconf, automake }: let - rev = "27317"; + rev = "27399"; in stdenv.mkDerivation rec { name = "gnunet-svn-${rev}"; src = fetchsvn { url = https://gnunet.org/svn/gnunet; - rev = "27317"; - sha256 = "1l7jypm57wjhzlwdj8xzhfppjdpy6wbph4nqgwxxb9q056wwf9zy"; + inherit rev; + sha256 = "0fn7ppfnc4v6lkxwww11s0h8mdvwyv7f40f6wrbfilqpn2ncrf8c"; }; buildInputs = [ diff --git a/pkgs/applications/networking/umurmur/default.nix b/pkgs/applications/networking/umurmur/default.nix index 715e7fa6998f..1f08b9873d44 100644 --- a/pkgs/applications/networking/umurmur/default.nix +++ b/pkgs/applications/networking/umurmur/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, openssl, protobufc, libconfig }: stdenv.mkDerivation rec { - name = "umurmur-0.2.12"; + name = "umurmur-0.2.13"; src = fetchurl { url = "http://umurmur.googlecode.com/files/${name}.tar.gz"; - sha1 = "5be3c765af3c5f518d1e1bbd828b3582ad4097cd"; + sha1 = "c9345b67213f52688fef2113132c62d2edbf4bea"; }; buildInputs = [ openssl protobufc libconfig ]; diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index 26879a6f660f..0865b12e9728 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -1,6 +1,7 @@ { fetchurl, stdenv, pkgconfig, libxml2, gconf, glib, gtk, libgnomeui, libofx , libgtkhtml, gtkhtml, libgnomeprint, goffice, enchant, gettext, libbonoboui -, intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper +, intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper, libglade +, libgsf, libart_lgpl }: /* If you experience GConf errors when running GnuCash on NixOS, see @@ -9,17 +10,17 @@ */ stdenv.mkDerivation rec { - name = "gnucash-2.4.11"; + name = "gnucash-2.4.13"; src = fetchurl { url = "mirror://sourceforge/gnucash/${name}.tar.bz2"; - sha256 = "0qbpgd6spclkmwryi66cih0igi5a6pmsnk41mmnscpfpz1mddhwk"; + sha256 = "0j4m00a3r1hcrhkfjkx3sgi2r4id4wrc639i4s00j35rx80540pn"; }; buildInputs = [ pkgconfig libxml2 gconf glib gtk libgnomeui libgtkhtml gtkhtml libgnomeprint goffice enchant gettext intltool perl guile slibGuile - swig isocodes bzip2 makeWrapper libofx + swig isocodes bzip2 makeWrapper libofx libglade libgsf libart_lgpl ]; configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3 --disable-dbi --enable-ofx"; @@ -65,7 +66,7 @@ stdenv.mkDerivation rec { homepage = http://www.gnucash.org/; - maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ]; + maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons stdenv.lib.maintainers.iElectric ]; platforms = stdenv.lib.platforms.gnu; }; } diff --git a/pkgs/applications/office/hledger-irr/default.nix b/pkgs/applications/office/hledger-irr/default.nix new file mode 100644 index 000000000000..1f4dd165c50e --- /dev/null +++ b/pkgs/applications/office/hledger-irr/default.nix @@ -0,0 +1,16 @@ +{ cabal, Cabal, hledgerLib, statistics, time }: + +cabal.mkDerivation (self: { + pname = "hledger-irr"; + version = "0.1.1.2"; + sha256 = "1mh1lzhnxc8ps8n5j37wrmbqafwdyap60j8rqr6xdfa2syfyq8i2"; + isLibrary = false; + isExecutable = true; + buildDepends = [ Cabal hledgerLib statistics time ]; + meta = { + description = "computes the internal rate of return of an investment"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.simons ]; + }; +}) diff --git a/pkgs/applications/science/astronomy/celestia/default.nix b/pkgs/applications/science/astronomy/celestia/default.nix index 22180e9a3f7d..d7814aa5b78f 100644 --- a/pkgs/applications/science/astronomy/celestia/default.nix +++ b/pkgs/applications/science/astronomy/celestia/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, freeglut, gtk2, gtkglext, libjpeg_turbo, libtheora, libXmu -, lua, mesa, pkgconfig, perl, automake, autoconf, libtool, gettext +, lua, mesa, pkgconfig, perl, automake, autoconf, libtool, gettext, glib, cairo +, pango, gdk_pixbuf, atk }: let @@ -7,25 +8,31 @@ let gcc46Patch = fetchurl { url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-gcc46.patch?h=packages/celestia"; - sha256 = "1q840ip5h2q93r0d68jwrvf40ns5qzqss9vzd6xnwvs3wa77m5wp"; + sha256 = "0my7dpyh5wpz5df7bjhwb4db3ci2rn8ib1nkjv15fbp1g76bxfaz"; name = "celestia-1.6.1-gcc46.patch"; }; libpng15Patch = fetchurl { url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng15.patch?h=packages/celestia"; - sha256 = "19yqbi5k944d3jm0q2mvcfg52kicy4j347gj62dyaijzj505x4pm"; + sha256 = "1jrmbwmvs9b6k2b2g4104q22v4vqi0wfpz6hmfhniaq34626jcms"; name = "celestia-1.6.1-libpng15.patch"; }; + libpng16Patch = fetchurl { + url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng16.patch?h=packages/celestia"; + sha256 = "1q85prw4ci6d50lri8w1jm19pghxw96qizf5dl4g0j86rlhlkc8f"; + name = "celestia-1.6.1-libpng16.patch"; + }; + linkingPatch = fetchurl { url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-linking.patch?h=packages/celestia"; - sha256 = "1qzv18b2prqbhy21js5bnf7vwkmrq1dmrq8r0wab7v10axjqdv35"; + sha256 = "1m8xyq26nm352828bp12c3b8f6m9bys9fwfxbfzqppllk7il2f24"; name = "celestia-1.6.1-linking.patch"; }; gcc47Patch = fetchurl { url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/gcc-4.7-fixes.diff?h=packages/celestia"; - sha256 = "1jqkafwrg1829cwqvlxxkqbf42zqfsgpqd8a5b2qlzma5napdmg5"; + sha256 = "1na26c7pv9qfv8a981m1zvglhv05r3h8513xqjra91qhhzx8wr8n"; name = "gcc-4.7-fixes.diff"; }; in @@ -38,15 +45,24 @@ stdenv.mkDerivation { }; buildInputs = [ freeglut gtk2 gtkglext libjpeg_turbo libtheora libXmu mesa pkgconfig lua - perl automake autoconf libtool gettext ]; + perl automake autoconf libtool gettext ]; patchPhase = '' patch -Np0 -i "${gcc46Patch}" patch -Np0 -i "${libpng15Patch}" + patch -Np2 -i "${libpng16Patch}" patch -Np1 -i "${linkingPatch}" patch -Np1 -i "${gcc47Patch}" autoreconf - configureFlagsArray=( --with-gtk --with-lua=${lua} CFLAGS="-O2 -fsigned-char" CXXFLAGS="-O2 -fsigned-char" ) + configureFlagsArray=( + --with-gtk + --with-lua=${lua} + CPPFLAGS="-DNDEBUG" + CFLAGS="-O2 -fsigned-char" + CXXFLAGS="-O2 -fsigned-char" + GTK_CFLAGS="-I${gtk2}/include/gtk-2.0 -I${gtk2}/lib/gtk-2.0/include -I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${cairo}/include/cairo -I${pango}/include/pango-1.0 -I${gdk_pixbuf}/include/gdk-pixbuf-2.0 -I${atk}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include" + GTK_LIBS="-lgtk-x11-2.0 -lgtkglext-x11-1.0 -lcairo -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0" + ) ''; enableParallelBuilding = true; diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index 9596c30ee6af..85c69413bfb1 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -3,7 +3,7 @@ {stdenv, fetchurl, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: let - version = "8.4"; + version = "8.4pl2"; buildIde = lablgtk != null; ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; idePath = if buildIde then '' @@ -15,8 +15,8 @@ stdenv.mkDerivation { name = "coq-${version}"; src = fetchurl { - url = "http://pauillac.inria.fr/~herbelin/coq/distrib/V${version}/files/coq-${version}.tar.gz"; - sha256 = "0ka2lak9il4hlblk461awf0hbi3mxqhc1wz6kllxradyy2vfaspl"; + url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz"; + sha256 = "1n52pky7bb45irk2jw6f4rd3kvy8lm2yfldjwdhiic0kyqw9lwgv"; }; buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ]; diff --git a/pkgs/applications/science/math/glsurf/default.nix b/pkgs/applications/science/math/glsurf/default.nix new file mode 100644 index 000000000000..51b2850347b5 --- /dev/null +++ b/pkgs/applications/science/math/glsurf/default.nix @@ -0,0 +1,32 @@ + +{ stdenv, fetchdarcs, ocaml, findlib, lablgl, camlimages, mesa, freeglut, ocaml_mysql, mlgmp, mpfr, gmp, libtiff, libjpeg, libpng12, giflib }: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; +in + +stdenv.mkDerivation { + name = "glsurf-3.3"; + + src = fetchdarcs { + url = "http://lama.univ-savoie.fr/~raffalli/GlSurf"; + tag = "3.3"; + sha256 = ""; md5=""; + }; + + buildInputs = [ ocaml findlib freeglut mesa + lablgl camlimages ocaml_mysql mlgmp mpfr gmp + libtiff libjpeg libpng12 giflib ]; + + installPhase = '' + mkdir -p $out/bin $out/share/doc/glsurf + cp ./src/glsurf.opt $out/bin/glsurf + cp ./doc/doc.pdf $out/share/doc/glsurf + cp -r ./examples $out/share/doc/glsurf + ''; + + meta = { + homepage = http://www.lama.univ-savoie.fr/~raffalli/glsurf; + description = "GlSurf: a program to draw implicit surfaces and curves"; + }; +} diff --git a/pkgs/applications/science/math/weka/default.nix b/pkgs/applications/science/math/weka/default.nix new file mode 100644 index 000000000000..8471c46c8d75 --- /dev/null +++ b/pkgs/applications/science/math/weka/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, jre, unzip }: + +stdenv.mkDerivation { + name = "weka-3.6.9"; + + src = fetchurl { + url = "mirror://sourceforge/weka/weka-3-6-9.zip"; + sha256 = "0rnis4vvihhdcdvpp79hkmklcnn897paa0qrs95cbjnpgvxzbczs"; + }; + + buildInputs = [ unzip ]; + + # The -Xmx1000M comes suggested from their download page: + # http://www.cs.waikato.ac.nz/ml/weka/downloading.html + installPhase = '' + mkdir -pv $out/share/weka $out/bin + cp -Rv * $out/share/weka + + cat > $out/bin/weka << EOF + #!${stdenv.shell} + ${jre}/bin/java -Xmx1000M -jar $out/share/weka/weka.jar + EOF + + chmod +x $out/bin/weka + ''; + + meta = { + homepage = "http://www.cs.waikato.ac.nz/ml/weka/"; + description = "Collection of machine learning algorithms for data mining tasks"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/applications/science/misc/tulip/default.nix b/pkgs/applications/science/misc/tulip/default.nix index 1402dc9b1824..84da60398227 100644 --- a/pkgs/applications/science/misc/tulip/default.nix +++ b/pkgs/applications/science/misc/tulip/default.nix @@ -1,13 +1,13 @@ { fetchurl, stdenv, libxml2, freetype, mesa, glew, qt4 , cmake, makeWrapper, libjpeg }: -let version = "3.7.0"; in +let version = "4.1.0"; in stdenv.mkDerivation rec { name = "tulip-${version}"; src = fetchurl { - url = "mirror://sourceforge/auber/tulip/tulip-3.7.0/${name}-src.tar.gz"; - sha256 = "150fj9pdxblvl5sby61cb2kq98r6h8yljk3vq5xizn198d3fz4jq"; + url = "mirror://sourceforge/auber/${name}_src.tar.gz"; + sha256 = "1js1f8xdm9g2m66xbhfxa8ixzw6h4gjynxsm83p54l3i0hs3biig"; }; buildInputs = [ libxml2 freetype glew mesa qt4 libjpeg ]; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { doCheck = false; meta = { - description = "Tulip, a visualization framework for the analysis and visualization of relational data"; + description = "A visualization framework for the analysis and visualization of relational data"; longDescription = '' Tulip is an information visualization framework dedicated to the diff --git a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix index 5086f4f31b37..9991a5064854 100644 --- a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix @@ -7,8 +7,8 @@ , monadControl, mtl, network, networkInfo, networkMulticast , networkProtocolXmpp, openssh, QuickCheck, random, regexTdfa , rsync, SafeSemaphore, SHA, stm, text, time, transformers -, unixCompat, utf8String, uuid, wai, waiLogger, warp, xmlConduit -, xmlTypes, yesod, yesodDefault, yesodForm, yesodStatic +, unixCompat, utf8String, uuid, wai, waiLogger, warp, which +, xmlConduit, xmlTypes, yesod, yesodDefault, yesodForm, yesodStatic }: cabal.mkDerivation (self: { @@ -28,7 +28,7 @@ cabal.mkDerivation (self: { uuid wai waiLogger warp xmlConduit xmlTypes yesod yesodDefault yesodForm yesodStatic ]; - buildTools = [ bup curl git gnupg1 lsof openssh rsync ]; + buildTools = [ bup curl git gnupg1 lsof openssh rsync which ]; configureFlags = "-fS3 -fWebDAV -fInotify @@ -41,6 +41,7 @@ cabal.mkDerivation (self: { -fProduction -fTDFA"; preConfigure = "patchShebangs ."; + installPhase = "make PREFIX=$out CABAL=./Setup docs install"; checkPhase = '' export HOME="$NIX_BUILD_TOP/tmp" mkdir "$HOME" diff --git a/pkgs/applications/version-management/git-and-tools/tig/default.nix b/pkgs/applications/version-management/git-and-tools/tig/default.nix index 20644d09dd70..bdd6e806fe3b 100644 --- a/pkgs/applications/version-management/git-and-tools/tig/default.nix +++ b/pkgs/applications/version-management/git-and-tools/tig/default.nix @@ -16,7 +16,8 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = "http://jonas.nitro.dk/tig/"; description = "Tig is a git repository browser that additionally can act as a pager for output from various git commands"; - maintainers = [ maintainers.garbas maintainers.bjornfor ]; + maintainers = [ maintainers.garbas maintainers.bjornfor maintainers.iElectric ]; license = licenses.gpl2; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/version-management/kdesvn/default.nix b/pkgs/applications/version-management/kdesvn/default.nix index 29b8b306fe54..59fb1f5a867f 100644 --- a/pkgs/applications/version-management/kdesvn/default.nix +++ b/pkgs/applications/version-management/kdesvn/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gettext, apr, aprutil, subversion, db4, kdelibs }: +{ stdenv, fetchurl, gettext, apr, aprutil, subversion, db4, kdelibs, expat }: stdenv.mkDerivation rec { name = "kdesvn-1.5.5"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patches = [ ./docbook.patch ./virtual_inheritance.patch ]; - buildInputs = [ apr aprutil subversion db4 kdelibs ]; + buildInputs = [ apr aprutil subversion db4 kdelibs expat ]; nativeBuildInputs = [ gettext ]; diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 9743b73345ce..42503b974403 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -21,13 +21,13 @@ assert compressionSupport -> neon.compressionSupport; stdenv.mkDerivation rec { - version = "1.7.9"; + version = "1.7.10"; name = "subversion-${version}"; src = fetchurl { url = "mirror://apache/subversion//${name}.tar.bz2"; - sha1 = "453757bae78a800997559f2232483ab99238ec1e"; + sha1 = "a4f3de0a13b034b0eab4d35512c6c91a4abcf4f5"; }; buildInputs = [ zlib apr aprutil sqlite ] diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix index db6bde782b99..4f2addcc99b0 100644 --- a/pkgs/applications/video/gnash/default.nix +++ b/pkgs/applications/video/gnash/default.nix @@ -3,7 +3,7 @@ , gst_ffmpeg, speex , libogg, libxml2, libjpeg, mesa, libpng, libungif, libtool , boost, freetype, agg, dbus, curl, pkgconfig, gettext -, glib, gtk, gtkglext, x11, ming, dejagnu, python, perl +, glib, gtk, gtkglext, pangox_compat, x11, ming, dejagnu, python, perl , freefont_ttf, haxe, swftools , lib, makeWrapper , xulrunner }: @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { gettext x11 SDL SDL_mixer gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg speex libtool libogg libxml2 libjpeg mesa libpng libungif boost freetype agg - dbus curl pkgconfig glib gtk gtkglext + dbus curl pkgconfig glib gtk gtkglext pangox_compat xulrunner makeWrapper ] diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index a1ec200aaf0f..2051590a8197 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { src = fetchurl { # Old kind of URL: - # url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2; + # url = http://tarballs.nixos.org/mplayer-snapshot-20101227.tar.bz2; # Snapshot I took on 20110423 #Transient diff --git a/pkgs/applications/video/smplayer/default.nix b/pkgs/applications/video/smplayer/default.nix new file mode 100644 index 000000000000..ab48d74c00da --- /dev/null +++ b/pkgs/applications/video/smplayer/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, qt4 }: + +stdenv.mkDerivation rec { + name = "smplayer-0.8.5"; + + src = fetchurl { + url = "mirror://sourceforge/smplayer/${name}.tar.bz2"; + sha256 = "0vbfvaqg5c25vabq1mf9xg6kzgvxnpd0i172y1gjznnlpcw2fxrw"; + }; + + buildInputs = [ qt4 ]; + + preConfigure = '' + makeFlags="PREFIX=$out" + ''; + + meta = { + description = "A complete front-end for MPlayer"; + homepage = "http://smplayer.sourceforge.net/"; + license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index 3c96cd134181..7b74cfcdb11a 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -10,13 +10,18 @@ stdenv.mkDerivation rec { name = "vlc-${version}"; - version = "2.0.6"; + version = "2.0.7"; src = fetchurl { url = "http://download.videolan.org/pub/videolan/vlc/${version}/${name}.tar.xz"; - sha256 = "0qqrpry41vawihhggcx00vibbn73hxdal1gim1qnrqrcbq1rik1i"; + sha256 = "052kfkpd0r2fwkyz97qhz2a368xqxa905qacrd1bkl2bkvahfc94"; }; + postPatch = /* flac 1.3.0 fix */ '' + sed -i -e 's:stream_decoder.h:FLAC/stream_decoder.h:' modules/codec/flac.c + sed -i -e 's:stream_encoder.h:FLAC/stream_encoder.h:' modules/codec/flac.c + ''; + buildInputs = [ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread libbluray dbus fribidi qt4 libvorbis libtheora speex lua5 libgcrypt diff --git a/pkgs/applications/video/xbmc/default.nix b/pkgs/applications/video/xbmc/default.nix index 55734e495391..d3b3556baf4d 100644 --- a/pkgs/applications/video/xbmc/default.nix +++ b/pkgs/applications/video/xbmc/default.nix @@ -68,6 +68,11 @@ stdenv.mkDerivation rec { dontUseCmakeConfigure = true; + preConfigure = '' + substituteInPlace xbmc/linux/LinuxTimezone.cpp \ + --replace 'usr/share/zoneinfo' 'etc/zoneinfo' + ''; + configureFlags = [ "--enable-external-libraries" "--disable-webserver" diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index b1165b3535b9..997cc8bd49d6 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, python, zlib, pkgconfig, glib, SDL, ncurses, perl, pixman }: +{ stdenv, fetchurl, python, zlib, pkgconfig, glib, SDL, ncurses, perl, pixman +, attr, libcap }: stdenv.mkDerivation rec { name = "qemu-1.4.0"; @@ -8,10 +9,16 @@ stdenv.mkDerivation rec { sha256 = "1a7d11vjs1p6i1ck2ff9annmkhpkbjl73hl9i1cbg3s0fznrfqh6"; }; - buildInputs = [ python zlib pkgconfig glib SDL ncurses perl pixman ]; + buildInputs = [ + python zlib pkgconfig glib SDL ncurses perl pixman attr libcap + ]; enableParallelBuilding = true; + configureFlags = [ + "--enable-virtfs" + ]; + meta = { description = "QEmu processor emulator"; license = "GPLv2+"; diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 3dd020dfa105..6ca2c66a35ac 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -11,8 +11,7 @@ with stdenv.lib; let - version = "4.2.12"; - extpackRevision = "84980"; + version = "4.2.14"; # changes ./guest-additions as well forEachModule = action: '' for mod in \ @@ -31,12 +30,10 @@ let done ''; - extensionPack = requireFile { - name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}" - + ".vbox-extpack"; + extensionPack = fetchurl { + url = "http://download.virtualbox.org/virtualbox/${version}/Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack"; # Has to be base16 because it's used as an input to VBoxExtPackHelperApp! - sha256 = "ad15a92e49095c2115bd1793b3b957d3eaf44af0f5d24bb53d6b4fc81c3e2fc4"; - url = "https://www.virtualbox.org/wiki/Downloads"; + sha256 = "5813cae72790de4893cadb839ffbd148290a44ec6913d901d84c9b3740ab1b1e"; }; in stdenv.mkDerivation { @@ -44,7 +41,7 @@ in stdenv.mkDerivation { src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; - sha256 = "eb65ecac94f63d6292a967d39cb5e28326404c10d0e8c2c50399eedb59c17ee6"; + sha256 = "038k65cdvr80da5nfan5r3rjrnxqab2fbf2pr2jq8g1gc4cxrxpq"; }; buildInputs = @@ -137,6 +134,8 @@ in stdenv.mkDerivation { done ''; + passthru = { inherit version; /* for guest additions */ }; + meta = { description = "PC emulator"; homepage = http://www.virtualbox.org/; diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index f3d7c18a2c69..e7843b07fc34 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -1,15 +1,18 @@ { stdenv, fetchurl, lib, patchelf, cdrkit, kernelDev, which, makeWrapper -, libX11, libXt, libXext, libXmu, libXcomposite, libXfixes, libXrandr, libXcursor -, dbus }: +, xorg, dbus, virtualbox }: -let version = "4.2.12"; in +let + version = virtualbox.version; + xserverVListFunc = builtins.elemAt (stdenv.lib.splitString "." xorg.xorgserver.version); + xserverABI = xserverVListFunc 0 + xserverVListFunc 1; +in stdenv.mkDerivation { name = "VirtualBox-GuestAdditions-${version}-${kernelDev.version}"; src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso"; - sha256 = "aed4730b643aca8daa0829e1122b7c8d592b9f6cea902a98e390c4d22373dfb8"; + sha256 = "9f08f13bbd818fb3ef9916658542ad0999c35e11afc1f6e8ff0b944405486e8a"; }; KERN_DIR = "${kernelDev}/lib/modules/*/build"; @@ -22,7 +25,7 @@ stdenv.mkDerivation { ''; - buildCommand = '' + buildCommand = with xorg; '' ${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run chmod 755 ./VBoxLinuxAdditions.run @@ -104,7 +107,7 @@ stdenv.mkDerivation { # Install Xorg drivers mkdir -p $out/lib/xorg/modules/{drivers,input} - install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_112.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so + install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_${xserverABI}.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so # Install kernel modules cd src diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix new file mode 100644 index 000000000000..2c1044d69372 --- /dev/null +++ b/pkgs/applications/window-managers/weston/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon +, cairo, libxcb, libXcursor, x11, udev, libdrm, mtdev +, libjpeg, pam, autoconf, automake, libtool }: + +let version = "1.0.5"; in + +stdenv.mkDerivation rec { + name = "weston-${version}"; + + src = fetchurl { + url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; + sha256 = "0g2k82pnlxl8b70ykazj7kn8xffjfsmgcgx427qdrm4083z2hgm0"; + }; + + buildInputs = [ pkgconfig wayland mesa libxkbcommon + cairo libxcb libXcursor x11 udev libdrm mtdev + libjpeg pam autoconf automake libtool ]; + + preConfigure = "autoreconf -vfi"; + + # prevent install target to chown root weston-launch, which fails + configureFlags = '' + --disable-setuid-install + ''; + + meta = { + description = "Reference implementation of a Wayland compositor"; + homepage = http://wayland.freedesktop.org/; + license = stdenv.lib.licenses.mit; + }; +} diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 6c981229531a..294d9a43ef7d 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation { urls = urls_; # If set, prefer the content-addressable mirrors - # (http://nixos.org/tarballs) over the original URLs. + # (http://tarballs.nixos.org) over the original URLs. preferHashedMirrors = true; # New-style output content requirements. diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index d6ad25afbadc..70a06735e68d 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -2,7 +2,7 @@ rec { # Content-addressable Nix mirrors. hashedMirrors = [ - http://nixos.org/tarballs + http://tarballs.nixos.org ]; # Mirrors for mirror://site/filename URIs, where "site" is diff --git a/pkgs/data/fonts/bakoma-ttf/default.nix b/pkgs/data/fonts/bakoma-ttf/default.nix index 5f9cbec7a97a..8b607adaaae8 100644 --- a/pkgs/data/fonts/bakoma-ttf/default.nix +++ b/pkgs/data/fonts/bakoma-ttf/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation { name = "bakoma-ttf"; src = fetchurl { - url = http://nixos.org/tarballs/bakoma-ttf.tar.bz2; + url = http://tarballs.nixos.org/bakoma-ttf.tar.bz2; sha256 = "1j1y3cq6ys30m734axc0brdm2q9n2as4h32jws15r7w5fwr991km"; }; diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix index 711ebc9e88fb..aafb9104e221 100644 --- a/pkgs/data/misc/cacert/default.nix +++ b/pkgs/data/misc/cacert/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "cacert-20121229"; src = fetchurl { - url = "http://nixos.org/tarballs/${name}.pem.bz2"; + url = "http://tarballs.nixos.org/${name}.pem.bz2"; sha256 = "031s86pqvn620zkj6w97hqgjvkp6vsvlymzz7rwvkv25zvrjsgif"; }; diff --git a/pkgs/data/misc/gsettings-desktop-schemas/default.nix b/pkgs/data/misc/gsettings-desktop-schemas/default.nix deleted file mode 100644 index c934863d75d7..000000000000 --- a/pkgs/data/misc/gsettings-desktop-schemas/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv, fetchurl, glib, pkgconfig, intltool }: - -stdenv.mkDerivation { - name = "gsettings-desktop-schemas-3.2.0"; - - src = fetchurl { - url = mirror://gnome/sources/gsettings-desktop-schemas/3.2/gsettings-desktop-schemas-3.2.0.tar.xz; - sha256 = "0772axkd1nlf3j1lcg0zi5x5jh4zmr25k98dhn7pzppahljaj3hi"; - }; - - buildInputs = [ glib ]; - nativeBuildInputs = [ pkgconfig intltool ]; - - meta = { - inherit (glib.meta) maintainers platforms; - }; -} diff --git a/pkgs/data/misc/poppler-data/default.nix b/pkgs/data/misc/poppler-data/default.nix index 14a41cf84fc9..9e2679c04380 100644 --- a/pkgs/data/misc/poppler-data/default.nix +++ b/pkgs/data/misc/poppler-data/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, cmake }: stdenv.mkDerivation rec { - name = "poppler-data-0.4.5"; + name = "poppler-data-0.4.6"; src = fetchurl { url = "http://poppler.freedesktop.org/${name}.tar.gz"; - sha256 = "1zbh1zd083wfwrcw7vxc2bn32h42y6iyh24syxcb3r5ggd2vr41i"; + sha256 = "1yhaz74b50hjkz3ii077kmq3qg3p3kdyxm33cv6r1njvz8fr01pk"; }; buildInputs = [ cmake ]; @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { homepage = http://poppler.freedesktop.org/; description = "Encoding files for Poppler, a PDF rendering library"; platforms = stdenv.lib.platforms.all; + license = "free"; # more free licenses combined maintainers = [ stdenv.lib.maintainers.urkud ]; }; } diff --git a/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix b/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix index c09ed74a97c0..1e2faf3af84f 100644 --- a/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix +++ b/pkgs/desktops/gnome-2/bindings/python-rsvg/default.nix @@ -1,24 +1,26 @@ -{ stdenv, fetchurl, gnome, librsvg, pkgconfig, pygtk, python }: +{ stdenv, fetchurl, gnome, librsvg, pkgconfig, pygtk, python, gtk }: stdenv.mkDerivation rec { - version = "2.32"; + ver_maj = "2.32"; + ver_min = "0"; + version = "${ver_maj}.${ver_min}"; name = "python-rsvg-${version}"; src = fetchurl { - url = "mirror://gnome/sources/gnome-python-desktop/${version}/gnome-python-desktop-${version}.0.tar.gz"; - sha256 = "1xhh3h1qdnimydvv55pmqwyzjchhjwfvp951sjlq0180kskqrlj5"; + url = "mirror://gnome/sources/gnome-python-desktop/${ver_maj}/gnome-python-desktop-${version}.tar.bz2"; + sha256 = "1s8f9rns9v7qlwjv9qh9lr8crp88dpzfm45hj47zc3ivpy0dbnq9"; }; configurePhase = '' - sed -e "s@{PYTHONDIR}/gtk-2.0@{PYTHONDIR}/@" -i rsvg/wscript - python waf configure --enable-modules=rsvg --prefix=$out + sed -e "s@{PYTHONDIR}/gtk-2.0@{PYTHONDIR}/@" -i rsvg/wscript + python waf configure --enable-modules=rsvg --prefix=$out ''; buildPhase = "python waf build"; installPhase = "python waf install"; - buildInputs = [ gnome.gnome_python librsvg pkgconfig pygtk python ]; + buildInputs = [ gtk gnome.gnome_python librsvg pkgconfig pygtk python ]; meta = with stdenv.lib; { homepage = "http://www.pygtk.org"; diff --git a/pkgs/desktops/gnome-2/default.nix b/pkgs/desktops/gnome-2/default.nix index 38ae4c015342..3d76ba72daeb 100644 --- a/pkgs/desktops/gnome-2/default.nix +++ b/pkgs/desktops/gnome-2/default.nix @@ -29,8 +29,6 @@ libgtkhtml = callPackage ./platform/libgtkhtml { }; - intltool = callPackage ./platform/intltool { }; - GConf = callPackage ./platform/GConf { }; gconfmm = callPackage ./platform/gconfmm { }; diff --git a/pkgs/desktops/gnome-2/platform/ORBit2/default.nix b/pkgs/desktops/gnome-2/platform/ORBit2/default.nix index ec6931724bc2..22c22c6bcf50 100644 --- a/pkgs/desktops/gnome-2/platform/ORBit2/default.nix +++ b/pkgs/desktops/gnome-2/platform/ORBit2/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam"; }; + preBuild = '' + sed 's/-DG_DISABLE_DEPRECATED//' -i linc2/src/Makefile + ''; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ glib libIDL ]; } diff --git a/pkgs/desktops/gnome-2/platform/gnome-vfs/default.nix b/pkgs/desktops/gnome-2/platform/gnome-vfs/default.nix index 0215b341f934..55daa496afc7 100644 --- a/pkgs/desktops/gnome-2/platform/gnome-vfs/default.nix +++ b/pkgs/desktops/gnome-2/platform/gnome-vfs/default.nix @@ -16,4 +16,6 @@ stdenv.mkDerivation rec { ]; propagatedBuildInputs = [ GConf glib ]; + + postPatch = "find . -name Makefile.in | xargs sed 's/-DG_DISABLE_DEPRECATED//g' -i "; } diff --git a/pkgs/desktops/gnome-2/platform/gtkglext/default.nix b/pkgs/desktops/gnome-2/platform/gtkglext/default.nix index 4eab4b8213c6..903387f50b14 100644 --- a/pkgs/desktops/gnome-2/platform/gtkglext/default.nix +++ b/pkgs/desktops/gnome-2/platform/gtkglext/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gtk, mesa, pango }: +{ stdenv, fetchurl, pkgconfig, glib, gtk, mesa, pango, pangox_compat, xlibs }: stdenv.mkDerivation rec { name = "gtkglext-1.2.0"; @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0lbz96jwz57hnn52b8rfj54inwpwcc9fkdq6ya043cgnfih77g8n"; }; - buildInputs = [ pkgconfig gtk mesa pango ]; + buildInputs = with xlibs; + [ pkgconfig glib gtk mesa pango pangox_compat libX11 libXmu ]; # The library uses `GTK_WIDGET_REALIZED', `GTK_WIDGET_TOPLEVEL', and # `GTK_WIDGET_NO_WINDOW', all of which appear to be deprecated nowadays. diff --git a/pkgs/desktops/gnome-2/platform/intltool/default.nix b/pkgs/desktops/gnome-2/platform/intltool/default.nix deleted file mode 100644 index 51eaa4a2cf48..000000000000 --- a/pkgs/desktops/gnome-2/platform/intltool/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, fetchurl, pkgconfig, perl, perlXMLParser, gettext}: - -stdenv.mkDerivation rec { - name = "intltool-0.40.6"; - - src = fetchurl { - url = mirror://gnome/sources/intltool/0.40/intltool-0.40.6.tar.bz2; - sha256 = "0r1vkvy5xzqk01yl6a0xlrry39bra24alkrx6279b77hc62my7jd"; - }; - - buildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ perl perlXMLParser gettext ]; -} diff --git a/pkgs/desktops/gnome-2/platform/libbonobo/default.nix b/pkgs/desktops/gnome-2/platform/libbonobo/default.nix index 79c41f924d3f..2303fb15a6f1 100644 --- a/pkgs/desktops/gnome-2/platform/libbonobo/default.nix +++ b/pkgs/desktops/gnome-2/platform/libbonobo/default.nix @@ -10,7 +10,9 @@ stdenv.mkDerivation rec { sha256 = "0swp4kk6x7hy1rvd1f9jba31lvfc6qvafkvbpg9h0r34fzrd8q4i"; }; - preConfigure = "export USER=`whoami`"; + preConfigure = # still using stuff deprecated in new glib versions + "sed 's/-DG_DISABLE_DEPRECATED//g' -i configure activation-server/Makefile.in"; + nativeBuildInputs = [ flex bison pkgconfig intltool procps ]; buildInputs = [ libxml2 ]; propagatedBuildInputs = [ popt glib ORBit2 ]; diff --git a/pkgs/desktops/gnome-2/platform/libgnome/default.nix b/pkgs/desktops/gnome-2/platform/libgnome/default.nix index 37dbfd129611..5ab6d5e813d6 100644 --- a/pkgs/desktops/gnome-2/platform/libgnome/default.nix +++ b/pkgs/desktops/gnome-2/platform/libgnome/default.nix @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { major = "2"; minor = "32"; patchlevel = "1"; sha256 = "197pnq8y0knqjhm2fg4j6hbqqm3qfzfnd0irhwxpk1b4hqb3kimj"; }; - + + patches = [ ./new-glib.patch ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ popt zlib intltool GConf gnome_vfs libcanberra libtool ]; propagatedBuildInputs = [ glib libbonobo ]; diff --git a/pkgs/desktops/gnome-2/platform/libgnome/new-glib.patch b/pkgs/desktops/gnome-2/platform/libgnome/new-glib.patch new file mode 100644 index 000000000000..ceabfbdd158e --- /dev/null +++ b/pkgs/desktops/gnome-2/platform/libgnome/new-glib.patch @@ -0,0 +1,65 @@ +Porting libgnome to newer glib: + * remove g_thread_init and g_thread_supported, which are longer needed + https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#g-thread-init + * replace GStaticRecMutex by GRecMutex + https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#GStaticRecMutex + +diff --git a/libgnome/gnome-i18n.c b/libgnome/gnome-i18n.c +index 531c56c..f13d61e 100644 +--- a/libgnome/gnome-i18n.c ++++ b/libgnome/gnome-i18n.c +@@ -55,12 +55,14 @@ + const GList * + gnome_i18n_get_language_list (const gchar *ignored) + { +- static GStaticRecMutex lang_list_lock = G_STATIC_REC_MUTEX_INIT; ++ static GRecMutex lang_list_lock; ++ g_rec_mutex_init (&lang_list_lock); ++ + static GList *list = NULL; + const char * const* langs; + int i; + +- g_static_rec_mutex_lock (&lang_list_lock); ++ g_rec_mutex_lock (&lang_list_lock); + + if (list == NULL) { + langs = g_get_language_names (); +@@ -71,7 +73,7 @@ gnome_i18n_get_language_list (const gchar *ignored) + list = g_list_reverse (list); + } + +- g_static_rec_mutex_unlock (&lang_list_lock); ++ g_rec_mutex_unlock (&lang_list_lock); + + return list; + } +diff --git a/libgnome/gnome-init.c b/libgnome/gnome-init.c +index fe3efd4..c6619af 100644 +--- a/libgnome/gnome-init.c ++++ b/libgnome/gnome-init.c +@@ -115,9 +115,6 @@ gnome_bonobo_module_info_get (void) + static void + bonobo_activation_pre_args_parse (GnomeProgram *program, GnomeModuleInfo *mod_info) + { +- if (!g_thread_supported ()) +- g_thread_init (NULL); +- + if (!bonobo_activation_is_initialized ()) + bonobo_activation_preinit (program, mod_info); + } +diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c +index 739765e..cd14999 100644 +--- a/libgnome/gnome-program.c ++++ b/libgnome/gnome-program.c +@@ -1878,10 +1878,6 @@ gnome_program_init (const char *app_id, const char *app_version, + GnomeProgram *program; + va_list args; + +- /* g_thread_init() has to be the first GLib function called ever */ +- if (!g_threads_got_initialized) +- g_thread_init (NULL); +- + g_type_init (); + + va_start(args, first_property_name); diff --git a/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix b/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix index 0b6d3e25e2e7..390059089fc0 100644 --- a/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix +++ b/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix @@ -14,4 +14,8 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig gtk gettext intltool libart_lgpl libgnomecups bison flex ]; propagatedBuildInputs = [ libxml2 ]; + + meta = with stdenv.lib; { + platforms = platforms.linux; + }; } diff --git a/pkgs/desktops/gnome-3/core/at-spi2-atk/default.nix b/pkgs/desktops/gnome-3/core/at-spi2-atk/default.nix new file mode 100644 index 000000000000..948774572670 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/at-spi2-atk/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, python, pkgconfig, popt, atk, libX11, libICE, xlibs, libXi +, intltool, dbus_glib, at_spi2_core, libSM }: + +stdenv.mkDerivation rec { + versionMajor = "2.8"; + versionMinor = "0"; + moduleName = "at-spi2-atk"; + name = "${moduleName}-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; + sha256 = "085sqww174vl3i9ccb477v706rkjs2d107rl96ma1kbl2jyar226"; + }; + + buildInputs = [ python pkgconfig popt atk libX11 libICE xlibs.libXtst libXi + intltool dbus_glib at_spi2_core libSM ]; +} diff --git a/pkgs/desktops/gnome-3/core/at-spi2-core/default.nix b/pkgs/desktops/gnome-3/core/at-spi2-core/default.nix new file mode 100644 index 000000000000..2d433486677a --- /dev/null +++ b/pkgs/desktops/gnome-3/core/at-spi2-core/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, python, pkgconfig, popt, intltool, dbus_glib +, libX11, xextproto, libSM, libICE, libXtst, libXi }: + +stdenv.mkDerivation rec { + + versionMajor = "2.8"; + versionMinor = "0"; + moduleName = "at-spi2-core"; + name = "${moduleName}-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; + sha256 = "0n64h6j10sn90ds9y70d9wlvvsbwnrym9fm0cyjxb0zmqw7s6q8q"; + }; + + buildInputs = [ + python pkgconfig popt intltool dbus_glib + libX11 xextproto libSM libICE libXtst libXi + ]; + + # ToDo: on non-NixOS we create a symlink from there? + configureFlags = "--with-dbus-daemondir=/run/current-system/sw/bin/"; +} diff --git a/pkgs/desktops/gnome-3/core/evince/default.nix b/pkgs/desktops/gnome-3/core/evince/default.nix new file mode 100644 index 000000000000..de49bffc419e --- /dev/null +++ b/pkgs/desktops/gnome-3/core/evince/default.nix @@ -0,0 +1,62 @@ +{ fetchurl, stdenv, pkgconfig, intltool, perl, perlXMLParser, libxml2 +, glib, gtk3, pango, atk, gdk_pixbuf, shared_mime_info +, itstool, gnome_icon_theme, libgnome_keyring, gsettings_desktop_schemas +, poppler, ghostscriptX, djvulibre, libspectre +, makeWrapper #, python /*just for tests*/ +, recentListSize ? null # 5 is not enough, allow passing a different number +}: + +stdenv.mkDerivation rec { + name = "evince-3.6.1"; + + src = fetchurl { + url = "http://ftp.gnome.org/pub/GNOME/sources/evince/3.6/${name}.tar.xz"; + sha256 = "1da1pij030dh8mb0pr0jnyszgsbjnh8lc17rj5ii52j3kmbv51qv"; + }; + + buildInputs = [ + pkgconfig intltool perl perlXMLParser libxml2 + glib gtk3 pango atk gdk_pixbuf + itstool gnome_icon_theme libgnome_keyring gsettings_desktop_schemas + poppler ghostscriptX djvulibre libspectre + makeWrapper + ]; + + configureFlags = [ + "--disable-nautilus" # Do not use nautilus + "--disable-dbus" # strange compilation error + ]; + + preConfigure = with stdenv.lib; + optionalString doCheck '' + for file in test/*.py; do + echo "patching $file" + sed '1s,/usr,${python},' -i "$file" + done + '' + optionalString (recentListSize != null) '' + sed -i 's/\(gtk_recent_chooser_set_limit .*\)5)/\1${builtins.toString recentListSize})/' shell/ev-open-recent-action.c + sed -i 's/\(if (++n_items == \)5\(.*\)/\1${builtins.toString recentListSize}\2/' shell/ev-window.c + ''; + + postInstall = '' + # Tell Glib/GIO about the MIME info directory, which is used + # by `g_file_info_get_content_type ()'. + wrapProgram "$out/bin/evince" \ + --prefix XDG_DATA_DIRS : "${shared_mime_info}/share:$out/share" + '' + gsettings_desktop_schemas.doCompileSchemas; + doCheck = false; # would need pythonPackages.dogTail, which is missing + + meta = { + homepage = http://www.gnome.org/projects/evince/; + description = "GNOME's document viewer"; + + longDescription = '' + Evince is a document viewer for multiple document formats. It + currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal + of Evince is to replace the multiple document viewers that exist + on the GNOME Desktop with a single simple application. + ''; + + license = "GPLv2+"; + }; +} diff --git a/pkgs/desktops/gnome-3/core/gconf/default.nix b/pkgs/desktops/gnome-3/core/gconf/default.nix new file mode 100644 index 000000000000..9ca9c227d586 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gconf/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, dbus_glib, gtk, glib, libxml2 +, intltool, polkit, orbit }: + +stdenv.mkDerivation rec { + + versionMajor = "3.2"; + versionMinor = "5"; + moduleName = "GConf"; + + origName = "${moduleName}-${versionMajor}.${versionMinor}"; + + name = "gconf-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${origName}.tar.xz"; + sha256 = "1ijqks0jxc4dyfxg4vnbqds4aj6miyahlsmlqlkf2bi1798akpjd"; + }; + + buildInputs = [ libxml2 polkit gtk orbit ]; + propagatedBuildInputs = [ glib dbus_glib ]; + nativeBuildInputs = [ pkgconfig intltool ]; + + # ToDo: ldap reported as not found but afterwards reported as supported + + meta = { + homepage = http://projects.gnome.org/gconf/; + description = "A system for storing application preferences"; + }; +} diff --git a/pkgs/desktops/gnome-3/core/gcr/default.nix b/pkgs/desktops/gnome-3/core/gcr/default.nix new file mode 100644 index 000000000000..cf9774c5511c --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gcr/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, pkgconfig, intltool, gnupg, p11_kit, glib +, libgcrypt, libtasn1, dbus_glib, gtk, pango, gdk_pixbuf, atk }: + +stdenv.mkDerivation rec { + name = "gcr-3.6.2"; + + src = fetchurl { + url = "mirror://gnome/sources/gcr/3.6/${name}.tar.xz"; + sha256 = "16xyqxv2hxl3a4m8ahilqcf1ps58w1ijh8dav1l5nqz36ljdn2gp"; + }; + + buildInputs = [ + pkgconfig intltool gnupg p11_kit glib + libgcrypt libtasn1 dbus_glib gtk pango gdk_pixbuf atk + ]; + + #doCheck = true; +} diff --git a/pkgs/desktops/gnome-3/core/gnome-icon-theme/default.nix b/pkgs/desktops/gnome-3/core/gnome-icon-theme/default.nix new file mode 100644 index 000000000000..303bcd2208ce --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-icon-theme/default.nix @@ -0,0 +1,12 @@ +{ stdenv, fetchurl, pkgconfig, intltool, iconnamingutils, gtk }: + +stdenv.mkDerivation rec { + name = "gnome-icon-theme-3.6.2"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-icon-theme/3.6/${name}.tar.xz"; + sha256 = "0i8hkx2c1g5ckrvbkvs9n47i8fby8p9xs6p5l0mxdx9aq4smak9i"; + }; + + nativeBuildInputs = [ pkgconfig intltool iconnamingutils gtk ]; +} diff --git a/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix new file mode 100644 index 000000000000..5983b74c0f45 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, pkgconfig, dbus, libgcrypt, libtasn1, pam, python, glib +, gtk3, intltool, gconf, libgnome_keyring, pango, gcr, gdk_pixbuf, atk, p11_kit }: + +stdenv.mkDerivation rec { + name = "gnome-keyring-3.6.2"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-keyring/3.6/${name}.tar.xz"; + sha256 = "1mhc2c0qswfjqi2spdvh19b7npfkjf1k40q6v7fja4qpc26maq5f"; + }; + + buildInputs = [ + dbus libgcrypt pam python gtk3 gconf libgnome_keyring + pango gcr gdk_pixbuf atk p11_kit + ]; + + propagatedBuildInputs = [ glib libtasn1 ]; + + nativeBuildInputs = [ pkgconfig intltool ]; + + configureFlags = [ + "--with-ca-certificates=/etc/ssl/certs/ca-bundle.crt" # NixOS hardcoded path + "--with-pkcs11-config=$$out/etc/pkcs11/" # installation directories + "--with-pkcs11-modules=$$out/lib/pkcs11/" + ]; +} diff --git a/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix new file mode 100644 index 000000000000..41fdcc8086b1 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, pkgconfig, cairo, libxml2, libxslt, gnome3, pango +, gnome_doc_utils, intltool, libX11, which, gconf }: + +stdenv.mkDerivation rec { + + versionMajor = "3.4"; + versionMinor = "1.1"; + + name = "gnome-terminal-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-terminal/${versionMajor}/${name}.tar.xz"; + sha256 = "1p9zqjmkxryf2kyghhhwwpsh4kd8y1jzzwc9zxghmpxszi9a5m0l"; + }; + + configureFlags = "--disable-scrollkeeper"; + buildInputs = [ gnome3.gtk gnome3.gsettings_desktop_schemas gnome3.vte gconf ]; + + nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which ]; +} diff --git a/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix b/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix new file mode 100644 index 000000000000..9c13539a1cc6 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, pkgconfig, intltool, glib + # just for passthru +, gtk3, gsettings_desktop_schemas }: + +stdenv.mkDerivation rec { + + versionMajor = "3.6"; + versionMinor = "1"; + moduleName = "gsettings-desktop-schemas"; + + name = "${moduleName}-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; + sha256 = "1rk71q2rky9nzy0zb5jsvxa62vhg7dk65kdgdifq8s761797ga6r"; + }; + + buildInputs = [ glib ]; + + nativeBuildInputs = [ pkgconfig intltool ]; + + passthru = { + doCompileSchemas = '' + for pkg in "${gsettings_desktop_schemas}" "${gtk3}"; do + cp -s $pkg/share/glib-2.0/schemas/*.gschema.xml $out/share/glib-2.0/schemas/ + done + ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/ + ''; + }; +} diff --git a/pkgs/desktops/gnome-3/core/gvfs/default.nix b/pkgs/desktops/gnome-3/core/gvfs/default.nix new file mode 100644 index 000000000000..1eea518c4b7f --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gvfs/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, pkgconfig, dbus_libs, samba, libarchive, fuse, libgphoto2 +, libcdio, libxml2, libtool, glib, intltool, gconf, libgnome_keyring, libsoup +, udev, avahi, libxslt, docbook_xsl }: + +stdenv.mkDerivation rec { + name = "gvfs-1.14.2"; + + src = fetchurl { + url = "mirror://gnome/sources/gvfs/1.14/${name}.tar.xz"; + sha256 = "1g4ghyf45jg2ajdkv2d972hbckyjh3d9jdrppai85pl9pk2dmfy3"; + }; + + buildInputs = + [ glib dbus_libs udev samba libarchive fuse libgphoto2 libcdio libxml2 gconf + libgnome_keyring libsoup avahi libtool libxslt docbook_xsl + ]; + + nativeBuildInputs = [ pkgconfig intltool ]; + + enableParallelBuilding = true; +} diff --git a/pkgs/desktops/gnome-3/core/libcroco/default.nix b/pkgs/desktops/gnome-3/core/libcroco/default.nix new file mode 100644 index 000000000000..70c1db8c0275 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/libcroco/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, pkgconfig, libxml2, glib}: + +stdenv.mkDerivation rec { + name = "libcroco-0.6.6"; # 3.6.2 release + + src = fetchurl { + url = "mirror://gnome/sources/libcroco/0.6/${name}.tar.xz"; + sha256 = "1nbb12420v1zacn6jwa1x4ixikkcqw66sg4j5dgs45nhygiarv3j"; + }; + buildInputs = [ pkgconfig libxml2 glib ]; +} diff --git a/pkgs/desktops/gnome-3/core/libgnome-keyring/default.nix b/pkgs/desktops/gnome-3/core/libgnome-keyring/default.nix new file mode 100644 index 000000000000..a5d196ae1e32 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/libgnome-keyring/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, glib, dbus_libs, libgcrypt, pkgconfig, intltool }: + +stdenv.mkDerivation rec { + name = "libgnome-keyring-3.6.0"; + + src = fetchurl { + url = "mirror://gnome/sources/libgnome-keyring/3.6/${name}.tar.xz"; + sha256 = "0c4qrjpmv1hqga3xv6wsq2z10x2n78qgw7q3k3s01y1pggxkgjkd"; + }; + + propagatedBuildInputs = [ glib dbus_libs libgcrypt ]; + nativeBuildInputs = [ pkgconfig intltool ]; + + meta = { + inherit (glib.meta) platforms maintainers; + }; +} diff --git a/pkgs/desktops/gnome-3/core/libgweather/default.nix b/pkgs/desktops/gnome-3/core/libgweather/default.nix new file mode 100644 index 000000000000..78ae94c1a33a --- /dev/null +++ b/pkgs/desktops/gnome-3/core/libgweather/default.nix @@ -0,0 +1,14 @@ +{ stdenv, fetchurl, pkgconfig, libxml2, gtk, intltool, libsoup, gconf +, pango, gdk_pixbuf, atk }: + +stdenv.mkDerivation rec { + name = "libgweather-3.6.2"; + + src = fetchurl { + url = "mirror://gnome/sources/libgweather/3.6/${name}.tar.xz"; + sha256 = "1c50m0zrnfh4g58rzf33dfw8ggslj38c61p8a75905bmj3rfyahg"; + }; + configureFlags = if stdenv ? glibc then "--with-zoneinfo-dir=${stdenv.glibc}/share/zoneinfo" else ""; + propagatedBuildInputs = [ libxml2 gtk libsoup gconf pango gdk_pixbuf atk ]; + nativeBuildInputs = [ pkgconfig intltool ]; +} diff --git a/pkgs/desktops/gnome-3/core/vte/default.nix b/pkgs/desktops/gnome-3/core/vte/default.nix new file mode 100644 index 000000000000..ffc3aab87064 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/vte/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, intltool, pkgconfig, gnome3, ncurses +, pythonSupport ? false, python, pygtk}: + +stdenv.mkDerivation rec { + + versionMajor = "0.32"; + versionMinor = "2"; + moduleName = "vte"; + + name = "${moduleName}-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz"; + sha256 = "0sj837b9ib36gx00hzdinv23f7w91fd5mcw1p6wdi053yxqw17nn"; + }; + + buildInputs = [ intltool pkgconfig gnome3.glib gnome3.gtk ncurses ] ++ + stdenv.lib.optionals pythonSupport [python pygtk]; + + configureFlags = '' + ${if pythonSupport then "--enable-python" else "--disable-python"} + ''; + + postInstall = stdenv.lib.optionalString pythonSupport '' + cd $(toPythonPath $out)/gtk-2.0 + for n in *; do + ln -s "gtk-2.0/$n" "../$n" + done + ''; + + meta = { + homepage = http://www.gnome.org/; + description = "A library implementing a terminal emulator widget for GTK+"; + longDescription = '' + VTE is a library (libvte) implementing a terminal emulator widget for + GTK+, and a minimal sample application (vte) using that. Vte is + mainly used in gnome-terminal, but can also be used to embed a + console/terminal in games, editors, IDEs, etc. VTE supports Unicode and + character set conversion, as well as emulating any terminal known to + the system's terminfo database. + ''; + license = "LGPLv2"; + maintainers = with stdenv.lib.maintainers; [ astsmtl antono ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/desktops/gnome-3/core/zenity/default.nix b/pkgs/desktops/gnome-3/core/zenity/default.nix new file mode 100644 index 000000000000..18b91d4f61e8 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/zenity/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, pkgconfig, cairo, libxml2, libxslt, gnome3, pango +, gnome_doc_utils, intltool, libX11, which }: + +stdenv.mkDerivation rec { + + versionMajor = "3.4"; + versionMinor = "0"; + + name = "zenity-${versionMajor}.${versionMinor}"; + + src = fetchurl { + url = "mirror://gnome/sources/zenity/${versionMajor}/zenity-${versionMajor}.${versionMinor}.tar.xz"; + sha256 = "1bqbfcvd3kj2xk15fvbcdaqvyg9qvymlhn8cwvg5m6v4gicniw2w"; + }; + + configureFlags = "--disable-scrollkeeper"; + buildInputs = [ gnome3.gtk libxml2 libxslt libX11 ]; + + nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which ]; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix new file mode 100644 index 000000000000..5d517da82b39 --- /dev/null +++ b/pkgs/desktops/gnome-3/default.nix @@ -0,0 +1,55 @@ +{ callPackage, lib, self, stdenv, gettext, overrides ? {}, pkgs }: + +rec { + inherit (pkgs) fetchurl_gnome glib gtk3 atk pango; + gtk = gtk3; + orbit = pkgs.gnome2.ORBit2; + + inherit (lib) lowPrio hiPrio appendToName makeOverridable; + + __overrides = overrides; + +#### Core (http://ftp.acc.umu.se/pub/GNOME/core/) + + at_spi2_atk = lib.lowPrio (callPackage ./core/at-spi2-atk { }); + + at_spi2_core = callPackage ./core/at-spi2-core { }; + + evince = callPackage ./core/evince { }; # ToDo: dbus would prevent compilation, enable tests + + gconf = callPackage ./core/gconf { }; + + gcr = callPackage ./core/gcr { }; # ToDo: tests fail + + gnome_icon_theme = callPackage ./core/gnome-icon-theme { }; + + gnome_keyring = callPackage ./core/gnome-keyring { }; + libgnome_keyring = callPackage ./core/libgnome-keyring { }; + + gnome_terminal = callPackage ./core/gnome-terminal { }; + + gsettings_desktop_schemas = lib.lowPrio (callPackage ./core/gsettings-desktop-schemas { }); + + gvfs = callPackage ./core/gvfs { }; + + libcroco = callPackage ./core/libcroco {}; + + libgweather = callPackage ./core/libgweather { }; + + vte = callPackage ./core/vte { }; + + zenity = callPackage ./core/zenity { }; + +#### Apps (http://ftp.acc.umu.se/pub/GNOME/apps/) + + gnome_dictionary = callPackage ./desktop/gnome-dictionary { }; + + gnome_desktop = callPackage ./desktop/gnome-desktop { }; + + # Removed from recent GNOME releases, but still required + scrollkeeper = callPackage ./desktop/scrollkeeper { }; + + # scrollkeeper replacement + rarian = callPackage ./desktop/rarian { }; + +} diff --git a/pkgs/desktops/gnome-3/desktop/gnome-desktop/default.nix b/pkgs/desktops/gnome-3/desktop/gnome-desktop/default.nix new file mode 100644 index 000000000000..4d22f6ad7466 --- /dev/null +++ b/pkgs/desktops/gnome-3/desktop/gnome-desktop/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, pkgconfig, python, libxml2Python, libxslt, which, libX11, gnome3 +, intltool, gnome_doc_utils}: + +stdenv.mkDerivation rec { + + majorVersion = "3.5"; + minorVersion = "3"; + name = "gnome-desktop-${majorVersion}.${minorVersion}"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-desktop/${majorVersion}/${name}.tar.xz"; + sha256 = "1nrqcp1p5cxhfjjy5hjpvkqmzsgl2353a08fg0b11c932v95bsba"; + }; + + configureFlags = "--disable-scrollkeeper"; + buildInputs = [ pkgconfig python libxml2Python libxslt which libX11 + gnome3.gtk gnome3.glib intltool gnome_doc_utils ]; +} diff --git a/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix new file mode 100644 index 000000000000..7a1ab5b1505a --- /dev/null +++ b/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl, pkgconfig, gnome3, gnome_doc_utils, intltool, which +, libxml2, libxslt }: + +stdenv.mkDerivation rec { + version = "3.5.2"; + name = "gnome-dictionary-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-dictionary/3.5/${name}.tar.xz"; + sha256 = "1cq32csxn27vir5nlixx337ym2nal9ykq3s1j7yynh2adh4m0jil"; + }; + + buildInputs = [ gnome3.gtk ]; + nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which libxml2 libxslt gnome3.scrollkeeper ]; +} diff --git a/pkgs/desktops/gnome-3/desktop/rarian/default.nix b/pkgs/desktops/gnome-3/desktop/rarian/default.nix new file mode 100644 index 000000000000..77a2b710f447 --- /dev/null +++ b/pkgs/desktops/gnome-3/desktop/rarian/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, pkgconfig, perl, perlXMLParser, libxml2, libxslt, docbook_xml_dtd_42}: + +stdenv.mkDerivation rec { + name = "rarian-0.8.1"; + src = fetchurl { + url = "mirror://gnome/sources/rarian/0.8/${name}.tar.bz2"; + sha256 = "aafe886d46e467eb3414e91fa9e42955bd4b618c3e19c42c773026b205a84577"; + }; + buildInputs = [pkgconfig perl perlXMLParser libxml2 libxslt]; + configureFlags = "--with-xml-catalog=${docbook_xml_dtd_42}/xml/dtd/docbook/docbook.cat"; +} diff --git a/pkgs/desktops/gnome-3/desktop/scrollkeeper/default.nix b/pkgs/desktops/gnome-3/desktop/scrollkeeper/default.nix new file mode 100644 index 000000000000..97dcbf4e0041 --- /dev/null +++ b/pkgs/desktops/gnome-3/desktop/scrollkeeper/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl, pkgconfig, perl, perlXMLParser, libxml2, libxslt, docbook_xml_dtd_42, automake}: + +stdenv.mkDerivation { + name = "scrollkeeper-0.3.14"; + src = fetchurl { + url = mirror://gnome/sources/scrollkeeper/0.3/scrollkeeper-0.3.14.tar.bz2; + sha256 = "08n1xgj1f53zahwm0wpn3jid3rfbhi3iwby0ilaaldnid5qriqgc"; + }; + + # The fuloong2f is not supported by scrollkeeper-0.3.14 config.guess + preConfigure = " + substituteInPlace extract/dtds/Makefile.am --replace /usr/bin/xmlcatalog xmlcatalog + cp ${automake}/share/automake*/config.{sub,guess} . + "; + + buildInputs = [pkgconfig perl perlXMLParser libxml2 libxslt]; + configureFlags = "--with-xml-catalog=${docbook_xml_dtd_42}/xml/dtd/docbook/docbook.cat"; +} diff --git a/pkgs/desktops/kde-4.10/kdepimlibs.nix b/pkgs/desktops/kde-4.10/kdepimlibs.nix index c9813b19f521..7ec1612b1e5f 100644 --- a/pkgs/desktops/kde-4.10/kdepimlibs.nix +++ b/pkgs/desktops/kde-4.10/kdepimlibs.nix @@ -1,8 +1,10 @@ -{ kde, boost, cyrus_sasl, gpgme, libical, openldap, shared_mime_info +{ kde, pkgconfig, boost, cyrus_sasl, gpgme, libical, openldap, shared_mime_info , kdelibs, akonadi, libxslt, prison, nepomuk_core , shared_desktop_ontologies, qjson }: kde { + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ boost gpgme libical libxslt qjson openldap cyrus_sasl akonadi shared_desktop_ontologies diff --git a/pkgs/desktops/xfce/4_08.nix b/pkgs/desktops/xfce/4_08.nix new file mode 100644 index 000000000000..d29e3ac51ef0 --- /dev/null +++ b/pkgs/desktops/xfce/4_08.nix @@ -0,0 +1,37 @@ +{ pkgs, newScope }: let + +common = (import ./common.nix) { inherit pkgs newScope xfce_self; }; +callPackage = common.callPackage; + +xfce_self = common.xfce_common // rec { # the lines are very long but it seems better than the even-odd line approach + + #### CORE + + exo = callPackage ./core/exo.nix { v= "0.6.2"; h= "0f8zh5y057l7xffskjvky6k88hrnz6jyk35mvlfpmx26anlgd77l"; }; + libxfce4ui = callPackage ./core/libxfce4ui.nix { v= "4.8.1"; h= "0mlrcr8rqmv047xrb2dbh7f4knsppb1anx2b05s015h6v8lyvjrr"; }; + libxfce4util = callPackage ./core/libxfce4util.nix { v= "4.8.2"; h= "05n8586h2fwkibfld5fm4ygx1w66jnbqqb3li0ardjvm2n24k885"; }; + libxfcegui4 = callPackage ./core/libxfcegui4.nix { v= "4.8.1"; h= "0hr4h6a9p6w3qw1976p8v9c9pwhd9zhrjlbaph0p7nyz7j1836ih"; }; + thunar = callPackage ./core/thunar.nix { v= "1.2.3"; h= "19mczys6xr683r68g3s2njrrmnk1p73zypvwrhajw859c6nsjsp6"; }; + xfce4panel = callPackage ./core/xfce4-panel.nix { v= "4.8.6"; h= "00zdkg1jg4n2n109nxan8ji2m06r9mc4lnlrvb55xvj229m2dwb6"; }; + xfce4session = callPackage ./core/xfce4-session.nix { v= "4.8.2"; h= "1l608kik98jxbjl73waf8515hzji06lr80qmky2qlnp0b6js5g1i"; }; + xfce4settings = callPackage ./core/xfce4-settings.nix { v= "4.8.3"; h= "0bmw0s6jp2ws4n0f3387zwsyv46b0w89m6r70yb7wrqy9r3wqy6q"; }; + xfceutils = callPackage ./core/xfce-utils.nix { v= "4.8.3"; h= "09mr0amp2f632q9i3vykaa0x5nrfihfm9v5nxsx9vch8wvbp0l03"; }; + xfconf = callPackage ./core/xfconf.nix { v= "4.8.1"; h= "1jwkb73xcgqfly449jwbn2afiyx50p150z60x19bicps75sp6q4q"; }; + xfdesktop = callPackage ./core/xfdesktop.nix { v= "4.8.3"; h= "097lc9djmay0jyyl42jmvcfda75ndp265nzn0aa3hv795bsn1175"; }; + xfwm4 = callPackage ./core/xfwm4.nix { v= "4.8.3"; h= "0zi2g1d2jdgw5armlk9xjh4ykmydy266gdba86nmhy951gm8n3hb"; }; + + xfce4_appfinder = callPackage ./core/xfce4-appfinder.nix { v= "4.8.0"; h= "0zy7i9x4qjchmyb8nfpb7m2ply5n2aq35p9wrhb8lpz4am1ihx7x"; }; + + #### APPLICATIONS + + terminal = null; # newer versions don't build with 4.8 + + # versions > 0.3* don't build with xfce-4.8.* + ristretto = callPackage ./applications/ristretto.nix { v= "0.3.7"; h= "19mzy159j4qhd7pd1b83gimxfdg3mwdab9lq9kk505d21r7iqc9b"; }; + + xfce4mixer = callPackage ./applications/xfce4-mixer.nix { v= "4.8.0"; h= "1aqgjxvck6hx26sk3n4n5avhv02vs523mfclcvjb3xnks3yli7wz"; }; + +}; # xfce_self + +in xfce_self + diff --git a/pkgs/desktops/xfce/4_10.nix b/pkgs/desktops/xfce/4_10.nix new file mode 100644 index 000000000000..3f846198e3f5 --- /dev/null +++ b/pkgs/desktops/xfce/4_10.nix @@ -0,0 +1,35 @@ +{ pkgs, newScope }: let + +common = (import ./common.nix) { inherit pkgs newScope xfce_self; }; +callPackage = common.callPackage; + +xfce_self = common.xfce_common // rec { # the lines are very long but it seems better than the even-odd line approach + + #### CORE + + exo = callPackage ./core/exo.nix { v= "0.10.2"; h= "1kknxiz703q4snmry65ajm26jwjslbgpzdal6bd090m3z25q51dk"; }; + libxfce4ui = callPackage ./core/libxfce4ui.nix { v= "4.10.0"; h= "1qm31s6568cz4c8rl9fsfq0xmf7pldxm0ki62gx1cpybihlgmfd2"; }; + libxfce4util = callPackage ./core/libxfce4util.nix { v= "4.10.0"; h= "13k0wwbbqvdmbj4xmk4nxdlgvrdgr5y6r3dk380mzfw053hzwy89"; }; + libxfcegui4 = callPackage ./core/libxfcegui4.nix { v= "4.10.0"; h= "0cs5im0ib0cmr1lhr5765yliqjfyxvk4kwy8h1l8bn3mj6bzk0ib"; }; + thunar = callPackage ./core/thunar.nix { v= "1.6.2"; h= "11dx38rvkfbp91pxrprymxhimsm90gvizp277x9s5rwnwcm1ggbx"; }; + xfce4panel = callPackage ./core/xfce4-panel.nix { v= "4.10.0"; h= "1f8903nx6ivzircl8d8s9zna4vjgfy0qhjk5d2x19g9bmycgj89k"; }; + xfce4session = callPackage ./core/xfce4-session.nix { v= "4.10.0"; h= "1kj65jkjhd0ysf0yxsf88wzpyv6n8i8qgd3gb502hf1x9jksk2mv"; }; + xfce4settings = callPackage ./core/xfce4-settings.nix { v= "4.10.0"; h= "0zppq747z9lrxyv5zrrvpalq7hb3gfhy9p7qbldisgv7m6dz0hq8"; }; + xfceutils = null; # removed in 4.10 + xfconf = callPackage ./core/xfconf.nix { v= "4.10.0"; h= "0xh520z0qh0ib0ijgnyrgii9h5d4pc53n6mx1chhyzfc86j1jlhp"; }; + xfdesktop = callPackage ./core/xfdesktop.nix { v= "4.10.0"; h= "0yrddj1lgk3xn4w340y89z7x2isks72ia36pka08kk2x8gpfcyl9"; }; + xfwm4 = callPackage ./core/xfwm4.nix { v= "4.10.0"; h= "170zzs7adj47srsi2cl723w9pl8k8awd7w1bpzxby7hj92zmf8s9"; }; + + xfce4_appfinder = callPackage ./core/xfce4-appfinder.nix { v= "4.9.4"; h= "12lgrbd1n50w9n8xkpai98s2aw8vmjasrgypc57sp0x0qafsqaxq"; }; + + #### APPLICATIONS + + ristretto = callPackage ./applications/ristretto.nix { v= "0.6.3"; h= "0y9d8w1plwp4vmxs44y8k8x15i0k0xln89k6jndhv6lf57g1cs1b"; }; + terminal = xfce4terminal; # it has changed its name + xfce4mixer = callPackage ./applications/xfce4-mixer.nix { v= "4.10.0"; h= "1pnsd00583l7p5d80rxbh58brzy3jnccwikbbbm730a33c08kid8"; }; + xfce4terminal = callPackage ./applications/terminal.nix { v= "0.6.1"; h= "1j6lpkq952mrl5p24y88f89wn9g0namvywhma639xxsswlkn8d31"; }; + +}; + +in xfce_self + diff --git a/pkgs/desktops/xfce/common.nix b/pkgs/desktops/xfce/common.nix new file mode 100644 index 000000000000..8be4ac09e145 --- /dev/null +++ b/pkgs/desktops/xfce/common.nix @@ -0,0 +1,72 @@ +{ pkgs, newScope, xfce_self }: rec { + + callPackage = newScope (deps // xfce_self); + + deps = rec { # xfce-global dependency overrides should be here + inherit (pkgs.gnome) libglade libwnck vte gtksourceview; + inherit (pkgs.perlPackages) URI; + + # The useful bits from ‘gnome-disk-utility’. + libgdu = callPackage ./support/libgdu.nix { }; + + # Gvfs is required by Thunar for the trash feature and for volume + # mounting. Should use the one from Gnome, but I don't want to mess + # with the Gnome packages (or pull in a zillion Gnome dependencies). + gvfs = callPackage ./support/gvfs.nix { }; + + # intelligent fetcher for Xfce + fetchXfce = rec { + generic = prepend : name : hash : + let lib = pkgs.lib; + p = builtins.parseDrvName name; + versions = lib.splitString "." p.version; + ver_maj = lib.concatStrings (lib.intersperse "." (lib.take 2 versions)); + name_low = lib.toLower p.name; + in pkgs.fetchurl { + url = "mirror://xfce/src/${prepend}/${name_low}/${ver_maj}/${name}.tar.bz2"; + sha256 = hash; + }; + core = generic "xfce"; + app = generic "apps"; + art = generic "art"; + }; + }; + + xfce_common = rec { + + inherit (deps) gvfs; # used by NixOS + + #### CORE + + garcon = callPackage ./core/garcon.nix { v= "0.2.0"; h= "0v7pkvxcayi86z4f173z5l7w270f3g369sa88z59w0y0p7ns7ph2"; }; + + # not used anymore TODO: really? Update to 2.99.2? + gtk_xfce_engine = callPackage ./core/gtk-xfce-engine.nix { }; + + # ToDo: segfaults after some work + tumbler = callPackage ./core/tumbler.nix { v= "0.1.27"; h= "0s9qj99b81asmlqa823nzykq8g6p9azcp2niak67y9bp52wv6q2c"; }; + + xfce4_power_manager = callPackage ./core/xfce4-power-manager.nix { v= "1.0.10"; h= "1w120k1sl4s459ijaxkqkba6g1p2sqrf9paljv05wj0wz12bpr40"; }; + + + #### APPLICATIONS + #TODO: correct links; more stuff + + xfce4notifyd = callPackage ./applications/xfce4-notifyd.nix { v= "0.2.2"; h= "0s4ilc36sl5k5mg5727rmqims1l3dy5pwg6dk93wyjqnqbgnhvmn"; }; + gigolo = callPackage ./applications/gigolo.nix { v= "0.4.1"; h= "1y8p9bbv1a4qgbxl4vn6zbag3gb7gl8qj75cmhgrrw9zrvqbbww2"; }; + xfce4taskmanager = callPackage ./applications/xfce4-taskmanager.nix { v= "1.0.0"; h= "1vm9gw7j4ngjlpdhnwdf7ifx6xrrn21011almx2vwidhk2f9zvy0"; }; + mousepad = callPackage ./applications/mousepad.nix { v= "0.3.0"; h= "0v84zwhjv2xynvisn5vmp7dbxfj4l4258m82ks7hn3adk437bwhh"; }; + thunar_volman = callPackage ./core/thunar-volman.nix { }; + + #### ART + + xfce4icontheme = callPackage ./art/xfce4-icon-theme.nix { v= "4.4.3"; h= "1yk6rx3zr9grm4jwpjvqdkl13pisy7qn1wm5cqzmd2kbsn96cy6l"; }; + + #### PANEL PLUGINS + + xfce4_systemload_plugin = callPackage ./panel-plugins/xfce4-systemload-plugin.nix { }; + xfce4_cpufreq_plugin = callPackage ./panel-plugins/xfce4-cpufreq-plugin.nix { }; + + }; +} + diff --git a/pkgs/desktops/xfce/core/xfce4-dev-tools.nix b/pkgs/desktops/xfce/core/xfce4-dev-tools.nix new file mode 100644 index 000000000000..e56eb3f0a713 --- /dev/null +++ b/pkgs/desktops/xfce/core/xfce4-dev-tools.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, pkgconfig, glib, autoconf, automake, libtool, intltool }: + +stdenv.mkDerivation rec { + p_name = "xfce4-dev-tools"; + ver_maj = "4.10"; + ver_min = "0"; + + src = fetchurl { + url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; + sha256 = "1y1byfjciqhxqfxbjfp22bn5lxk3a01ng7zfjha8h5mzzfxlk5pp"; + }; + name = "${p_name}-${ver_maj}.${ver_min}"; + + buildInputs = [ pkgconfig glib ]; + + # not needed to build it but to use it + propagatedBuildInputs = [ autoconf automake libtool intltool ]; + + meta = { + homepage = http://foo-projects.org/~benny/projects/xfce4-dev-tools/; + description = "Tools and M4 macros for Xfce4 developers"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/desktops/xfce/core/xfce4-session-systemd.patch b/pkgs/desktops/xfce/core/xfce4-session-systemd.patch new file mode 100644 index 000000000000..7780491a8eda --- /dev/null +++ b/pkgs/desktops/xfce/core/xfce4-session-systemd.patch @@ -0,0 +1,470 @@ +From ae28aef315a7a6b90f1649ce6d1f30b842791cbf Mon Sep 17 00:00:00 2001 +From: Nick Schermer +Date: Sun, 04 Nov 2012 20:23:36 +0000 +Subject: Add shutdown/reboot functionality for systemd (bug #8729). + +Based on patch by Christian Hesse and Evangelos Foutras. +--- +diff --git a/configure.in.in b/configure.in.in +index 9aa4f8f..134d0f7 100644 +--- a/configure.in ++++ b/configure.in +@@ -96,6 +96,10 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0]) + XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) + XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0]) + ++dnl Check for polkit / systemd integration ++XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100], ++ [systemd], [Systemd support (through polit)]) ++ + dnl Check for debugging support + XDT_FEATURE_DEBUG([xfsm_debug_default]) + +diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am +index c015154..f748b2b 100644 +--- a/xfce4-session/Makefile.am ++++ b/xfce4-session/Makefile.am +@@ -38,8 +38,6 @@ xfce4_session_SOURCES = \ + xfsm-compat-gnome.h \ + xfsm-compat-kde.c \ + xfsm-compat-kde.h \ +- xfsm-consolekit.c \ +- xfsm-consolekit.h \ + xfsm-dns.c \ + xfsm-dns.h \ + xfsm-error.c \ +@@ -65,6 +63,16 @@ xfce4_session_SOURCES = \ + xfsm-upower.c \ + xfsm-upower.h + ++if HAVE_SYSTEMD ++xfce4_session_SOURCES += \ ++ xfsm-systemd.c \ ++ xfsm-systemd.h ++else ++xfce4_session_SOURCES += \ ++ xfsm-consolekit.c \ ++ xfsm-consolekit.h ++endif ++ + xfce4_session_CFLAGS = \ + $(LIBSM_CFLAGS) \ + $(LIBX11_CFLAGS) \ +@@ -72,6 +80,7 @@ xfce4_session_CFLAGS = \ + $(DBUS_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ ++ $(SYSTEMD_CFLAGS) \ + $(XFCONF_CFLAGS) \ + $(GMODULE_CFLAGS) \ + $(PLATFORM_CFLAGS) +@@ -91,6 +100,7 @@ xfce4_session_LDADD = \ + $(DBUS_LIBS) \ + $(DBUS_GLIB_LIBS) \ + $(LIBWNCK_LIBS) \ ++ $(SYSTEMD_LIBS) \ + $(XFCONF_LIBS) \ + -lm + +diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c +index d8757a8..4c483a7 100644 +--- a/xfce4-session/xfsm-shutdown.c ++++ b/xfce4-session/xfsm-shutdown.c +@@ -66,10 +66,13 @@ + #include + #include + #include +-#include + #include + +- ++#ifdef HAVE_SYSTEMD ++#include ++#else ++#include ++#endif + + static void xfsm_shutdown_finalize (GObject *object); + static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown); +@@ -93,7 +96,11 @@ struct _XfsmShutdown + { + GObject __parent__; + ++#ifdef HAVE_SYSTEMD ++ XfsmSystemd *systemd; ++#else + XfsmConsolekit *consolekit; ++#endif + XfsmUPower *upower; + + /* kiosk settings */ +@@ -131,7 +138,11 @@ xfsm_shutdown_init (XfsmShutdown *shutdown) + { + XfceKiosk *kiosk; + ++#ifdef HAVE_SYSTEMD ++ shutdown->systemd = xfsm_systemd_get (); ++#else + shutdown->consolekit = xfsm_consolekit_get (); ++#endif + shutdown->upower = xfsm_upower_get (); + shutdown->helper_state = SUDO_NOT_INITIAZED; + shutdown->helper_require_password = FALSE; +@@ -150,7 +161,11 @@ xfsm_shutdown_finalize (GObject *object) + { + XfsmShutdown *shutdown = XFSM_SHUTDOWN (object); + ++#ifdef HAVE_SYSTEMD ++ g_object_unref (G_OBJECT (shutdown->systemd)); ++#else + g_object_unref (G_OBJECT (shutdown->consolekit)); ++#endif + g_object_unref (G_OBJECT (shutdown->upower)); + + /* close down helper */ +@@ -641,7 +656,11 @@ xfsm_shutdown_try_restart (XfsmShutdown *shutdown, + if (shutdown->helper_state == SUDO_AVAILABLE) + return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error); + else ++#ifdef HAVE_SYSTEMD ++ return xfsm_systemd_try_restart (shutdown->systemd, error); ++#else + return xfsm_consolekit_try_restart (shutdown->consolekit, error); ++#endif + } + + +@@ -658,7 +677,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown, + if (shutdown->helper_state == SUDO_AVAILABLE) + return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error); + else ++#ifdef HAVE_SYSTEMD ++ return xfsm_systemd_try_shutdown (shutdown->systemd, error); ++#else + return xfsm_consolekit_try_shutdown (shutdown->consolekit, error); ++#endif + } + + +@@ -698,7 +721,11 @@ xfsm_shutdown_can_restart (XfsmShutdown *shutdown, + return TRUE; + } + ++#ifdef HAVE_SYSTEMD ++ if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error)) ++#else + if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error)) ++#endif + return TRUE; + + if (xfsm_shutdown_sudo_init (shutdown, error)) +@@ -725,7 +752,11 @@ xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown, + return TRUE; + } + ++#ifdef HAVE_SYSTEMD ++ if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error)) ++#else + if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error)) ++#endif + return TRUE; + + if (xfsm_shutdown_sudo_init (shutdown, error)) +diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c +new file mode 100644 +index 0000000..7bdd39d +--- /dev/null ++++ b/xfce4-session/xfsm-systemd.c +@@ -0,0 +1,229 @@ ++/*- ++ * Copyright (C) 2012 Christian Hesse ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ++ * MA 02110-1301 USA. ++ */ ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++ ++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1" ++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1" ++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager" ++#define SYSTEMD_REBOOT_ACTION "Reboot" ++#define SYSTEMD_POWEROFF_ACTION "PowerOff" ++#define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot" ++#define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off" ++ ++ ++ ++static void xfsm_systemd_finalize (GObject *object); ++ ++ ++ ++struct _XfsmSystemdClass ++{ ++ GObjectClass __parent__; ++}; ++ ++struct _XfsmSystemd ++{ ++ GObject __parent__; ++ ++ PolkitAuthority *authority; ++ PolkitSubject *subject; ++}; ++ ++ ++ ++G_DEFINE_TYPE (XfsmSystemd, xfsm_systemd, G_TYPE_OBJECT) ++ ++ ++ ++static void ++xfsm_systemd_class_init (XfsmSystemdClass *klass) ++{ ++ GObjectClass *gobject_class; ++ ++ gobject_class = G_OBJECT_CLASS (klass); ++ gobject_class->finalize = xfsm_systemd_finalize; ++} ++ ++ ++ ++static void ++xfsm_systemd_init (XfsmSystemd *systemd) ++{ ++ systemd->authority = polkit_authority_get_sync (NULL, NULL); ++ systemd->subject = polkit_unix_process_new (getpid()); ++} ++ ++ ++ ++static void ++xfsm_systemd_finalize (GObject *object) ++{ ++ XfsmSystemd *systemd = XFSM_SYSTEMD (object); ++ ++ g_object_unref (G_OBJECT (systemd->authority)); ++ g_object_unref (G_OBJECT (systemd->subject)); ++ ++ (*G_OBJECT_CLASS (xfsm_systemd_parent_class)->finalize) (object); ++} ++ ++ ++static gboolean ++xfsm_systemd_can_method (XfsmSystemd *systemd, ++ gboolean *can_method, ++ const gchar *method, ++ GError **error) ++{ ++ PolkitAuthorizationResult *res; ++ GError *local_error = NULL; ++ ++ *can_method = FALSE; ++ ++ res = polkit_authority_check_authorization_sync (systemd->authority, ++ systemd->subject, ++ method, ++ NULL, ++ POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, ++ NULL, ++ &local_error); ++ ++ if (res == NULL) ++ { ++ g_propagate_error (error, local_error); ++ return FALSE; ++ } ++ ++ *can_method = polkit_authorization_result_get_is_authorized (res) ++ || polkit_authorization_result_get_is_challenge (res); ++ ++ g_object_unref (G_OBJECT (res)); ++ ++ return TRUE; ++} ++ ++ ++ ++static gboolean ++xfsm_systemd_try_method (XfsmSystemd *systemd, ++ const gchar *method, ++ GError **error) ++{ ++ GDBusConnection *bus; ++ GError *local_error = NULL; ++ ++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, error); ++ if (G_UNLIKELY (bus == NULL)) ++ return FALSE; ++ ++ g_dbus_connection_call_sync (bus, ++ SYSTEMD_DBUS_NAME, ++ SYSTEMD_DBUS_PATH, ++ SYSTEMD_DBUS_INTERFACE, ++ method, ++ g_variant_new ("(b)", TRUE), ++ NULL, 0, G_MAXINT, NULL, ++ &local_error); ++ ++ g_object_unref (G_OBJECT (bus)); ++ ++ if (local_error != NULL) ++ { ++ g_propagate_error (error, local_error); ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++ ++ ++XfsmSystemd * ++xfsm_systemd_get (void) ++{ ++ static XfsmSystemd *object = NULL; ++ ++ if (G_LIKELY (object != NULL)) ++ { ++ g_object_ref (G_OBJECT (object)); ++ } ++ else ++ { ++ object = g_object_new (XFSM_TYPE_SYSTEMD, NULL); ++ g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object); ++ } ++ ++ return object; ++} ++ ++ ++ ++gboolean ++xfsm_systemd_try_restart (XfsmSystemd *systemd, ++ GError **error) ++{ ++ return xfsm_systemd_try_method (systemd, ++ SYSTEMD_REBOOT_ACTION, ++ error); ++} ++ ++ ++ ++gboolean ++xfsm_systemd_try_shutdown (XfsmSystemd *systemd, ++ GError **error) ++{ ++ return xfsm_systemd_try_method (systemd, ++ SYSTEMD_POWEROFF_ACTION, ++ error); ++} ++ ++ ++ ++gboolean ++xfsm_systemd_can_restart (XfsmSystemd *systemd, ++ gboolean *can_restart, ++ GError **error) ++{ ++ return xfsm_systemd_can_method (systemd, ++ can_restart, ++ SYSTEMD_REBOOT_TEST, ++ error); ++} ++ ++ ++ ++gboolean ++xfsm_systemd_can_shutdown (XfsmSystemd *systemd, ++ gboolean *can_shutdown, ++ GError **error) ++{ ++ return xfsm_systemd_can_method (systemd, ++ can_shutdown, ++ SYSTEMD_POWEROFF_TEST, ++ error); ++} +diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h +new file mode 100644 +index 0000000..8223622 +--- /dev/null ++++ b/xfce4-session/xfsm-systemd.h +@@ -0,0 +1,55 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2012 Christian Hesse ++ * ++ * Licensed under the GNU General Public License Version 2 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#ifndef __XFSM_SYSTEMD_H__ ++#define __XFSM_SYSTEMD_H__ ++ ++typedef struct _XfsmSystemdClass XfsmSystemdClass; ++typedef struct _XfsmSystemd XfsmSystemd; ++ ++#define XFSM_TYPE_SYSTEMD (xfsm_systemd_get_type ()) ++#define XFSM_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemd)) ++#define XFSM_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_SYSTEMD, XfsmSystemdClass)) ++#define XFSM_IS_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_SYSTEMD)) ++#define XFSM_IS_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_SYSTEMD)) ++#define XFSM_SYSTEMD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemdClass)) ++ ++GType xfsm_systemd_get_type (void) G_GNUC_CONST; ++ ++XfsmSystemd *xfsm_systemd_get (void); ++ ++gboolean xfsm_systemd_try_restart (XfsmSystemd *systemd, ++ GError **error); ++ ++gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd, ++ GError **error); ++ ++gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd, ++ gboolean *can_restart, ++ GError **error); ++ ++gboolean xfsm_systemd_can_shutdown (XfsmSystemd *systemd, ++ gboolean *can_shutdown, ++ GError **error); ++ ++G_END_DECLS ++ ++#endif /* __XFSM_SYSTEMD_H__ */ +-- +cgit v0.9.1 diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix index b63a101b84f8..e5daaca9d528 100644 --- a/pkgs/desktops/xfce/default.nix +++ b/pkgs/desktops/xfce/default.nix @@ -35,7 +35,7 @@ xfce_self = rec { # the lines are very long but it seems better than the even-od xfwm4 = callPackage ./core/xfwm4.nix { }; xfce4_appfinder = callPackage ./core/xfce4-appfinder.nix { }; - + xfce4_dev_tools = callPackage ./core/xfce4-dev-tools.nix { }; # only if autotools are needed #### APPLICATIONS from "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2" diff --git a/pkgs/development/compilers/ghc/6.4.2-binary.nix b/pkgs/development/compilers/ghc/6.4.2-binary.nix index 8e4e6c58a3f9..b42602829acd 100644 --- a/pkgs/development/compilers/ghc/6.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.4.2-binary.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { src = if stdenv.system == "i686-linux" then fetchurl { - url = http://nixos.org/tarballs/ghc-6.4.2-i386-unknown-linux.tar.bz2; + url = http://tarballs.nixos.org/ghc-6.4.2-i386-unknown-linux.tar.bz2; md5 = "092fe2e25dab22b926babe97cc77db1f"; } else if stdenv.system == "x86_64-linux" then diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix index 7fa12d495aa6..3e45fc6d5e35 100644 --- a/pkgs/development/compilers/julia/default.nix +++ b/pkgs/development/compilers/julia/default.nix @@ -1,21 +1,21 @@ { stdenv, fetchgit, gfortran, perl, m4, llvm, gmp, pcre, zlib , readline, fftwSinglePrec, fftw, libunwind, suitesparse, glpk, fetchurl , ncurses, libunistring, lighttpd, patchelf, openblas, liblapack - , tcl, tk, xproto, libX11, git + , tcl, tk, xproto, libX11, git, mpfr } : let realGcc = stdenv.gcc.gcc; in stdenv.mkDerivation rec { pname = "julia"; - date = "20130205"; + date = "20130611"; name = "${pname}-git-${date}"; grisu_ver = "1.1.1"; dsfmt_ver = "2.2"; openblas_ver = "v0.2.2"; lapack_ver = "3.4.1"; - arpack_ver = "3.1.2"; + arpack_ver = "3.1.3"; clp_ver = "1.14.5"; lighttpd_ver = "1.4.29"; patchelf_ver = "0.6"; @@ -36,9 +36,9 @@ stdenv.mkDerivation rec { sha256 = "19ffec70f9678f5c159feadc036ca47720681b782910fbaa95aa3867e7e86d8e"; }; arpack_src = fetchurl { - url = "http://forge.scilab.org/index.php/p/arpack-ng/downloads/497/get/"; - name = "arpack-ng_${arpack_ver}.tar.gz"; - sha256 = "1wk06bdjgap4hshx0lswzi7vxy2lrdx353y1k7yvm97mpsjvsf4k"; + url = "http://forge.scilab.org/index.php/p/arpack-ng/downloads/607/get/"; + name = "arpack-ng-${arpack_ver}.tar.gz"; + sha256 = "039w7j3dr1xy35a3hp92zg2g92gmjq6xsv0g4awlb4cffy09nr2d"; }; lapack_src = fetchurl { url = "http://www.netlib.org/lapack/lapack-${lapack_ver}.tgz"; @@ -65,17 +65,17 @@ stdenv.mkDerivation rec { src = fetchgit { url = "git://github.com/JuliaLang/julia.git"; - rev = "efc696bf74eec7605b4da19f6f1605ba99959ed3"; - sha256 = "19if7aj3mrp84dg9g2d3zbhasrq0nz28djl9a01m0y4y9bfymp7s"; + rev = "60cc4e44bf415dcda90f2bbe22300f842fe44098"; + sha256 = "018s0zyvdkxjldbvcdv40q3v2gcjznyyql5pv3zhhy1iq11jddfz"; }; buildInputs = [ gfortran perl m4 gmp pcre llvm readline zlib fftw fftwSinglePrec libunwind suitesparse glpk ncurses libunistring patchelf - openblas liblapack tcl tk xproto libX11 git + openblas liblapack tcl tk xproto libX11 git mpfr ]; configurePhase = '' - for i in GMP LLVM PCRE LAPACK OPENBLAS BLAS READLINE FFTW LIBUNWIND SUITESPARSE GLPK LIGHTTPD ZLIB; + for i in GMP LLVM PCRE LAPACK OPENBLAS BLAS READLINE FFTW LIBUNWIND SUITESPARSE GLPK LIGHTTPD ZLIB MPFR; do makeFlags="$makeFlags USE_SYSTEM_$i=1 " done @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { copy_kill_hash "${dsfmt_src}" deps/random ${if realGcc ==null then "" else - ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${realGcc}/lib -L${realGcc}/lib64 -lpcre -llapack -lm -lfftw3f -lfftw3 -lglpk -lunistring -lz "''} + ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${realGcc}/lib -L${realGcc}/lib64 -lpcre -llapack -lm -lfftw3f -lfftw3 -lglpk -lunistring -lz -lgmp -lmpfr"''} export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC " export LDFLAGS="-L${suitesparse}/lib -L$out/lib/julia -Wl,-rpath,$out/lib/julia" @@ -110,6 +110,21 @@ stdenv.mkDerivation rec { preBuild = '' mkdir -p usr/lib + + echo "$out" + mkdir -p "$out/lib" + ( + cd "$(mktemp -d)" + for i in "${suitesparse}"/lib/lib*.a; do + ar -x $i + done + gcc *.o --shared -o "$out/lib/libsuitesparse.so" + ) + cp "$out/lib/libsuitesparse.so" usr/lib + for i in umfpack cholmod amd camd colamd spqr; do + ln -s libsuitesparse.so "$out"/lib/lib$i.so; + ln -s libsuitesparse.so "usr"/lib/lib$i.so; + done ''; preInstall = '' diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 4b5bbdc52584..59e2bdc5509a 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, groff, cmake, python }: +{ stdenv, fetchurl, perl, groff, cmake, python, libffi }: let version = "3.2"; in @@ -10,11 +10,21 @@ stdenv.mkDerivation { sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j"; }; - buildInputs = [ perl groff cmake python ]; + patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334 + patchFlags = "-p0"; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; + preConfigure = "patchShebangs ."; + + propagatedBuildInputs = [ libffi ]; + buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11? + + # created binaries need to be run before installation... I coudn't find a better way + preBuild = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/lib''; + + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON" ]; enableParallelBuilding = true; + #doCheck = true; # tests are broken, don't know why meta = { homepage = http://llvm.org/; diff --git a/pkgs/development/compilers/llvm/set_soname.patch b/pkgs/development/compilers/llvm/set_soname.patch new file mode 100644 index 000000000000..69ba74dddad8 --- /dev/null +++ b/pkgs/development/compilers/llvm/set_soname.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/show_bug.cgi?id=409267 +http://llvm.org/bugs/show_bug.cgi?id=12334 +--- tools/llvm-shlib/Makefile.orig 2012-03-26 18:14:13.071797115 +0200 ++++ tools/llvm-shlib/Makefile 2012-03-26 17:31:12.491196254 +0200 +@@ -67,6 +67,7 @@ + # Include everything from the .a's into the shared library. + LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ + -Wl,--no-whole-archive ++ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) + endif + + ifeq ($(HOST_OS),Linux) diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix index 47b13700b8ac..88bef618f743 100644 --- a/pkgs/development/compilers/mono/default.nix +++ b/pkgs/development/compilers/mono/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus}: +{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11}: stdenv.mkDerivation rec { name = "mono-2.11.4"; @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { sha256 = "0wv8pnj02mq012sihx2scx0avyw51b5wb976wn7x86zda0vfcsnr"; }; - buildInputs = [bison pkgconfig glib gettext perl libgdiplus]; + buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11]; propagatedBuildInputs = [glib]; NIX_LDFLAGS = "-lgcc_s" ; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # In fact I think this line does not help at all to what I # wanted to achieve: have mono to find libgdiplus automatically - configureFlags = "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"; + configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"; # Attempt to fix this error when running "mcs --version": # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image @@ -31,6 +31,17 @@ stdenv.mkDerivation rec { patchShebangs ./ "; + #Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps + #Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive + #http://www.mono-project.com/Config_DllMap + postBuild = '' + find . -name 'config' -type f | while read i; do + sed -i "s@libMonoPosixHelper.so@$out/lib/libMonoPosixHelper.so@g" $i + sed -i "s@libX11.so.6@${libX11}/lib/libX11.so.6@g" $i + sed -i '2 i\' $i + done + ''; + meta = { homepage = http://mono-project.com/; description = "Cross platform, open source .NET development framework"; diff --git a/pkgs/development/compilers/ocaml/3.08.0.nix b/pkgs/development/compilers/ocaml/3.08.0.nix index 4f7e9469bbf2..f4640b36e67a 100644 --- a/pkgs/development/compilers/ocaml/3.08.0.nix +++ b/pkgs/development/compilers/ocaml/3.08.0.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation { name = "ocaml-3.08.0"; builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/ocaml-3.08.0.tar.gz; + url = http://tarballs.nixos.org/ocaml-3.08.0.tar.gz; md5 = "c6ef478362295c150101cdd2efcd38e0"; }; configureScript = ./configure-3.08.0; diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix index 2ac2eed117c6..01ed43069b6a 100644 --- a/pkgs/development/compilers/openjdk/bootstrap.nix +++ b/pkgs/development/compilers/openjdk/bootstrap.nix @@ -4,12 +4,12 @@ let # !!! These should be on nixos.org src = if glibc.system == "x86_64-linux" then fetchurl { - url = http://nixos.org/tarballs/openjdk-bootstrap-x86_64-linux-2012-08-24.tar.xz; + url = http://tarballs.nixos.org/openjdk-bootstrap-x86_64-linux-2012-08-24.tar.xz; sha256 = "0gla9dxrfq2w1hvgsnn8jg8a60k27im6z43a6iidi0qmwa0wah32"; } else if glibc.system == "i686-linux" then fetchurl { - url = http://nixos.org/tarballs/openjdk-bootstrap-i686-linux-2012-08-24.tar.xz; + url = http://tarballs.nixos.org/openjdk-bootstrap-i686-linux-2012-08-24.tar.xz; sha256 = "184wq212bycwbbq4ix8cc6jwjxkrqw9b01zb86q95kqpa8zy5206"; } else throw "No bootstrap for system"; diff --git a/pkgs/development/compilers/qcmm/default.nix b/pkgs/development/compilers/qcmm/default.nix index b7f118666870..a221ae29f04d 100644 --- a/pkgs/development/compilers/qcmm/default.nix +++ b/pkgs/development/compilers/qcmm/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { name = "qcmm-2006-01-31"; src = fetchurl { - url = http://nixos.org/tarballs/qc--20060131.tar.gz; + url = http://tarballs.nixos.org/qc--20060131.tar.gz; md5 = "9097830775bcf22c9bad54f389f5db23"; }; buildInputs = [ mk ocaml noweb groff ]; diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 13a0081a2574..9af30230757e 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -1,18 +1,25 @@ -{ stdenv, fetchurl, yacc, flex, pkgconfig, glib, libintlOrEmpty }: +{ stdenv, fetchurl, yacc, flex, pkgconfig, glib, dbus, dbus_tools +, libiconvOrEmpty, libintlOrEmpty }: stdenv.mkDerivation rec { - - version = "0.17.2"; - name = "vala-${version}"; + p_name = "vala"; + ver_maj = "0.19"; + ver_min = "0"; src = fetchurl { - url = "mirror://gnome/sources/vala/0.17/${name}.tar.xz"; - sha256 = "09i2s0dwmrk147ind2dx7nq845g12fp6fsjqrphhrr0dbi0zzgh3"; + url = "mirror://gnome/sources/${p_name}/${ver_maj}/${name}.tar.xz"; + sha256 = "1vn524hcnaggz8zx49mvf7p4z1mscrlj2syg7jjhph8nak5wi0bp"; }; + name = "${p_name}-${ver_maj}.${ver_min}"; + + postPatch = "patchShebangs ."; nativeBuildInputs = [ yacc flex pkgconfig ]; - buildInputs = [ glib ] ++ libintlOrEmpty; + buildInputs = [ glib ] ++ libiconvOrEmpty ++ libintlOrEmpty + ++ stdenv.lib.optional doCheck [ dbus dbus_tools ]; + + doCheck = false; # problems when launching dbus tests meta = { description = "Compiler for the GObject type system"; diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 66b5b79083a1..6e4051ff46eb 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -34,7 +34,9 @@ # Explicitly link against libgcc_s, to work around the infamous # "libgcc_s.so.1 must be installed for pthread_cancel to work". - LDFLAGS = "-lgcc_s"; + + # don't have "libgcc_s.so.1" on darwin + LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" @@ -48,7 +50,8 @@ s|-lltdl|-L${libtool}/lib -lltdl|g' ''; - doCheck = true; + # make check doesn't work on darwin + doCheck = !stdenv.isDarwin; setupHook = ./setup-hook-2.0.sh; @@ -63,6 +66,10 @@ meta = { description = "GNU Guile 2.0, an embeddable Scheme implementation"; + homepage = http://www.gnu.org/software/guile/; + license = stdenv.lib.licenses.lgpl3Plus; + maintainers = with stdenv.lib.maintainers; [ ludo lovek323 ]; + platforms = stdenv.lib.platforms.all; longDescription = '' GNU Guile is an implementation of the Scheme programming language, with @@ -73,13 +80,6 @@ linking, a foreign function call interface, and powerful string processing. ''; - - homepage = http://www.gnu.org/software/guile/; - license = "LGPLv3+"; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - - platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 73f13c11a7db..428d97eaf794 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -2,8 +2,11 @@ libX11, graphicsmagick, pcre, liblapack, texLive, pkgconfig, mesa, fltk, fftw, fftwSinglePrec, zlib, curl, qrupdate }: +let + version = "3.6.4"; +in stdenv.mkDerivation rec { - name = "octave-3.6.4"; + name = "octave-${version}"; src = fetchurl { url = "mirror://gnu/octave/${name}.tar.bz2"; sha256 = "0qn9s7jrjmrn6w3rvp8d7vfnymyv0spnxzrp9l7p8p8zb7wms67s"; @@ -27,6 +30,11 @@ stdenv.mkDerivation rec { cp test/fntests.log $out/share/octave/${name}-fntests.log ''; + passthru = { + inherit version; + sitePath = "share/octave/${version}/site"; + }; + meta = { homepage = http://octave.org/; license = "GPLv3+"; diff --git a/pkgs/development/interpreters/perl/5.14/default.nix b/pkgs/development/interpreters/perl/5.14/default.nix index ac19900bcfc3..08690e9507fa 100644 --- a/pkgs/development/interpreters/perl/5.14/default.nix +++ b/pkgs/development/interpreters/perl/5.14/default.nix @@ -7,11 +7,11 @@ let in stdenv.mkDerivation rec { - name = "perl-5.14.2"; + name = "perl-5.14.4"; src = fetchurl { url = "mirror://cpan/src/${name}.tar.gz"; - sha256 = "1ls8cpbgnlaxfydyyqgr7pxj1hkxh9pzcdgr3dv42zdxffakb234"; + sha256 = "1js47zzna3v38fjnirf2vq6y0rjp8m86ysj5vagzgkig956d8gw0"; }; patches = diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index f53641c4137a..752f0d49885b 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -7,11 +7,11 @@ let in stdenv.mkDerivation rec { - name = "perl-5.16.2"; + name = "perl-5.16.3"; src = fetchurl { url = "mirror://cpan/src/${name}.tar.gz"; - sha256 = "03nh8bqnjsdd5izjv3n2yfcxw4ck0llwww36jpbjbjgixwpqpy4f"; + sha256 = "1dpd9lhc4723wmsn4dsn4m320qlqgyw28bvcbhnfqp2nl3f0ikv9"; }; outputs = [ "out" "man" ]; diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix index 35508230ebdf..576c1dac7ed5 100644 --- a/pkgs/development/interpreters/php/5.3.nix +++ b/pkgs/development/interpreters/php/5.3.nix @@ -89,7 +89,12 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) }; gd = { - configureFlags = ["--with-gd=${gd} --with-freetype-dir=${freetype}"]; + configureFlags = [ + "--with-gd=${gd}" + "--with-freetype-dir=${freetype}" + "--with-png-dir=${libpng}" + "--with-jpeg-dir=${libjpeg}" + ]; buildInputs = [gd libpng libjpeg freetype]; }; diff --git a/pkgs/development/interpreters/php/5.4.nix b/pkgs/development/interpreters/php/5.4.nix index 3c200f9c5c10..35b1f82c246f 100644 --- a/pkgs/development/interpreters/php/5.4.nix +++ b/pkgs/development/interpreters/php/5.4.nix @@ -90,7 +90,12 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) gd = { # FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108. - configureFlags = ["--with-gd --with-freetype-dir=${freetype} --with-png-dir=${libpng}"]; + configureFlags = [ + "--with-gd" + "--with-freetype-dir=${freetype}" + "--with-png-dir=${libpng}" + "--with-jpeg-dir=${libjpeg}" + ]; buildInputs = [ libpng libjpeg freetype ]; }; diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index 9fb2ab377dfc..ccb423ef32e4 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -9,11 +9,11 @@ with stdenv.lib; let majorVersion = "2.7"; - version = "${majorVersion}.3"; + version = "${majorVersion}.5"; src = fetchurl { url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.bz2"; - sha256 = "0g3672il41rcfjk7sphfqdsa6qf53y8g3ai8yk1sslxi3khmfr3j"; + sha256 = "0nc091f19sllibvxm6n3qw5pflcphkwwxmz43q26lqafhra7airv"; }; patches = @@ -25,6 +25,10 @@ let # doesn't work in Nix because Nix changes the mtime of files in # the Nix store to 1. So treat that as a special case. ./nix-store-mtime.patch + + # patch python to put zero timestamp into pyc + # if DETERMINISTIC_BUILD env var is set + ./deterministic-build.patch ]; postPatch = stdenv.lib.optionalString (stdenv.gcc.libc != null) '' diff --git a/pkgs/development/interpreters/python/2.7/deterministic-build.patch b/pkgs/development/interpreters/python/2.7/deterministic-build.patch new file mode 100644 index 000000000000..98d9d339fa11 --- /dev/null +++ b/pkgs/development/interpreters/python/2.7/deterministic-build.patch @@ -0,0 +1,36 @@ +diff -ur orig/Lib/py_compile.py new/Lib/py_compile.py +--- orig/Lib/py_compile.py ++++ new/Lib/py_compile.py +@@ -122,7 +122,10 @@ + cfile = file + (__debug__ and 'c' or 'o') + with open(cfile, 'wb') as fc: + fc.write('\0\0\0\0') +- wr_long(fc, timestamp) ++ if "DETERMINISTIC_BUILD" in os.environ: ++ fc.write('\0\0\0\0') ++ else: ++ wr_long(fc, timestamp) + marshal.dump(codeobject, fc) + fc.flush() + fc.seek(0, 0) +diff -ur orig/Python/import.c new/Python/import.c +--- orig/Python/import.c ++++ new/Python/import.c +@@ -939,10 +939,12 @@ + return; + } + /* Now write the true mtime (as a 32-bit field) */ +- fseek(fp, 4L, 0); +- assert(mtime <= 0xFFFFFFFF); +- PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION); +- fflush(fp); ++ if (Py_GETENV("DETERMINISTIC_BUILD") == NULL) { ++ fseek(fp, 4L, 0); ++ assert(mtime <= 0xFFFFFFFF); ++ PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION); ++ fflush(fp); ++ } + fclose(fp); + if (Py_VerboseFlag) + PySys_WriteStderr("# wrote %s\n", cpathname); + diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix index 1471abe287a7..16973c6226ee 100644 --- a/pkgs/development/interpreters/python/3.3/default.nix +++ b/pkgs/development/interpreters/python/3.3/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { readlineSupport = readline != null; opensslSupport = openssl != null; tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); - libPrefix = "python${majorVersion}"; + libPrefix = "python${majorVersion}m"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/development/interpreters/renpy/default.nix new file mode 100644 index 000000000000..9b34f9a1fef4 --- /dev/null +++ b/pkgs/development/interpreters/renpy/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, python, pkgconfig, wrapPython +, pygame, SDL, libpng, ffmpeg, freetype, glew, mesa, fribidi, zlib +}: + +stdenv.mkDerivation { + name = "renpy-6.15.5"; + + src = fetchurl { + url = "http://www.renpy.org/dl/6.15.5/renpy-6.15.5-source.tar.bz2"; + sha256 = "1k57dak1yk5iyxripqn2syhwwkh70y00pnnb9i1qf19lmiirxa60"; + }; + + buildInputs = [ + python pkgconfig wrapPython + SDL libpng ffmpeg freetype glew mesa fribidi zlib pygame + ]; + + pythonPath = [ pygame ]; + + RENPY_DEPS_INSTALL = stdenv.lib.concatStringsSep "::" (map (path: "${path}") [ + SDL libpng ffmpeg freetype glew mesa fribidi zlib + ]); + + buildPhase = '' + python module/setup.py build + ''; + + installPhase = '' + mkdir -p $out/share/renpy + cp -r renpy renpy.py $out/share/renpy + python module/setup.py install --prefix=$out --install-lib=$out/share/renpy/module + + wrapPythonPrograms + makeWrapper ${python}/bin/python $out/bin/renpy \ + --set PYTHONPATH $program_PYTHONPATH \ + --set RENPY_BASE $out/share/renpy \ + --set RENPY_LESS_UPDATES 1 \ + --add-flags "-O $out/share/renpy/renpy.py" + ''; + + NIX_CFLAGS_COMPILE = "-I${pygame}/include/${python.libPrefix}"; + + meta = { + description = "Ren'Py Visual Novel Engine"; + homepage = "http://renpy.org/"; + licence = "MIT"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/development/interpreters/ruby/bitperfect-rdoc.patch b/pkgs/development/interpreters/ruby/bitperfect-rdoc.patch new file mode 100644 index 000000000000..d5fb9e4554fa --- /dev/null +++ b/pkgs/development/interpreters/ruby/bitperfect-rdoc.patch @@ -0,0 +1,13 @@ +diff -r -u orig/lib/rdoc/generator/template/darkfish/filepage.rhtml new/lib/rdoc/generator/template/darkfish/filepage.rhtml +--- orig/lib/rdoc/generator/template/darkfish/filepage.rhtml ++++ new/lib/rdoc/generator/template/darkfish/filepage.rhtml +@@ -88,9 +88,6 @@ + +
+
+-
Last Modified
+-
<%= file.last_modified %>
+- + <% if file.requires %> +
Requires
+
diff --git a/pkgs/development/interpreters/ruby/gem.nix b/pkgs/development/interpreters/ruby/gem.nix index b4ddd26bb46b..22801aa5b044 100644 --- a/pkgs/development/interpreters/ruby/gem.nix +++ b/pkgs/development/interpreters/ruby/gem.nix @@ -39,6 +39,10 @@ let [[ -e "$out/bin/$(basename $prog)" ]] done + # looks like useless files which break build repeatability and consume space + rm $out/${ruby.gemPath}/doc/*/*/created.rid || true + rm $out/${ruby.gemPath}/gems/*/ext/*/mkmf.log || true + runHook postInstall ''; diff --git a/pkgs/development/interpreters/ruby/generated.nix b/pkgs/development/interpreters/ruby/generated.nix index d4bb7fa4f2d1..2e8991282529 100644 --- a/pkgs/development/interpreters/ruby/generated.nix +++ b/pkgs/development/interpreters/ruby/generated.nix @@ -35,16 +35,20 @@ g: # Get dependencies from patched gems ffi = g.ffi_1_6_0; file_tail = g.file_tail_1_0_12; foreman = g.foreman_0_62_0; + gettext = g.gettext_2_3_9; highline = g.highline_1_6_16; hike = g.hike_1_2_1; hoe = g.hoe_3_1_0; i18n = g.i18n_0_6_4; + iconv = g.iconv_1_0_3; journey = g.journey_1_0_4; jruby_pageant = g.jruby_pageant_1_1_1; jsduck = g.jsduck_4_7_1; json = g.json_1_7_7; json_pure = g.json_pure_1_7_7; libv8 = g.libv8_3_3_10_4; + locale = g.locale_2_0_8; + lockfile = g.lockfile_2_1_0; macaddr = g.macaddr_1_6_1; mail = g.mail_2_5_3; mime_types = g.mime_types_1_21; @@ -74,6 +78,7 @@ g: # Get dependencies from patched gems right_aws = g.right_aws_3_0_5; right_http_connection = g.right_http_connection_1_3_0; rjb = g.rjb_1_4_6; + rmail = g.rmail_1_0_0; rspec = g.rspec_2_11_0; rspec_core = g.rspec_core_2_11_1; rspec_expectations = g.rspec_expectations_2_11_3; @@ -87,16 +92,20 @@ g: # Get dependencies from patched gems sprockets = g.sprockets_2_2_2; syslog_protocol = g.syslog_protocol_0_9_2; systemu = g.systemu_2_5_2; + text = g.text_1_2_1; therubyracer = g.therubyracer_0_10_2; thin = g.thin_1_5_1; thor = g.thor_0_18_0; tilt = g.tilt_1_3_6; tins = g.tins_0_7_2; treetop = g.treetop_1_4_12; + trollop = g.trollop_2_0; tzinfo = g.tzinfo_0_3_37; uuid = g.uuid_2_3_7; uuidtools = g.uuidtools_2_1_3; websocket = g.websocket_1_0_7; + xapian_full_alaveteli = g.xapian_full_alaveteli_1_2_9_5; + xapian_ruby = g.xapian_ruby_1_2_15_1; xml_simple = g.xml_simple_1_1_1; yajl_ruby = g.yajl_ruby_1_1_0; }; @@ -570,6 +579,20 @@ using TCP/IP, especially if custom protocols are required.''; requiredGems = [ g.thor_0_18_0 ]; sha256 = ''08i34rgs3bydk52zwpps4p0y2fvcnibp9lvfdhr75ppin7wv7lmr''; }; + gettext_2_3_9 = { + basename = ''gettext''; + meta = { + description = ''Gettext is a pure Ruby libary and tools to localize messages.''; + homepage = ''http://ruby-gettext.github.com/''; + longDescription = ''Gettext is a GNU gettext-like program for Ruby. +The catalog file(po-file) is same format with GNU gettext. +So you can use GNU gettext tools for maintaining. +''; + }; + name = ''gettext-2.3.9''; + requiredGems = [ g.locale_2_0_8 g.text_1_2_1 ]; + sha256 = ''1i4kzkan7mnyr1ihphx0sqs3k4qj9i1ldg4a1cwf5h2fz657wvjj''; + }; highline_1_6_16 = { basename = ''highline''; meta = { @@ -653,6 +676,17 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf''; requiredGems = [ ]; sha256 = ''0wz1rnrs4n21j1rw9a120j2pfdkbikp1yvxaqi3mk30iw6mx4p0f''; }; + iconv_1_0_3 = { + basename = ''iconv''; + meta = { + description = ''iconv wrapper library''; + homepage = ''https://github.com/nurse/iconv''; + longDescription = ''iconv wrapper library''; + }; + name = ''iconv-1.0.3''; + requiredGems = [ ]; + sha256 = ''1nhjn07h2fqivdj6xqzi2x2kzh28vigx8z3q5fv2cqn9aqmbdacl''; + }; journey_1_0_4 = { basename = ''journey''; meta = { @@ -730,6 +764,29 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf''; requiredGems = [ ]; sha256 = ''0zy585rs1ihm8nsw525wgmbkcq7aqy1k9dbkk8s6953adl0bpz42''; }; + locale_2_0_8 = { + basename = ''locale''; + meta = { + description = ''Ruby-Locale is the pure ruby library which provides basic APIs for localization.''; + homepage = ''https://github.com/ruby-gettext/locale''; + longDescription = ''Ruby-Locale is the pure ruby library which provides basic APIs for localization. +''; + }; + name = ''locale-2.0.8''; + requiredGems = [ ]; + sha256 = ''1hmixxg4aigl3h1qmz4fdsrv81p0bblcjbks32nrcvcpwmlylf12''; + }; + lockfile_2_1_0 = { + basename = ''lockfile''; + meta = { + description = ''lockfile''; + homepage = ''https://github.com/ahoward/lockfile''; + longDescription = ''description: lockfile kicks the ass''; + }; + name = ''lockfile-2.1.0''; + requiredGems = [ ]; + sha256 = ''1yfpz9k0crb7q7y5bcaavf2jzbc170dj84hqz13qp75rj7bl3qhf''; + }; macaddr_1_6_1 = { basename = ''macaddr''; meta = { @@ -1199,6 +1256,17 @@ algorithm for low-level network errors. requiredGems = [ ]; sha256 = ''0q2czc3ghk32hnxf76xsf0jqcfrnx60aqarvdjhgsfdc9a5pmk20''; }; + rmail_1_0_0 = { + basename = ''rmail''; + meta = { + description = ''A MIME mail parsing and generation library.''; + homepage = ''http://www.rfc20.org/rubymail''; + longDescription = ''RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modify, and generate MIME mail messages.''; + }; + name = ''rmail-1.0.0''; + requiredGems = [ ]; + sha256 = ''0nsg7yda1gdwa96j4hlrp2s0m06vrhcc4zy5mbq7gxmlmwf9yixp''; + }; rspec_2_11_0 = { basename = ''rspec''; meta = { @@ -1355,6 +1423,17 @@ interpreters.''; requiredGems = [ ]; sha256 = ''0h834ajdg9w4xrijp31fn98pjfj08gi08xjvp5xh3i6hz9a25fhr''; }; + text_1_2_1 = { + basename = ''text''; + meta = { + description = ''A collection of text algorithms''; + homepage = ''http://github.com/threedaymonk/text''; + longDescription = ''A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Porter Stemming''; + }; + name = ''text-1.2.1''; + requiredGems = [ ]; + sha256 = ''0s186kh125imdr7dahr10payc1gmxgk6wjy1v3agdyvl53yn5z3z''; + }; therubyracer_0_10_2 = { basename = ''therubyracer''; meta = { @@ -1420,6 +1499,21 @@ interpreters.''; requiredGems = [ g.polyglot_0_3_3 g.polyglot_0_3_3 ]; sha256 = ''1jlfjq67n933sm0px0s2j965v1kl1rj8fbx6xk8y4yppkv6ygxc8''; }; + trollop_2_0 = { + basename = ''trollop''; + meta = { + description = ''Trollop is a commandline option parser for Ruby that just gets out of your way.''; + homepage = ''http://trollop.rubyforge.org''; + longDescription = ''Trollop is a commandline option parser for Ruby that just +gets out of your way. One line of code per option is all you need to write. +For that, you get a nice automatically-generated help page, robust option +parsing, command subcompletion, and sensible defaults for everything you don't +specify.''; + }; + name = ''trollop-2.0''; + requiredGems = [ ]; + sha256 = ''0iz5k7ax7a5jm9x6p81k6f4mgp48wxxb0j55ypnwxnznih8fsghz''; + }; tzinfo_0_3_37 = { basename = ''tzinfo''; meta = { @@ -1467,6 +1561,26 @@ interpreters.''; requiredGems = [ ]; sha256 = ''1jrfz4295qbnjaxv37fw9jzxyxz61izp7c0683mnscacpx262zw0''; }; + xapian_full_alaveteli_1_2_9_5 = { + basename = ''xapian_full_alaveteli''; + meta = { + description = ''xapian-core + Ruby xapian-bindings''; + longDescription = ''Xapian bindings for Ruby without dependency on system Xapian library''; + }; + name = ''xapian-full-alaveteli-1.2.9.5''; + requiredGems = [ ]; + sha256 = ''0qg1jkx5lr4a5v7l3f9gq7f07al6qaxxzma230zrzs48bz3qnhxm''; + }; + xapian_ruby_1_2_15_1 = { + basename = ''xapian_ruby''; + meta = { + description = ''xapian libraries and ruby bindings''; + homepage = ''https://github.com/garaio/xapian-ruby''; + }; + name = ''xapian-ruby-1.2.15.1''; + requiredGems = [ ]; + sha256 = ''02v3l931246asbcivkr4j0x99pl4i4fjvfsr8ga8v6lkvz0ls1xp''; + }; xml_simple_1_1_1 = { basename = ''xml_simple''; meta = { diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix index c4da956b57c8..e236a71b5542 100644 --- a/pkgs/development/interpreters/ruby/patches.nix +++ b/pkgs/development/interpreters/ruby/patches.nix @@ -1,5 +1,5 @@ { fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi -, zlib, libuuid, gems, jdk, python, stdenv }: +, zlib, libuuid, gems, jdk, python, stdenv, libiconvOrEmpty }: let @@ -13,7 +13,7 @@ let in { - sup = { buildInputs = [ gems.ncursesw ]; }; + iconv = { buildInputs = [ libiconvOrEmpty ]; }; libv8 = { # This fix is needed to fool scons, which clears the environment by default. @@ -35,11 +35,17 @@ in EOF chmod +x $TMPDIR/g++ - export CXX=$TMPDIR/g++ export AR=$(type -p ar) ''; buildInputs = [ python ]; + NIX_POST_EXTRACT_FILES_HOOK = writeScript "patch-scons" '' + #!/bin/sh + for i in `find "$1" -name scons` + do + sed -i -e "s@/usr/bin/env@$(type -p env)@g" $i + done + ''; }; sqlite3 = { propagatedBuildInputs = [ sqlite ]; }; @@ -91,6 +97,14 @@ in gemFlags = "--no-rdoc --no-ri"; }; + xapian_full_alaveteli = { + buildInputs = [ zlib libuuid ]; + }; + + xapian_ruby = { + buildInputs = [ zlib libuuid ]; + }; + rjb = { buildInputs = [ jdk ]; JAVA_HOME = jdk; diff --git a/pkgs/development/interpreters/ruby/ruby-18.nix b/pkgs/development/interpreters/ruby/ruby-18.nix index ad89fae057bf..cfb498394665 100644 --- a/pkgs/development/interpreters/ruby/ruby-18.nix +++ b/pkgs/development/interpreters/ruby/ruby-18.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "ftp://ftp.ruby-lang.org/pub/ruby/1.8/${name}.tar.gz"; - sha256 = "0b4n9d1idmsl47cq3mw6zhi94yp048ljlfgg9qdblbkvnd7arp1g"; + sha256 = "0g2dsn8lmiqwqsp13ryzi97qxr7742v5l7v506x6wq9aiwpk42p6"; }; # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { passthru = rec { majorVersion = "1.8"; minorVersion = "7"; - patchLevel = "357"; + patchLevel = "371"; libPath = "lib/ruby/${majorVersion}"; gemPath = "lib/ruby/gems/${majorVersion}"; }; diff --git a/pkgs/development/interpreters/ruby/ruby-19.nix b/pkgs/development/interpreters/ruby/ruby-19.nix index b954d7e6bf0f..038a160b3279 100644 --- a/pkgs/development/interpreters/ruby/ruby-19.nix +++ b/pkgs/development/interpreters/ruby/ruby-19.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "ftp://ftp.ruby-lang.org/pub/ruby/1.9/${name}.tar.bz2"; - sha256 = "1ymq5lhp3fz0j3cs65521aihcnivbfrn76in900ccxd0msgfmld9"; + sha256 = "0w1avj8qfskvkgvrjxxc1cxjm14bf1v60ipvcl5q3zpn9k14k2cx"; }; # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. @@ -30,27 +30,39 @@ stdenv.mkDerivation rec { ++ (op zlibSupport zlib) ++ (op opensslSupport openssl) ++ (op gdbmSupport gdbm) - ++ (op yamlSupport libyaml); + ++ (op yamlSupport libyaml) + # Looks like ruby fails to build on darwin without readline even if curses + # support is not enabled, so add readline to the build inputs if curses + # support is disabled (if it's enabled, we already have it) and we're + # running on darwin + ++ (op (!cursesSupport && stdenv.isDarwin) readline); enableParallelBuilding = true; - - configureFlags = ["--enable-shared" "--enable-pthread"]; + patches = [ ./ruby19-parallel-install.patch + ./bitperfect-rdoc.patch + ]; + + configureFlags = [ "--enable-shared" "--enable-pthread" ] + # on darwin, we have /usr/include/tk.h -- so the configure script detects + # that tk is installed + ++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]); installFlags = stdenv.lib.optionalString docSupport "install-doc"; # Bundler tries to create this directory postInstall = "mkdir -pv $out/${passthru.gemPath}"; meta = { - license = "Ruby"; - homepage = "http://www.ruby-lang.org/en/"; + license = "Ruby"; + homepage = "http://www.ruby-lang.org/en/"; description = "The Ruby language"; - platforms = stdenv.lib.platforms.all; + maintainers = with stdenv.lib.maintainers; [ lovek323 ]; + platforms = stdenv.lib.platforms.all; }; passthru = rec { majorVersion = "1.9"; minorVersion = "3"; - patchLevel = "194"; + patchLevel = "429"; libPath = "lib/ruby/${majorVersion}"; gemPath = "lib/ruby/gems/${majorVersion}"; }; diff --git a/pkgs/development/interpreters/ruby/ruby19-parallel-install.patch b/pkgs/development/interpreters/ruby/ruby19-parallel-install.patch new file mode 100644 index 000000000000..bb8063508732 --- /dev/null +++ b/pkgs/development/interpreters/ruby/ruby19-parallel-install.patch @@ -0,0 +1,15 @@ +Index: ruby-1.9.3-p392/lib/mkmf.rb +=================================================================== +--- ruby-1.9.3-p392.orig/lib/mkmf.rb ++++ ruby-1.9.3-p392/lib/mkmf.rb +@@ -2039,8 +2039,8 @@ static: $(STATIC_LIB)#{$extout ? " insta + end + for f in files + dest = "#{dir}/#{File.basename(f)}" +- mfile.print("install-rb#{sfx}: #{dest} #{dir}\n") +- mfile.print("#{dest}: #{f}\n") ++ mfile.print("install-rb#{sfx}: #{dest}\n") ++ mfile.print("#{dest}: #{f} #{timestamp_file(dir)}\n") + mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D#{sep})\n") + if defined?($installed_list) and !$extout + mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n") diff --git a/pkgs/development/libraries/GConf/3.x.nix b/pkgs/development/libraries/GConf/3.x.nix deleted file mode 100644 index 82c0c1f2c435..000000000000 --- a/pkgs/development/libraries/GConf/3.x.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchurl, glib, dbus_glib, pkgconfig, libxml2, gtk3, intltool, polkit }: - -stdenv.mkDerivation { - name = "GConf-3.2.3"; - - src = fetchurl { - url = mirror://gnome/sources/GConf/3.2/GConf-3.2.3.tar.xz; - sha256 = "0jd1z9gb1b7mv4g07qm554va6idasf3swgrfqflypdh9s38mvdcy"; - }; - - propagatedBuildInputs = [ glib dbus_glib ]; - buildInputs = [ polkit gtk3 libxml2 ]; - nativeBuildInputs = [ pkgconfig intltool ]; - - configureFlags = "--disable-orbit"; - - meta = { - homepage = http://projects.gnome.org/gconf/; - description = "A system for storing application preferences"; - maintainers = [ stdenv.lib.maintainers.urkud ]; - inherit (gtk3.meta) platforms; - }; -} diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index 8ff643ce5b18..899c3bb5c8d8 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig +{ stdenv, fetchurl, pkgconfig, audiofile , openglSupport ? false, mesa ? null , alsaSupport ? true, alsaLib ? null , x11Support ? true, x11 ? null, libXrandr ? null @@ -16,25 +16,26 @@ assert pulseaudioSupport -> pulseaudio != null; let configureFlagsFun = attrs: '' - --disable-oss + --disable-oss --disable-video-x11-xme --disable-x11-shared --disable-alsa-shared --enable-rpath --disable-pulseaudio-shared + --disable-osmesa-shared ${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""} ''; in stdenv.mkDerivation rec { - name = "SDL-1.2.14"; + name = "SDL-1.2.15"; src = fetchurl { url = "http://www.libsdl.org/release/${name}.tar.gz"; - sha256 = "1dnrxr18cyar0xd13dca7h8wp1fin4n3iyncxfq6pjrlf0l7x4jx"; + sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"; }; # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated. propagatedBuildInputs = stdenv.lib.optionals x11Support [ x11 libXrandr ] ++ stdenv.lib.optional pulseaudioSupport pulseaudio; - buildInputs = [ pkgconfig ] ++ - stdenv.lib.optional openglSupport mesa ++ + buildInputs = [ pkgconfig audiofile ] ++ + stdenv.lib.optional openglSupport [ mesa ] ++ stdenv.lib.optional alsaSupport alsaLib; # XXX: By default, SDL wants to dlopen() PulseAudio, in which case diff --git a/pkgs/development/libraries/aspell/dictionaries.nix b/pkgs/development/libraries/aspell/dictionaries.nix index 90a9469ee541..c2aefd64c797 100644 --- a/pkgs/development/libraries/aspell/dictionaries.nix +++ b/pkgs/development/libraries/aspell/dictionaries.nix @@ -29,7 +29,7 @@ let in { de = buildDict { - shortName = "de-20030222-1"; + shortName = "de-20030222_1"; fullName = "German"; src = fetchurl { url = mirror://gnu/aspell/dict/de/aspell6-de-20030222-1.tar.bz2; @@ -38,7 +38,7 @@ in { }; en = buildDict { - shortName = "en-6.0-0"; + shortName = "en-6.0_0"; fullName = "English"; src = fetchurl { url = mirror://gnu/aspell/dict/en/aspell6-en-6.0-0.tar.bz2; @@ -47,7 +47,7 @@ in { }; es = buildDict { - shortName = "es-0.50-2"; + shortName = "es-0.50_2"; fullName = "Spanish"; src = fetchurl { url = mirror://gnu/aspell/dict/es/aspell-es-0.50-2.tar.bz2; @@ -56,7 +56,7 @@ in { }; eo = buildDict { - shortName = "eo-0.50-2"; + shortName = "eo-0.50_2"; fullName = "Esperanto"; src = fetchurl { url = mirror://gnu/aspell/dict/eo/aspell-eo-0.50-2.tar.bz2; @@ -65,7 +65,7 @@ in { }; fr = buildDict { - shortName = "fr-0.50-3"; + shortName = "fr-0.50_3"; fullName = "French"; src = fetchurl { url = mirror://gnu/aspell/dict/fr/aspell-fr-0.50-3.tar.bz2; @@ -74,7 +74,7 @@ in { }; it = buildDict { - shortName = "it-0.53-0"; + shortName = "it-0.53_0"; fullName = "Italian"; src = fetchurl { url = mirror://gnu/aspell/dict/it/aspell-it-0.53-0.tar.bz2; @@ -83,7 +83,7 @@ in { }; la = buildDict { - shortName = "la-20020503-0"; + shortName = "la-20020503_0"; fullName = "Latin"; src = fetchurl { url = mirror://gnu/aspell/dict/la/aspell6-la-20020503-0.tar.bz2; @@ -92,7 +92,7 @@ in { }; nl = buildDict { - shortName = "nl-0.50-2"; + shortName = "nl-0.50_2"; fullName = "Dutch"; src = fetchurl { url = mirror://gnu/aspell/dict/nl/aspell-nl-0.50-2.tar.bz2; @@ -105,7 +105,7 @@ in { }; pl = buildDict { - shortName = "pl-6.0_20061121"; + shortName = "pl-6.0_20061121_0"; fullName = "Polish"; src = fetchurl { url = mirror://gnu/aspell/dict/pl/aspell6-pl-6.0_20061121-0.tar.bz2; @@ -114,7 +114,7 @@ in { }; ru = buildDict { - shortName = "ru-0.99f7-1"; + shortName = "ru-0.99f7_1"; fullName = "Russian"; src = fetchurl { url = mirror://gnu/aspell/dict/ru/aspell6-ru-0.99f7-1.tar.bz2; diff --git a/pkgs/development/libraries/atk/2.6.x.nix b/pkgs/development/libraries/atk/default.nix similarity index 76% rename from pkgs/development/libraries/atk/2.6.x.nix rename to pkgs/development/libraries/atk/default.nix index 82b366b40136..180392cc5e0c 100644 --- a/pkgs/development/libraries/atk/2.6.x.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -1,17 +1,19 @@ -{ stdenv, fetchurl, pkgconfig, perl, glib }: +{ stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty }: stdenv.mkDerivation rec { - name = "atk-2.6.0"; + name = "atk-2.8.0"; src = fetchurl { - url = "mirror://gnome/sources/atk/2.6/${name}.tar.xz"; - sha256 = "eff663f90847620bb68c9c2cbaaf7f45e2ff44163b9ab3f10d15be763680491f"; + url = "mirror://gnome/sources/atk/2.8/${name}.tar.xz"; + sha256 = "1x3dd3hg9l1j9dq70xwph13vxdp6a9wbfcnryryf1wr6c8bij9dj"; }; enableParallelBuilding = true; outputs = [ "dev" "out" "doc" ]; + buildInputs = libintlOrEmpty; + nativeBuildInputs = [ pkgconfig perl ]; propagatedBuildInputs = [ glib ]; diff --git a/pkgs/development/libraries/cairo/1.12.2.nix b/pkgs/development/libraries/cairo/1.12.2.nix index 18195017c0fb..e60af3a23a80 100644 --- a/pkgs/development/libraries/cairo/1.12.2.nix +++ b/pkgs/development/libraries/cairo/1.12.2.nix @@ -32,6 +32,10 @@ stdenv.mkDerivation rec { stdenv.lib.optional postscriptSupport zlib ++ stdenv.lib.optional pngSupport libpng; + NIX_CFLAGS_COMPILE = ( if stdenv.isDarwin + then "-I${pixman}/include/pixman-1" + else "" ); + configureFlags = [ "--enable-tee" ] ++ stdenv.lib.optional xcbSupport "--enable-xcb" diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 1ac455efbd28..f971a290358c 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -1,60 +1,59 @@ -{ postscriptSupport ? true -, pdfSupport ? true -, pngSupport ? true -, xcbSupport ? false +{ stdenv, fetchurl, pkgconfig, libiconvOrEmpty, libintlOrEmpty +, expat, zlib, libpng, pixman, fontconfig, freetype, xlibs , gobjectSupport ? true, glib -, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs -, zlib, libpng, pixman, libxcb ? null, xcbutil ? null -, libiconvOrEmpty, libintlOrEmpty +, xcbSupport ? true # no longer experimental since 1.12 +, glSupport ? true, mesa_noglu ? null # mesa is no longer a big dependency +, pdfSupport ? true }: -assert postscriptSupport -> zlib != null; -assert pngSupport -> libpng != null; -assert xcbSupport -> libxcb != null && xcbutil != null; +assert glSupport -> mesa_noglu != null; + +with { inherit (stdenv.lib) optional optionals; }; stdenv.mkDerivation rec { - name = "cairo-1.12.4"; + name = "cairo-1.12.14"; src = fetchurl { url = "http://cairographics.org/releases/${name}.tar.xz"; - sha1 = "f4158981ed01e73c94fb8072074b17feee61a68b"; + sha256 = "04xcykglff58ygs0dkrmmnqljmpjwp2qgwcz8sijqkdpz7ix3l4n"; }; outputs = [ "dev" "out" "bin" "doc" ]; - buildInputs = - [ pkgconfig x11 fontconfig ] - ++ stdenv.lib.optional (!stdenv.isDarwin) xlibs.libXrender - ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ] - ++ libintlOrEmpty - ++ libiconvOrEmpty; + nativeBuildInputs = [ pkgconfig ] ++ libintlOrEmpty ++ libiconvOrEmpty; propagatedBuildInputs = - [ freetype pixman ] ++ - stdenv.lib.optional gobjectSupport glib ++ - stdenv.lib.optional postscriptSupport zlib ++ - stdenv.lib.optional pngSupport libpng; + with xlibs; [ xlibs.xlibs fontconfig expat freetype pixman zlib libpng ] + ++ optional (!stdenv.isDarwin) libXrender + ++ optionals xcbSupport [ libxcb xcbutil ] + ++ optional gobjectSupport glib + ++ optionals glSupport [ mesa_noglu ] + ; - configureFlags = - [ "--enable-tee" ] - ++ stdenv.lib.optional xcbSupport "--enable-xcb" - ++ stdenv.lib.optional pdfSupport "--enable-pdf"; + configureFlags = [ "--enable-tee" ] + ++ optional xcbSupport "--enable-xcb" + ++ optional glSupport "--enable-gl" + ++ optional pdfSupport "--enable-pdf" + ; - preConfigure = '' - # Work around broken `Requires.private' that prevents Freetype - # `-I' flags to be propagated. - sed -i "src/cairo.pc.in" \ - -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g' - '' + NIX_CFLAGS_COMPILE = "-I${pixman}/include/pixman-1"; + preConfigure = # On FreeBSD, `-ldl' doesn't exist. - + (stdenv.lib.optionalString stdenv.isFreeBSD + (stdenv.lib.optionalString stdenv.isFreeBSD '' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in do cat "$i" | sed -es/-ldl//g > t mv t "$i" done - ''); + '') + + + '' + # Work around broken `Requires.private' that prevents Freetype + # `-I' flags to be propagated. + sed -i "src/cairo.pc.in" \ + -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g' + ''; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/db4/db4-4.4.nix b/pkgs/development/libraries/db4/db4-4.4.nix index 7444439fc73d..ab3ffa85cf27 100644 --- a/pkgs/development/libraries/db4/db4-4.4.nix +++ b/pkgs/development/libraries/db4/db4-4.4.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { src = fetchurl { urls = [ http://download.oracle.com/berkeley-db/db-4.4.20.NC.tar.gz - http://nixos.org/tarballs/db-4.4.20.NC.tar.gz + http://tarballs.nixos.org/db-4.4.20.NC.tar.gz ]; md5 = "afd9243ea353bbaa04421488d3b37900"; }; diff --git a/pkgs/development/libraries/dbus-cplusplus/default.nix b/pkgs/development/libraries/dbus-cplusplus/default.nix index 2704b9586b1a..0a4b80d3f3ea 100644 --- a/pkgs/development/libraries/dbus-cplusplus/default.nix +++ b/pkgs/development/libraries/dbus-cplusplus/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, dbus, glib, gtkmm, pkgconfig }: +{ stdenv, fetchurl, dbus, glib, gtkmm, pkgconfig, expat }: stdenv.mkDerivation rec { name = "dbus-cplusplus-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"; }; - buildInputs = [ dbus glib gtkmm pkgconfig ]; + buildInputs = [ dbus glib gtkmm pkgconfig expat ]; configureFlags = "--disable-ecore"; diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 47e83e7780cc..be6cf442a49f 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -1,18 +1,20 @@ { stdenv, fetchurl, pkgconfig, expat, gettext, libiconv, dbus, glib }: stdenv.mkDerivation rec { - name = "dbus-glib-0.98"; + name = "dbus-glib-0.100.2"; src = fetchurl { url = "${meta.homepage}/releases/dbus-glib/${name}.tar.gz"; - sha256 = "04fiwld5yaxyggxlvdmbaqkngh4fn8gfkkqckcp3274bpgb82z19"; + sha256 = "1ibav91yg70f2l3l18cr0hf4mna1h9d4mrg0c60w4l8zjbd45fx5"; }; nativeBuildInputs = [ pkgconfig gettext ]; buildInputs = [ expat ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; - propagatedBuildInputs = [ dbus glib ]; + propagatedBuildInputs = [ dbus.libs glib ]; + + doCheck = true; passthru = { inherit dbus glib; }; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 5716ac6648a0..d50a0076e62a 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,71 +1,107 @@ -{ stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true }: +{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool +, expat, systemd, glib, dbus_glib, python +, libX11, libICE, libSM, useX11 ? stdenv.isLinux }: let - version = "1.6.4"; + version = "1.6.12"; # 1.7.* isn't recommended, even for gnome 3.8 + sha256 = "14pfh2ksn4srfry752kf1jy3c61hklcs9fx2xglw2ifhsszplypn"; - src = fetchurl { - url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; - sha256 = "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"; - }; + inherit (stdenv) lib; - patches = [ ./ignore-missing-includedirs.patch ]; + buildInputsX = lib.optionals useX11 [ libX11 libICE libSM ]; + + # also other parts than "libs" need this statically linked lib + makeInternalLib = "(cd dbus && make libdbus-internal.la)"; + + systemdOrEmpty = lib.optional stdenv.isLinux systemd; + + # A generic builder for individual parts (subdirs) of D-Bus + dbus_drv = name: subdirs: merge: stdenv.mkDerivation (lib.mergeAttrsByFuncDefaultsClean [{ + + name = "dbus-${name}-${version}"; + + src = fetchurl { + url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; + inherit sha256; + }; + + configureFlags = [ + "--localstatedir=/var" + "--sysconfdir=/etc" + "--with-session-socket-dir=/tmp" + "--with-systemdsystemunitdir=$(out)/lib/systemd" + ]; + + preConfigure = '' + patchShebangs . + substituteInPlace tools/Makefile.am --replace 'install-localstatelibDATA:' 'disabled:' + autoreconf -fi + ''; + + installFlags = "sysconfdir=$(out)/etc"; + + doCheck = true; + + patches = [ ./ignore-missing-includedirs.patch ] + ++ lib.optional (stdenv.isSunOS || stdenv.isLinux/*avoid rebuilds*/) ./implement-getgrouplist.patch + ++ [ ./ucred-dirty-hack.patch ./no-create-dirs.patch ]; + + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ expat ]; + buildInputs = [ autoconf automake libtool ]; # ToDo: optional selinux? + + # build only the specified subdirs + postPatch = "sed '/SUBDIRS/s/=.*/=" + subdirs + "/' -i Makefile.am\n" + # use already packaged libdbus instead of trying to build it again + + lib.optionalString (name != "libs") '' + for mfile in */Makefile.am; do + sed 's,\$(top_builddir)/dbus/\(libdbus-[0-9]\),${libs}/lib/\1,g' -i "$mfile" + done + ''; + + } merge ]); + + libs = dbus_drv "libs" "dbus" ({ + # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11 + # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands. + NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; + } // stdenv.lib.optionalAttrs (systemdOrEmpty != []) { + buildInputs = [ systemd.headers ]; + patches = [ ./systemd.patch ]; # bypass systemd detection + }); - configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp"; in rec { - libs = stdenv.mkDerivation { - name = "dbus-library-" + version; + # This package has been split because most applications only need dbus.lib + # which serves as an interface to a *system-wide* daemon, + # see e.g. http://en.wikipedia.org/wiki/D-Bus#Architecture . + # Also some circular dependencies get split by this (like with systemd). - nativeBuildInputs = [ pkgconfig ]; + inherit libs; - buildInputs = [ expat ]; + tools = dbus_drv "tools" "tools" { + configureFlags = [ "--with-dbus-daemondir=${daemon}/bin" ]; + buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs daemon dbus_glib ]; + NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1"; - # FIXME: dbus has optional systemd integration when checking - # at_console policies. How to enable this without introducing a - # circular dependency between dbus and systemd? - - inherit src patches configureFlags; - - preConfigure = - '' - sed -i '/mkinstalldirs.*localstatedir/d' bus/Makefile.in - sed -i '/SUBDIRS/s/ tools//' Makefile.in - ''; - - # Enable X11 autolaunch support in libdbus. This doesn't actually - # depend on X11 (it just execs dbus-launch in dbus.tools), - # contrary to what the configure script demands. - NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; - - installFlags = "sysconfdir=$(out)/etc"; + meta.platforms = stdenv.lib.platforms.all; }; - tools = stdenv.mkDerivation { - name = "dbus-tools-" + version; - - inherit src patches; - - configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin"; - - nativeBuildInputs = [ pkgconfig ]; - - buildInputs = [ expat libs ] - ++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ]; - - NIX_LDFLAGS = "-ldbus-1"; - - preConfigure = - '' - sed -i 's@$(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in - substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:' - ''; - - postConfigure = "cd tools"; - - installFlags = "localstatedir=$TMPDIR/var"; + daemon = dbus_drv "daemon" "bus" { + preBuild = makeInternalLib; + buildInputs = systemdOrEmpty; }; - # I'm too lazy to separate daemon and libs now. - daemon = libs; + # Some of the tests don't work yet; in fact, @vcunat tried several packages + # containing dbus testing, and all of them have some test failure. + tests = dbus_drv "tests" "test" { + preBuild = makeInternalLib; + buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs tools daemon dbus_glib python ]; + NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1"; + }; + + docs = dbus_drv "docs" "doc" { + postInstall = ''rm -r "$out/lib"''; + }; } diff --git a/pkgs/development/libraries/dbus/implement-getgrouplist.patch b/pkgs/development/libraries/dbus/implement-getgrouplist.patch new file mode 100644 index 000000000000..e3a4a25cb720 --- /dev/null +++ b/pkgs/development/libraries/dbus/implement-getgrouplist.patch @@ -0,0 +1,108 @@ +Compatibility patch for Illumos/Solaris and possibly other platforms. +Implements getgrouplist when not provided by OS. +Without it, only the user's primary group is used in authentication! +--- 1970-01-01 00:00:00.000000000 +0000 ++++ dbus-1.6.8/dbus/getgrouplist.c 2013-02-28 13:10:51.081792722 +0000 +@@ -0,0 +1,89 @@ ++/* $OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp $ */ ++/* ++ * Copyright (c) 1991, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++/* OPENBSD ORIGINAL: lib/libc/gen/getgrouplist.c */ ++ ++/* ++ * get credential ++ */ ++#include ++#include ++#include ++#include ++ ++int ++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) ++{ ++ struct group *grp; ++ int i, ngroups; ++ int ret, maxgroups; ++ int bail; ++ ++ ret = 0; ++ ngroups = 0; ++ maxgroups = *grpcnt; ++ ++ /* ++ * install primary group ++ */ ++ if (ngroups >= maxgroups) { ++ *grpcnt = ngroups; ++ return (-1); ++ } ++ groups[ngroups++] = agroup; ++ ++ /* ++ * Scan the group file to find additional groups. ++ */ ++ setgrent(); ++ while ((grp = getgrent())) { ++ if (grp->gr_gid == agroup) ++ continue; ++ for (bail = 0, i = 0; bail == 0 && i < ngroups; i++) ++ if (groups[i] == grp->gr_gid) ++ bail = 1; ++ if (bail) ++ continue; ++ for (i = 0; grp->gr_mem[i]; i++) { ++ if (!strcmp(grp->gr_mem[i], uname)) { ++ if (ngroups >= maxgroups) { ++ ret = -1; ++ goto out; ++ } ++ groups[ngroups++] = grp->gr_gid; ++ break; ++ } ++ } ++ } ++out: ++ endgrent(); ++ *grpcnt = ngroups; ++ return (ret); ++} +--- dbus-1.6.8/dbus/dbus-sysdeps-unix.c.orig 2013-02-28 13:08:52.171215237 +0000 ++++ dbus-1.6.8/dbus/dbus-sysdeps-unix.c 2013-02-28 13:13:52.224615146 +0000 +@@ -21,6 +21,10 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ ++#ifndef HAVE_GETGROUPLIST ++#include "getgrouplist.c" ++#define HAVE_GETGROUPLIST ++#endif + + #include + diff --git a/pkgs/development/libraries/dbus/no-create-dirs.patch b/pkgs/development/libraries/dbus/no-create-dirs.patch new file mode 100644 index 000000000000..cf10d9775991 --- /dev/null +++ b/pkgs/development/libraries/dbus/no-create-dirs.patch @@ -0,0 +1,26 @@ +diff --git a/bus/Makefile.am b/bus/Makefile.am +index 6cbc09a..be60bb8 100644 +--- a/bus/Makefile.am ++++ b/bus/Makefile.am +@@ -212,7 +212,6 @@ clean-local: + /bin/rm *.bb *.bbg *.da *.gcov || true + + install-data-hook: +- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus + $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d + $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d + $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services +diff --git a/tools/Makefile.am b/tools/Makefile.am +index cfd54b8..b6e28f9 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -74,7 +74,7 @@ CLEANFILES = \ + + # create the /var/lib/dbus directory for dbus-uuidgen + install-data-local: +- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus ++ : + + installcheck-local: +- test -d $(DESTDIR)$(localstatedir)/lib/dbus ++ : diff --git a/pkgs/development/libraries/dbus/systemd.patch b/pkgs/development/libraries/dbus/systemd.patch new file mode 100644 index 000000000000..7e6cb1f87d07 --- /dev/null +++ b/pkgs/development/libraries/dbus/systemd.patch @@ -0,0 +1,14 @@ +diff --git a/configure.ac b/configure.ac +index 24fcc9e..98e0459 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1167,7 +1167,8 @@ else + PKG_CHECK_MODULES(SYSTEMD, + [libsystemd-login >= 32, libsystemd-daemon >= 32], + have_systemd=yes, +- have_systemd=no) ++ have_systemd=yes) ++ AC_MSG_NOTICE([NixOS: do not care whether we found systemd or not]) + fi + + if test x$have_systemd = xyes; then diff --git a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch new file mode 100644 index 000000000000..a07abcc15fb0 --- /dev/null +++ b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch @@ -0,0 +1,18 @@ +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +index b4ecc96..267984a 100644 +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -1635,6 +1635,13 @@ write_credentials_byte (int server_fd, + } + } + ++struct ucred ++{ ++ pid_t pid; /* PID of sending process. */ ++ uid_t uid; /* UID of sending process. */ ++ gid_t gid; /* GID of sending process. */ ++}; ++ + /** + * Reads a single byte which must be nul (an error occurs otherwise), + * and reads unix credentials if available. Clears the credentials diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 6b675230119e..d7915a93962c 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -11,5 +11,6 @@ stdenv.mkDerivation rec { meta = { homepage = http://www.libexpat.org/; description = "A stream-oriented XML parser library written in C"; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 116fe3c0c20f..e3b0a54ee82e 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -1,18 +1,24 @@ { stdenv, fetchurl, pkgconfig, freetype, expat }: stdenv.mkDerivation rec { - name = "fontconfig-2.10.1"; + name = "fontconfig-2.10.2"; src = fetchurl { - url = "http://fontconfig.org/release/${name}.tar.gz"; - sha256 = "08h252crb3aqciwdk81jypmz2i7618dzqn3zlr87w1f017wjp4f3"; + url = "http://fontconfig.org/release/${name}.tar.bz2"; + sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f"; }; - buildInputs = [ pkgconfig freetype ]; + infinality_patch = with freetype.infinality; if useInfinality + then let subvers = "1"; + in fetchurl { + url = "${base_URL}/fontconfig-infinality-1-${vers}_${subvers}.tar.bz2"; + sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7"; + } + else null; - propagatedBuildInputs = [ expat ]; # !!! shouldn't be necessary, but otherwise pango breaks + buildInputs = [ pkgconfig freetype expat ]; - configureFlags = "--with-confdir=/etc/fonts --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts="; + configureFlags = "--sysconfdir=/etc --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts="; # We should find a better way to access the arch reliably. crossArch = stdenv.cross.arch or null; @@ -26,11 +32,16 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # Don't try to write to /etc/fonts or /var/cache/fontconfig at install time. - installFlags = "CONFDIR=$(out)/etc/fonts RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy"; + installFlags = "sysconfdir=$(out)/etc RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy"; + + postInstall = stdenv.lib.optionalString freetype.infinality.useInfinality '' + cd "$out/etc/fonts" && tar xvf ${infinality_patch} + ''; meta = { description = "A library for font customization and configuration"; homepage = http://fontconfig.org/; license = "bsd"; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/freeglut/default.nix b/pkgs/development/libraries/freeglut/default.nix index 9d599560fc80..6e556a144ce2 100644 --- a/pkgs/development/libraries/freeglut/default.nix +++ b/pkgs/development/libraries/freeglut/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, libXi, libXrandr, libXxf86vm, mesa, x11 }: stdenv.mkDerivation { - name = "freeglut-2.8.0"; + name = "freeglut-2.8.1"; src = fetchurl { - url = mirror://sourceforge/freeglut/freeglut-2.8.0.tar.gz; - sha256 = "197293ff886abe613bc9eb4a762d9161b0c9e64b3e8e613ed7c5e353974fba05"; + url = mirror://sourceforge/freeglut/freeglut-2.8.1.tar.gz; + sha256 = "16lrxxxd9ps9l69y3zsw6iy0drwjsp6m26d1937xj71alqk6dr6x"; }; configureFlags = "--" + (if stdenv.isDarwin then "disable" else "enable") + "-warnings"; buildInputs = [ libXi libXrandr libXxf86vm mesa x11 ]; - patches = [ ./0001-remove-typedefs-now-living-in-mesa.patch ]; + # patches = [ ./0001-remove-typedefs-now-living-in-mesa.patch ]; } diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 4c695ab33454..b2e39e41a0be 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,24 +1,52 @@ { stdenv, fetchurl, gnumake -, # FreeType supports sub-pixel rendering. This is patented by + # FreeType supports sub-pixel rendering. This is patented by # Microsoft, so it is disabled by default. This option allows it to # be enabled. See http://www.freetype.org/patents.html. - useEncumberedCode ? false +, useEncumberedCode ? false +, useInfinality ? true }: +assert !(useEncumberedCode && useInfinality); # probably wouldn't make sense + +let + + version = "2.4.11"; + + infinality = rec { + inherit useInfinality; + vers = "20130104"; + subvers = "04"; + sha256 = "0dqglig34lfcw0w6sm6vmich0pcvq303vyh8jzqapvxgvrpr2156"; + + base_URL = "http://www.infinality.net/fedora/linux/zips"; + url = "${base_URL}/freetype-infinality-${version}-${vers}_${subvers}-x86_64.tar.bz2"; + }; + +in + stdenv.mkDerivation rec { - name = "freetype-2.4.10"; + name = "freetype-${version}"; src = fetchurl { url = "mirror://sourceforge/freetype/${name}.tar.bz2"; - sha256 = "0bwrkqpygayfc1rf6rr1nb8l3svgn1fmjz8davg2hnf46cn293hc"; + sha256 = "0gxyzxqpyf8g85y6g1zc1wqrh71prbbk8xfw4m8rwzb4ck5hp7gg"; }; outputs = [ "dev" "out" ]; configureFlags = "--disable-static --bindir=$(dev)/bin"; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString useEncumberedCode - "-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1"; + infinality_patch = if useInfinality + then fetchurl { inherit (infinality) url sha256; } + else null; + + NIX_CFLAGS_COMPILE = with stdenv.lib; + " -fno-strict-aliasing" # from Gentoo, see https://bugzilla.redhat.com/show_bug.cgi?id=506840 + + optionalString useEncumberedCode " -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1" + + optionalString useInfinality " -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=1"; + + patches = [ ./enable-validation.patch ] # from Gentoo + ++ stdenv.lib.optional useInfinality [ infinality_patch ]; # The asm for armel is written with the 'asm' keyword. CFLAGS = stdenv.lib.optionalString stdenv.isArm "-std=gnu99"; @@ -28,6 +56,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + doCheck = true; + postInstall = '' mkdir $dev/lib @@ -42,9 +72,13 @@ stdenv.mkDerivation rec { configureFlags = "--disable-static CC_BUILD=gcc"; }; + passthru = { inherit infinality; }; # for fontconfig + meta = { description = "A font rendering engine"; homepage = http://www.freetype.org/; - license = "GPLv2+"; # or the FreeType License (BSD + advertising clause) + license = if useEncumberedCode then "unfree" + else "GPLv2+"; # or the FreeType License (BSD + advertising clause) + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/freetype/enable-validation.patch b/pkgs/development/libraries/freetype/enable-validation.patch new file mode 100644 index 000000000000..44f3bf6e1c94 --- /dev/null +++ b/pkgs/development/libraries/freetype/enable-validation.patch @@ -0,0 +1,22 @@ +Enables gxvalid and otvalid modules for use with ftvalid. + +--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400 ++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400 +@@ -110,7 +110,7 @@ + AUX_MODULES += cache + + # TrueType GX/AAT table validation. Needs ftgxval.c below. +-# AUX_MODULES += gxvalid ++AUX_MODULES += gxvalid + + # Support for streams compressed with gzip (files with suffix .gz). + # +@@ -124,7 +124,7 @@ + + # OpenType table validation. Needs ftotval.c below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/pkgs/development/libraries/gdk-pixbuf/2.26.x.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix similarity index 73% rename from pkgs/development/libraries/gdk-pixbuf/2.26.x.nix rename to pkgs/development/libraries/gdk-pixbuf/default.nix index b3bd378e0e97..8306f3831b1c 100644 --- a/pkgs/development/libraries/gdk-pixbuf/2.26.x.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,11 +1,12 @@ -{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz, jasper }: +{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz +, jasper, libintlOrEmpty }: stdenv.mkDerivation rec { - name = "gdk-pixbuf-2.26.1"; + name = "gdk-pixbuf-2.28.1"; src = fetchurl { - url = "mirror://gnome/sources/gdk-pixbuf/2.26/${name}.tar.xz"; - sha256 = "a60af12b58d9cc15ba4c680c6730ce5d38e8d664af1d575a379385b94b4ec7ba"; + url = "mirror://gnome/sources/gdk-pixbuf/2.28/${name}.tar.xz"; + sha256 = "1fy2a05xhfg7gy4l4aajsbmgj62zxhikdxqh6bicihxmzm1vg85y"; }; outputs = [ "dev" "out" "bin" "doc" ]; @@ -13,7 +14,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. - buildInputs = [ libX11 ]; + buildInputs = [ libX11 libintlOrEmpty ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index 77686c9a7de6..ebd60f610576 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -10,6 +10,10 @@ stdenv.mkDerivation rec { buildInputs = [ mesa x11 libXmu libXi ]; + patchPhase = '' + sed -i 's|lib64|lib|' config/Makefile.linux + ''; + installPhase = '' GLEW_DEST=$out make install mkdir -pv $out/share/doc/glew diff --git a/pkgs/development/libraries/glib/2.34.x.nix b/pkgs/development/libraries/glib/default.nix similarity index 53% rename from pkgs/development/libraries/glib/2.34.x.nix rename to pkgs/development/libraries/glib/default.nix index abc369081052..f92297931658 100644 --- a/pkgs/development/libraries/glib/2.34.x.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconvOrNull, zlib, libffi -, python, pcre }: +{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconvOrEmpty, zlib, libffi +, python, pcre, libelf }: # TODO: # * Add gio-module-fam @@ -11,31 +11,56 @@ # Reminder: add 'sed -e 's@python2\.[0-9]@python@' -i # $out/bin/gtester-report' to postInstall if this is solved +let + # some packages don't get "Cflags" from pkgconfig correctly + # and then fail to build when directly including like + flattenInclude = '' + for dir in $out/include/*; do + cp -r $dir/* "$out/include/" + rm -r "$dir" + ln -s . "$dir" + done + ln -sr -t "$out/include/" $out/lib/*/include/* 2>/dev/null || true + ''; +in + stdenv.mkDerivation (rec { - name = "glib-2.34.0"; + name = "glib-2.36.1"; src = fetchurl { - url = "mirror://gnome/sources/glib/2.34/${name}.tar.xz"; - sha256 = "f69b112f8848be35139d9099b62bc81649241f78f6a775516f0d4c9b47f65144"; + url = "mirror://gnome/sources/glib/2.36/${name}.tar.xz"; + sha256 = "090bw5par3dfy5m6dhq393pmy92zpw3d7rgbzqjc14jfg637bqvx"; }; outputs = [ "dev" "out" "bin" "doc" ]; # configure script looks for d-bus but it is only needed for tests - buildInputs = [ libiconvOrNull ]; + buildInputs = [ libelf ]; nativeBuildInputs = [ perl pkgconfig gettext python ]; - propagatedBuildInputs = [ pcre zlib libffi ]; + propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty; configureFlags = "--with-pcre=system --disable-fam"; + postConfigure = "sed '/SANE_MALLOC_PROTOS/s,^,//,' -i config.h" # https://bugzilla.gnome.org/show_bug.cgi?id=698716 :-) + + stdenv.lib.optionalString stdenv.isDarwin '' + sed '24 i #include ' + ''; + enableParallelBuilding = true; - passthru.gioModuleDir = "lib/gio/modules"; + passthru = { + gioModuleDir = "lib/gio/modules"; + inherit flattenInclude; + }; meta = { description = "GLib, a C library of programming buildings blocks"; + homepage = http://www.gtk.org/; + license = "LGPLv2+"; + maintainers = with stdenv.lib.maintainers; [ raskin urkud lovek323 ]; + platforms = stdenv.lib.platforms.unix; longDescription = '' GLib provides the core application building blocks for libraries @@ -43,13 +68,6 @@ stdenv.mkDerivation (rec { system used in GNOME, the main loop implementation, and a large set of utility functions for strings and common data structures. ''; - - homepage = http://www.gtk.org/; - - license = "LGPLv2+"; - - maintainers = with stdenv.lib.maintainers; [raskin urkud]; - platforms = stdenv.lib.platforms.linux; }; } diff --git a/pkgs/development/libraries/glibc/2.17/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix index 413a0d7aae82..e0588a6275d6 100644 --- a/pkgs/development/libraries/glibc/2.17/common.nix +++ b/pkgs/development/libraries/glibc/2.17/common.nix @@ -55,6 +55,12 @@ stdenv.mkDerivation ({ rfc3484_sort: Assertion `src->results[i].native == -1 || src->results[i].native == a2_native' failed." crashes. */ ./glibc-rh739743.patch + + /* Fix buffer overrun in regexp matcher. */ + ./cve-2013-0242.patch + + /* Fix stack overflow in getaddrinfo with many results. */ + ./cve-2013-1914.patch ]; postPatch = '' @@ -81,7 +87,7 @@ stdenv.mkDerivation ({ then "--enable-profile" else "--disable-profile") ] ++ stdenv.lib.optionals (cross == null && kernelHeaders != null) [ - "--enable-kernel=2.6.35" + "--enable-kernel=2.6.32" ] ++ stdenv.lib.optionals (cross != null) [ (if cross.withTLS then "--with-tls" else "--without-tls") (if cross.float == "soft" then "--without-fp" else "--with-fp") diff --git a/pkgs/development/libraries/glibc/2.17/cve-2013-0242.patch b/pkgs/development/libraries/glibc/2.17/cve-2013-0242.patch new file mode 100644 index 000000000000..1d6557071e1a --- /dev/null +++ b/pkgs/development/libraries/glibc/2.17/cve-2013-0242.patch @@ -0,0 +1,87 @@ +When extending regex buffers, make sure we allocate enough room for the +state log. Merely doubling the space may not be enough if the current +node has accepted a long run of characters. This part of the code only +triggers with multibyte characters. + +Andreas. + + [BZ #15078] + * posix/regexec.c (extend_buffers): Add parameter min_len. + (check_matching): Pass minimum needed length. + (clean_state_log_if_needed): Likewise. + (get_subexp): Likewise. + * posix/Makefile (tests): Add bug-regex34. + (bug-regex34-ENV): Define. + * posix/bug-regex34.c: New file. + +diff --git a/posix/regexec.c b/posix/regexec.c +index 7f2de85..5ca2bf6 100644 +--- a/posix/regexec.c ++++ b/posix/regexec.c +@@ -197,7 +197,7 @@ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, + static int check_node_accept (const re_match_context_t *mctx, + const re_token_t *node, int idx) + internal_function; +-static reg_errcode_t extend_buffers (re_match_context_t *mctx) ++static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) + internal_function; + + /* Entry point for POSIX code. */ +@@ -1160,7 +1160,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match, + || (BE (next_char_idx >= mctx->input.valid_len, 0) + && mctx->input.valid_len < mctx->input.len)) + { +- err = extend_buffers (mctx); ++ err = extend_buffers (mctx, next_char_idx + 1); + if (BE (err != REG_NOERROR, 0)) + { + assert (err == REG_ESPACE); +@@ -1738,7 +1738,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) + && mctx->input.valid_len < mctx->input.len)) + { + reg_errcode_t err; +- err = extend_buffers (mctx); ++ err = extend_buffers (mctx, next_state_log_idx + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + } +@@ -2792,7 +2792,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) + if (bkref_str_off >= mctx->input.len) + break; + +- err = extend_buffers (mctx); ++ err = extend_buffers (mctx, bkref_str_off + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + +@@ -4102,7 +4102,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node, + + static reg_errcode_t + internal_function __attribute_warn_unused_result__ +-extend_buffers (re_match_context_t *mctx) ++extend_buffers (re_match_context_t *mctx, int min_len) + { + reg_errcode_t ret; + re_string_t *pstr = &mctx->input; +@@ -4111,8 +4111,10 @@ extend_buffers (re_match_context_t *mctx) + if (BE (INT_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) + return REG_ESPACE; + +- /* Double the lengthes of the buffers. */ +- ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); ++ /* Double the lengthes of the buffers, but allocate at least MIN_LEN. */ ++ ret = re_string_realloc_buffers (pstr, ++ MAX (min_len, ++ MIN (pstr->len, pstr->bufs_len * 2))); + if (BE (ret != REG_NOERROR, 0)) + return ret; + +-- +1.8.1.2 + + +-- +Andreas Schwab, SUSE Labs, schwab@suse.de +GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 +"And now for something completely different." + diff --git a/pkgs/development/libraries/glibc/2.17/cve-2013-1914.patch b/pkgs/development/libraries/glibc/2.17/cve-2013-1914.patch new file mode 100644 index 000000000000..c2963249f5e4 --- /dev/null +++ b/pkgs/development/libraries/glibc/2.17/cve-2013-1914.patch @@ -0,0 +1,52 @@ +From: Andreas Schwab +Date: Thu, 21 Mar 2013 14:50:27 +0000 (+0100) +Subject: Fix stack overflow in getaddrinfo with many results +X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=1cef1b19089528db11f221e938f60b9b048945d7 + +Fix stack overflow in getaddrinfo with many results +--- + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index d95c2d1..2309281 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -2489,11 +2489,27 @@ getaddrinfo (const char *name, const char *service, + __typeof (once) old_once = once; + __libc_once (once, gaiconf_init); + /* Sort results according to RFC 3484. */ +- struct sort_result results[nresults]; +- size_t order[nresults]; ++ struct sort_result *results; ++ size_t *order; + struct addrinfo *q; + struct addrinfo *last = NULL; + char *canonname = NULL; ++ bool malloc_results; ++ ++ malloc_results ++ = !__libc_use_alloca (nresults * (sizeof (*results) + sizeof (size_t))); ++ if (malloc_results) ++ { ++ results = malloc (nresults * (sizeof (*results) + sizeof (size_t))); ++ if (results == NULL) ++ { ++ __free_in6ai (in6ai); ++ return EAI_MEMORY; ++ } ++ } ++ else ++ results = alloca (nresults * (sizeof (*results) + sizeof (size_t))); ++ order = (size_t *) (results + nresults); + + /* Now we definitely need the interface information. */ + if (! check_pf_called) +@@ -2664,6 +2680,9 @@ getaddrinfo (const char *name, const char *service, + + /* Fill in the canonical name into the new first entry. */ + p->ai_canonname = canonname; ++ ++ if (malloc_results) ++ free (results); + } + + __free_in6ai (in6ai); diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/default.nix index 693a8b883404..8394f5c4e620 100644 --- a/pkgs/development/libraries/gmime/default.nix +++ b/pkgs/development/libraries/gmime/default.nix @@ -1,16 +1,19 @@ -{ stdenv, fetchurl, pkgconfig, glib, zlib }: +{ stdenv, fetchurl, pkgconfig, glib, zlib, libgpgerror }: stdenv.mkDerivation rec { - name = "gmime-2.4.24"; + name = "gmime-2.6.15"; src = fetchurl { - url = "mirror://gnome/sources/gmime/2.4/${name}.tar.gz"; - sha256 = "2f538d68e215f075d16575a6da9acb87983db9e2df0d7d403858048881a0dd15"; + url = "mirror://gnome/sources/gmime/2.6/${name}.tar.xz"; + sha256 = "16n9gmlwn6rphi59hrwy6dpn785s3r13h2kmrn3k61l2kfws1hml"; }; - outputs = [ "dev" "out" "bin" "doc" ]; + outputs = [ "dev" "out" "doc" ]; - buildInputs = [ pkgconfig glib zlib ]; + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ glib zlib libgpgerror ]; + + enableParallelBuilding = true; meta = { homepage = http://spruce.sourceforge.net/gmime/; diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index fe1d519f5625..b96d5b25bb1c 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python }: +{ stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python, gdk_pixbuf }: stdenv.mkDerivation rec { - name = "gobject-introspection-1.34.0"; + name = "gobject-introspection-1.34.2"; - buildInputs = [ flex bison glib pkgconfig python ]; + buildInputs = [ flex bison glib pkgconfig python gdk_pixbuf ]; propagatedBuildInputs = [ libffi ]; # Tests depend on cairo, which is undesirable (it pulls in lots of @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gobject-introspection/1.34/${name}.tar.xz"; - sha256 = "80e211ea95404fc7c5fa3b04ba69ee0b29af70847af315155ab06b8cff832c85"; + sha256 = "0a9lq0y67sr3g37l1hy0biqn046jr9wnd05hvwi8j8g2bjilhydw"; }; postInstall = "rm -rf $out/share/gtk-doc"; diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 4ba4cbb33474..9b56344743da 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -11,16 +11,16 @@ let "${gnupg}/bin/gpg2"; in stdenv.mkDerivation rec { - name = "gpgme-1.3.1"; + name = "gpgme-1.4.1"; src = fetchurl { url = "ftp://ftp.gnupg.org/gcrypt/gpgme/${name}.tar.bz2"; - sha256 = "1m7l7nicn6gd952cgspv9xr8whqivbg33nbg8kbpj3dffnl2gvqm"; + sha1 = "d6110763e7459214fd72705e87ebc682e3b5815e"; }; propagatedBuildInputs = [ libgpgerror glib libassuan pth ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gnupg ]; configureFlags = "--with-gpg=${gpgPath}"; } diff --git a/pkgs/development/libraries/gstreamer/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/gstreamer/default.nix index 5d33e7bff03d..392e8e31f436 100644 --- a/pkgs/development/libraries/gstreamer/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/gstreamer/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2 }: +{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2, libintlOrEmpty }: stdenv.mkDerivation rec { name = "gstreamer-0.10.36"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ perl bison flex pkgconfig ]; - propagatedBuildInputs = [ glib libxml2 ]; + propagatedBuildInputs = [ glib libxml2 ] ++ libintlOrEmpty; patchPhase = '' sed -i -e 's/^ /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in diff --git a/pkgs/development/libraries/gtk+/2.24.x.nix b/pkgs/development/libraries/gtk+/2.x.nix similarity index 60% rename from pkgs/development/libraries/gtk+/2.24.x.nix rename to pkgs/development/libraries/gtk+/2.x.nix index ed5694d13964..e5aadea95077 100644 --- a/pkgs/development/libraries/gtk+/2.24.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, pkgconfig, glib, atk, pango, cairo, perl, xlibs -, gdk_pixbuf, xz -, xineramaSupport ? true +{ stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xlibs +, gdk_pixbuf, libintlOrEmpty, x11 +, xineramaSupport ? stdenv.isLinux , cupsSupport ? true, cups ? null }: @@ -8,25 +8,29 @@ assert xineramaSupport -> xlibs.libXinerama != null; assert cupsSupport -> cups != null; stdenv.mkDerivation rec { - name = "gtk+-2.24.14"; + name = "gtk+-2.24.18"; src = fetchurl { url = "mirror://gnome/sources/gtk+/2.24/${name}.tar.xz"; - sha256 = "8bd1b8b511a3004e8972badf467ce829e6855cdff15540b9344dc934c68008ac"; + sha256 = "1193frzg0qrwa885w77kd055zfpbdjwby88xn2skpx9g4w0k35kc"; }; outputs = [ "dev" "out" "bin" "doc" ]; enableParallelBuilding = true; - nativeBuildInputs = [ perl pkgconfig ]; + NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo"; - propagatedBuildInputs = - [ xlibs.xlibs glib atk pango gdk_pixbuf cairo - xlibs.libXrandr xlibs.libXrender xlibs.libXcomposite xlibs.libXi - ] - ++ stdenv.lib.optional xineramaSupport xlibs.libXinerama - ++ stdenv.lib.optionals cupsSupport [ cups ]; + nativeBuildInputs = [ perl pkgconfig gettext ]; + + propagatedBuildInputs = with xlibs; with stdenv.lib; + [ glib cairo pango gdk_pixbuf atk ] + ++ optionals stdenv.isLinux + [ libXrandr libXrender libXcomposite libXi libXcursor ] + ++ optional stdenv.isDarwin x11 + ++ libintlOrEmpty + ++ optional xineramaSupport libXinerama + ++ optionals cupsSupport [ cups ]; configureFlags = "--with-xinput=yes"; @@ -49,6 +53,6 @@ stdenv.mkDerivation rec { license = "LGPLv2+"; maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/gtk+/3.2.x.nix b/pkgs/development/libraries/gtk+/3.x.nix similarity index 58% rename from pkgs/development/libraries/gtk+/3.2.x.nix rename to pkgs/development/libraries/gtk+/3.x.nix index cace1b626f49..f89b521758ca 100644 --- a/pkgs/development/libraries/gtk+/3.2.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -1,29 +1,28 @@ -{ stdenv, fetchurl, pkgconfig, glib, atk, pango, cairo, perl, xlibs -, gdk_pixbuf, xz -, xineramaSupport ? true -, cupsSupport ? true, cups ? null +{ stdenv, fetchurl, pkgconfig, gettext +, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs, x11 +, xineramaSupport ? stdenv.isLinux +, cupsSupport ? stdenv.isLinux, cups ? null }: assert xineramaSupport -> xlibs.libXinerama != null; assert cupsSupport -> cups != null; stdenv.mkDerivation rec { - name = "gtk+-3.2.4"; + name = "gtk+-3.8.2"; src = fetchurl { - url = "mirror://gnome/sources/gtk+/3.2/${name}.tar.xz"; - sha256 = "f981bf514858c00d7084bd6f6c34b3c60b8aebdb959e7aca6faa59ed67c136bd"; + url = "mirror://gnome/sources/gtk+/3.8/${name}.tar.xz"; + sha256 = "15zjmyky4yw70ipi12dllira4av8wjpw5f7g9kbrbpx12nf0ra0w"; }; enableParallelBuilding = true; - nativeBuildInputs = [ perl pkgconfig ]; - - propagatedBuildInputs = - [ xlibs.xlibs glib atk pango gdk_pixbuf cairo - xlibs.libXrandr xlibs.libXrender xlibs.libXcomposite xlibs.libXi - ] - ++ stdenv.lib.optional xineramaSupport xlibs.libXinerama + nativeBuildInputs = [ pkgconfig gettext ]; + propagatedBuildInputs = with xlibs; with stdenv.lib; + [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk ] + ++ optionals stdenv.isLinux [ libXrandr libXrender libXcomposite libXi libXcursor ] + ++ optional stdenv.isDarwin x11 + ++ stdenv.lib.optional xineramaSupport libXinerama ++ stdenv.lib.optionals cupsSupport [ cups ]; postInstall = "rm -rf $out/share/gtk-doc"; @@ -47,6 +46,6 @@ stdenv.mkDerivation rec { license = "LGPLv2+"; maintainers = with stdenv.lib.maintainers; [urkud raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/gtk-sharp-1/default.nix b/pkgs/development/libraries/gtk-sharp-1/default.nix index 2110884a0225..aad440bf6725 100644 --- a/pkgs/development/libraries/gtk-sharp-1/default.nix +++ b/pkgs/development/libraries/gtk-sharp-1/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/gtk-sharp-1.0.6.tar.gz; + url = http://tarballs.nixos.org/gtk-sharp-1.0.6.tar.gz; md5 = "2651d14fe77174ab20b8af53d150ee11"; }; diff --git a/pkgs/development/libraries/gtkmm/3.x.nix b/pkgs/development/libraries/gtkmm/3.x.nix index d3681b4b3867..5c4a13fe507c 100644 --- a/pkgs/development/libraries/gtkmm/3.x.nix +++ b/pkgs/development/libraries/gtkmm/3.x.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, gtk3, glibmm, cairomm, pangomm, atkmm }: -stdenv.mkDerivation { - name = "gtkmm-3.2.0"; +stdenv.mkDerivation rec { + name = "gtkmm-3.7.12"; # gnome 3.8 release; stable 3.6 has problems with our new glibc src = fetchurl { - url = mirror://gnome/sources/gtkmm/3.2/gtkmm-3.2.0.tar.xz; - sha256 = "1wkljr2vjvjg5mggi4rvk9k4j2kzh8lc106k2yp8gqjlhk2xm5b1"; + url = "mirror://gnome/sources/gtkmm/3.7/${name}.tar.xz"; + sha256 = "05nrilm34gid7kqlq09hcdd7942prn2vbr1qgqvdhgy4x8pvz9p9"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/gtkmozembed-sharp/default.nix b/pkgs/development/libraries/gtkmozembed-sharp/default.nix index 43476d6e78a9..b54f3cc2f61c 100644 --- a/pkgs/development/libraries/gtkmozembed-sharp/default.nix +++ b/pkgs/development/libraries/gtkmozembed-sharp/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/gtkmozembed-sharp-0.7-pre41601.tar.bz2; + url = http://tarballs.nixos.org/gtkmozembed-sharp-0.7-pre41601.tar.bz2; md5 = "34aac139377296791acf3af9b5dc27ed"; }; diff --git a/pkgs/development/libraries/gtksourceview-sharp/default.nix b/pkgs/development/libraries/gtksourceview-sharp/default.nix index abd97ca777b0..56c6e1b1ee5b 100644 --- a/pkgs/development/libraries/gtksourceview-sharp/default.nix +++ b/pkgs/development/libraries/gtksourceview-sharp/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/gtksourceview-sharp-0.6-pre40261.tar.bz2; + url = http://tarballs.nixos.org/gtksourceview-sharp-0.6-pre40261.tar.bz2; md5 = "8bc26c182bd897f50988e110a9a11f34"; }; diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 5755e747a6b5..4fb024db0e13 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchurl, pkgconfig, glib, freetype }: +{ stdenv, fetchurl, pkgconfig, glib, freetype, libintlOrEmpty }: stdenv.mkDerivation rec { - name = "harfbuzz-0.9.4"; + name = "harfbuzz-0.9.12"; src = fetchurl { url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2"; - sha256 = "2572f9a810d17a735ef565115463827d075af2371ee5b68e6d77231381f4bddc"; + sha256 = "19cx5y2m20rp7z5j7mwqfb4ph2g8lrri69zim44x362y4w5gfly6"; }; - buildInputs = [ pkgconfig glib freetype ]; + buildInputs = [ pkgconfig glib freetype ] ++ libintlOrEmpty; meta = { description = "An OpenType text shaping engine"; diff --git a/pkgs/development/libraries/haskell/Agda/default.nix b/pkgs/development/libraries/haskell/Agda/default.nix index f6589dc53be2..64c9d9d51e58 100644 --- a/pkgs/development/libraries/haskell/Agda/default.nix +++ b/pkgs/development/libraries/haskell/Agda/default.nix @@ -5,8 +5,8 @@ cabal.mkDerivation (self: { pname = "Agda"; - version = "2.3.2"; - sha256 = "1xp0qvag6wx6zjwhmb7nm13hp63vlh8h4a2rkc85rsh610m0nynl"; + version = "2.3.2.1"; + sha256 = "1dlf0cs913ma8wjvra8x6p0lwi1pk7ynbdq4lxgbdfgqkbnh43kr"; isLibrary = true; isExecutable = true; buildDepends = [ diff --git a/pkgs/development/libraries/haskell/Chart-gtk/default.nix b/pkgs/development/libraries/haskell/Chart-gtk/default.nix new file mode 100644 index 000000000000..dd6c54cf6b89 --- /dev/null +++ b/pkgs/development/libraries/haskell/Chart-gtk/default.nix @@ -0,0 +1,18 @@ +{ cabal, cairo, Chart, colour, dataAccessor, dataAccessorTemplate +, gtk, mtl, time +}: + +cabal.mkDerivation (self: { + pname = "Chart-gtk"; + version = "0.17"; + sha256 = "1i411kdpz75azyhfaryazr0bpij5xcl0y82m9a7k23w8mhybqwc7"; + buildDepends = [ + cairo Chart colour dataAccessor dataAccessorTemplate gtk mtl time + ]; + meta = { + homepage = "https://github.com/timbod7/haskell-chart/wiki"; + description = "Utility functions for using the chart library with GTK"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/Chart/default.nix b/pkgs/development/libraries/haskell/Chart/default.nix index a59e4ca7f422..dafa834e4d43 100644 --- a/pkgs/development/libraries/haskell/Chart/default.nix +++ b/pkgs/development/libraries/haskell/Chart/default.nix @@ -4,13 +4,13 @@ cabal.mkDerivation (self: { pname = "Chart"; - version = "0.16"; - sha256 = "1mb8hgxj0i5s7l061pfn49m5f6qdwvmgy6ni7jmg85vpy6b7jra3"; + version = "0.17"; + sha256 = "1ip1a61ryypwfzj6dc6n6pl92rflf7lqf1760ppjyg05q5pn6qxg"; buildDepends = [ cairo colour dataAccessor dataAccessorTemplate mtl time ]; meta = { - homepage = "http://www.dockerz.net/software/chart.html"; + homepage = "https://github.com/timbod7/haskell-chart/wiki"; description = "A library for generating 2D Charts and Plots"; license = self.stdenv.lib.licenses.bsd3; platforms = self.ghc.meta.platforms; diff --git a/pkgs/development/libraries/haskell/JuicyPixels/default.nix b/pkgs/development/libraries/haskell/JuicyPixels/default.nix index c289c0092567..2a7bc888c48c 100644 --- a/pkgs/development/libraries/haskell/JuicyPixels/default.nix +++ b/pkgs/development/libraries/haskell/JuicyPixels/default.nix @@ -1,17 +1,17 @@ -{ cabal, binary, deepseq, mtl, primitive, transformers, vector -, zlib +{ cabal, binary, deepseq, mmap, mtl, primitive, transformers +, vector, zlib }: cabal.mkDerivation (self: { pname = "JuicyPixels"; - version = "3.0"; - sha256 = "1qhhhnfs12r67nf07bx58n8a2v6wikan8cqs1wnjnaad8yk2spsg"; + version = "3.1"; + sha256 = "1z3adva85qgdyx85hldqi99lnb3pg7a42q44zxil4gxwi62pw4xr"; buildDepends = [ - binary deepseq mtl primitive transformers vector zlib + binary deepseq mmap mtl primitive transformers vector zlib ]; meta = { homepage = "https://github.com/Twinside/Juicy.Pixels"; - description = "Picture loading/serialization (in png, jpeg, bitmap, radiance and gif)"; + description = "Picture loading/serialization (in png, jpeg, bitmap, gif, tiff and radiance)"; license = self.stdenv.lib.licenses.bsd3; platforms = self.ghc.meta.platforms; maintainers = [ self.stdenv.lib.maintainers.andres ]; diff --git a/pkgs/development/libraries/haskell/ListLike/default.nix b/pkgs/development/libraries/haskell/ListLike/default.nix index 2fa427b1f57e..b24e81300b62 100644 --- a/pkgs/development/libraries/haskell/ListLike/default.nix +++ b/pkgs/development/libraries/haskell/ListLike/default.nix @@ -1,11 +1,11 @@ -{ cabal }: +{ cabal, HUnit, QuickCheck, random, text, vector }: cabal.mkDerivation (self: { pname = "ListLike"; - version = "3.1.7.1"; - sha256 = "1g3i8iz71x3j41ji9xsbh84v5hj3mxls0zqnx27sb31mx6bic4w1"; - isLibrary = true; - isExecutable = true; + version = "4.0.0"; + sha256 = "13dw8pkj8dwxb81gbcm7gn221zyr3ck9s9s1iv7v1b69chv0zyxk"; + buildDepends = [ text vector ]; + testDepends = [ HUnit QuickCheck random text vector ]; meta = { homepage = "http://software.complete.org/listlike"; description = "Generic support for list-like structures"; diff --git a/pkgs/development/libraries/haskell/accelerate-cuda/default.nix b/pkgs/development/libraries/haskell/accelerate-cuda/default.nix index aee3b666890c..53f1514bcb6d 100644 --- a/pkgs/development/libraries/haskell/accelerate-cuda/default.nix +++ b/pkgs/development/libraries/haskell/accelerate-cuda/default.nix @@ -5,8 +5,8 @@ cabal.mkDerivation (self: { pname = "accelerate-cuda"; - version = "0.13.0.1"; - sha256 = "0nswa73ajvmh1s6n2nks4zm3ybfm8v46wd789cs09f5s90ingpsj"; + version = "0.13.0.3"; + sha256 = "1y0v7w08pywb8qlw0b5aw4f8pkx4bjlfwxpqq2zfqmjsclnlifkb"; buildDepends = [ accelerate binary cryptohash cuda fclabels filepath hashable hashtables languageCQuote mainlandPretty mtl SafeSemaphore srcloc diff --git a/pkgs/development/libraries/haskell/accelerate-io/default.nix b/pkgs/development/libraries/haskell/accelerate-io/default.nix index 3daa16d87c93..48c2ea71e178 100644 --- a/pkgs/development/libraries/haskell/accelerate-io/default.nix +++ b/pkgs/development/libraries/haskell/accelerate-io/default.nix @@ -2,8 +2,8 @@ cabal.mkDerivation (self: { pname = "accelerate-io"; - version = "0.13.0.1"; - sha256 = "0wjprbhcddnjqbhmpxiwq73hazdnhafhjj7mpvpxhs9pz1dbv89h"; + version = "0.13.0.2"; + sha256 = "0lm1kkjs5gbd70k554vi9977v4bxxcxaw39r9wmwxf8nx2qxvshh"; buildDepends = [ accelerate bmp repa vector ]; meta = { homepage = "https://github.com/AccelerateHS/accelerate-io"; diff --git a/pkgs/development/libraries/haskell/accelerate/default.nix b/pkgs/development/libraries/haskell/accelerate/default.nix index b91de6de44eb..c2484116f465 100644 --- a/pkgs/development/libraries/haskell/accelerate/default.nix +++ b/pkgs/development/libraries/haskell/accelerate/default.nix @@ -2,10 +2,9 @@ cabal.mkDerivation (self: { pname = "accelerate"; - version = "0.13.0.1"; - sha256 = "01vkvvvzlj023cwxz90clrcgz4xyz0nb8idm1zad21gzrij14915"; + version = "0.13.0.5"; + sha256 = "1vqkv3k0w1zy0111a786npf3hypbcg675lbdkv2cf3zx5hqcnn6j"; buildDepends = [ fclabels hashable hashtables ]; - noHaddock = true; meta = { homepage = "https://github.com/AccelerateHS/accelerate/"; description = "An embedded language for accelerated array processing"; diff --git a/pkgs/development/libraries/haskell/acid-state/default.nix b/pkgs/development/libraries/haskell/acid-state/default.nix index 10f222cfe105..dcd6698a5a25 100644 --- a/pkgs/development/libraries/haskell/acid-state/default.nix +++ b/pkgs/development/libraries/haskell/acid-state/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "acid-state"; - version = "0.8.3"; - sha256 = "1n7vafw3jz7kmlp5jqn1wv0ip2rcbyfx0cdi2m1a2lvpi6dh97gc"; + version = "0.10.0"; + sha256 = "0jjjh8l6ka8kawgp1gm75is4ajavl7nd6b2l717wjs8sy93qnzsc"; buildDepends = [ cereal extensibleExceptions filepath mtl network safecopy stm ]; diff --git a/pkgs/development/libraries/haskell/binary/0.6.0.0.nix b/pkgs/development/libraries/haskell/binary/0.6.0.0.nix new file mode 100644 index 000000000000..01e909212e88 --- /dev/null +++ b/pkgs/development/libraries/haskell/binary/0.6.0.0.nix @@ -0,0 +1,13 @@ +{ cabal }: + +cabal.mkDerivation (self: { + pname = "binary"; + version = "0.6.0.0"; + sha256 = "0p72w7f9nn19g2wggsh8x4z7y9s174f3drz9a5ln4x7h554swcxv"; + meta = { + homepage = "https://github.com/kolmodin/binary"; + description = "Binary serialisation for Haskell values using lazy ByteStrings"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/binary/default.nix b/pkgs/development/libraries/haskell/binary/0.7.1.0.nix similarity index 100% rename from pkgs/development/libraries/haskell/binary/default.nix rename to pkgs/development/libraries/haskell/binary/0.7.1.0.nix diff --git a/pkgs/development/libraries/haskell/bytedump/default.nix b/pkgs/development/libraries/haskell/bytedump/default.nix new file mode 100644 index 000000000000..8290717fa4bb --- /dev/null +++ b/pkgs/development/libraries/haskell/bytedump/default.nix @@ -0,0 +1,15 @@ +{ cabal }: + +cabal.mkDerivation (self: { + pname = "bytedump"; + version = "1.0"; + sha256 = "1pf01mna3isx3i7m50yz3pw5ygz5sg8i8pshjb3yw8q41w2ba5xf"; + isLibrary = true; + isExecutable = true; + meta = { + homepage = "http://github.com/vincenthz/hs-bytedump"; + description = "Flexible byte dump helpers for human readers"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/classy-prelude/default.nix b/pkgs/development/libraries/haskell/classy-prelude/default.nix index 51a2d6c55bad..14695fd08f59 100644 --- a/pkgs/development/libraries/haskell/classy-prelude/default.nix +++ b/pkgs/development/libraries/haskell/classy-prelude/default.nix @@ -5,8 +5,8 @@ cabal.mkDerivation (self: { pname = "classy-prelude"; - version = "0.5.7"; - sha256 = "1wq8la7nq3dh21yqwcjhwgy5s5mpqlvmrfma48v8ch6w4wwb0sqz"; + version = "0.5.8"; + sha256 = "1yq2x3mfkasprmsx1gracjhih9l9x0dsq6pdf90khlcl11qh57ir"; buildDepends = [ basicPrelude hashable liftedBase monadControl systemFilepath text transformers unorderedContainers vector diff --git a/pkgs/development/libraries/haskell/concurrent-extra/default.nix b/pkgs/development/libraries/haskell/concurrent-extra/default.nix index db380f03b5bd..9f97f7304724 100644 --- a/pkgs/development/libraries/haskell/concurrent-extra/default.nix +++ b/pkgs/development/libraries/haskell/concurrent-extra/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "concurrent-extra"; - version = "0.7.0.5"; - sha256 = "0g1ckrwgdyrlp1m352ivplajqzqhw5ymlkb4miiv7c5i9xyyyqnc"; + version = "0.7.0.6"; + sha256 = "12wq86hkgy22qydkj4fw6vb7crzv3010c2mkhsph4rdynr0v588i"; buildDepends = [ baseUnicodeSymbols stm unboundedDelays ]; testDepends = [ baseUnicodeSymbols HUnit stm testFramework testFrameworkHunit diff --git a/pkgs/development/libraries/haskell/contravariant/default.nix b/pkgs/development/libraries/haskell/contravariant/default.nix index 2c967d26085a..e1f5e2ae567a 100644 --- a/pkgs/development/libraries/haskell/contravariant/default.nix +++ b/pkgs/development/libraries/haskell/contravariant/default.nix @@ -2,12 +2,12 @@ cabal.mkDerivation (self: { pname = "contravariant"; - version = "0.4"; - sha256 = "1nqslc9vcx6v6c33fn7mvb1xhr33yl3ja92p788zx8z1drx9cqc3"; + version = "0.4.1"; + sha256 = "0alzl47lqzw9fqjqxdfy40f1aynd8mc00b2h7fj2ch0zq82hm85q"; buildDepends = [ tagged transformers transformersCompat ]; meta = { homepage = "http://github.com/ekmett/contravariant/"; - description = "Haskell 98 contravariant functors"; + description = "Contravariant functors"; license = self.stdenv.lib.licenses.bsd3; platforms = self.ghc.meta.platforms; }; diff --git a/pkgs/development/libraries/haskell/entropy/default.nix b/pkgs/development/libraries/haskell/entropy/default.nix index f98903d3dc17..797ce1711b2b 100644 --- a/pkgs/development/libraries/haskell/entropy/default.nix +++ b/pkgs/development/libraries/haskell/entropy/default.nix @@ -2,8 +2,8 @@ cabal.mkDerivation (self: { pname = "entropy"; - version = "0.2.2"; - sha256 = "1zri5qs19cbz9ydbh076q6834pspf2gqn06ssz4hsq6j65cnd9x2"; + version = "0.2.2.1"; + sha256 = "1yl1gmkmbalm27pjlpm9nhsbxpvxl8w7p8psq5apyrbdqnv9yhbg"; meta = { homepage = "https://github.com/TomMD/entropy"; description = "A platform independent entropy source"; diff --git a/pkgs/development/libraries/haskell/fingertree/default.nix b/pkgs/development/libraries/haskell/fingertree/default.nix index 299b2e926dbd..f48e1c4002e6 100644 --- a/pkgs/development/libraries/haskell/fingertree/default.nix +++ b/pkgs/development/libraries/haskell/fingertree/default.nix @@ -1,9 +1,15 @@ -{ cabal }: +{ cabal, HUnit, QuickCheck, testFramework, testFrameworkHunit +, testFrameworkQuickcheck2 +}: cabal.mkDerivation (self: { pname = "fingertree"; - version = "0.0.1.1"; - sha256 = "00llr24b2r539250fangl0jj39gf26gjwvhjpy5qg8l920hrjn78"; + version = "0.1.0.0"; + sha256 = "0c35sryzsijwavvw9x1pk5p99rhmp4g8pjh2ds419mlfgxc039ms"; + testDepends = [ + HUnit QuickCheck testFramework testFrameworkHunit + testFrameworkQuickcheck2 + ]; meta = { description = "Generic finger-tree structure, with example instances"; license = self.stdenv.lib.licenses.bsd3; diff --git a/pkgs/development/libraries/haskell/ghc-heap-view/default.nix b/pkgs/development/libraries/haskell/ghc-heap-view/default.nix index 342e2a7cd311..62b07030a460 100644 --- a/pkgs/development/libraries/haskell/ghc-heap-view/default.nix +++ b/pkgs/development/libraries/haskell/ghc-heap-view/default.nix @@ -2,8 +2,8 @@ cabal.mkDerivation (self: { pname = "ghc-heap-view"; - version = "0.5.0.1"; - sha256 = "1zqzv6r4nkzam51bb6pp2i1kkzhx5mnaqcn8wzr0hxbi5lc1088h"; + version = "0.5.1"; + sha256 = "1qi7f3phj2j63x1wd2cvk36945cxd84s12zs03hlrn49wzx2pf1n"; buildDepends = [ binary transformers ]; meta = { description = "Extract the heap representation of Haskell values and thunks"; diff --git a/pkgs/development/libraries/haskell/ghc-vis/default.nix b/pkgs/development/libraries/haskell/ghc-vis/default.nix index 12508a09c63d..856ec8104631 100644 --- a/pkgs/development/libraries/haskell/ghc-vis/default.nix +++ b/pkgs/development/libraries/haskell/ghc-vis/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "ghc-vis"; - version = "0.7.0.1"; - sha256 = "0k6pm1lqmcmgdqzcdbygdyg6bgx4k0gi77k1mxwprgr9vv3ly26w"; + version = "0.7.1"; + sha256 = "05j3yw1276wvy4va7r7pbnvhjg1k1mxzp4baxcb9jlb5dxfh0daa"; buildDepends = [ cairo deepseq fgl ghcHeapView graphviz gtk mtl svgcairo text transformers xdot diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix index 4f50ab449508..766f56ee8e33 100644 --- a/pkgs/development/libraries/haskell/hakyll/default.nix +++ b/pkgs/development/libraries/haskell/hakyll/default.nix @@ -1,42 +1,36 @@ { cabal, binary, blazeHtml, blazeMarkup, citeprocHs, cmdargs -, cryptohash, dataDefault, deepseq, filepath, httpConduit -, httpTypes, HUnit, lrucache, mtl, pandoc, parsec, QuickCheck -, random, regexBase, regexTdfa, snapCore, snapServer, tagsoup -, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, text -, time +, cryptohash, dataDefault, deepseq, filepath, fsnotify, httpConduit +, httpTypes, HUnit, lrucache, mtl, network, pandoc, parsec +, QuickCheck, random, regexBase, regexTdfa, snapCore, snapServer +, systemFilepath, tagsoup, testFramework, testFrameworkHunit +, testFrameworkQuickcheck2, text, time }: cabal.mkDerivation (self: { pname = "hakyll"; - version = "4.2.2.0"; - sha256 = "0kz8v2ip0hmvqnrxgv44g2863z1dql88razl7aa3fw01q56ihz0y"; + version = "4.3.1.0"; + sha256 = "1cx5pf0wf49cylbcgy1di218qk0fw8rgzqri9lx1v8jfl31zvsg5"; isLibrary = true; isExecutable = true; buildDepends = [ binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash - dataDefault deepseq filepath httpConduit httpTypes lrucache mtl - pandoc parsec random regexBase regexTdfa snapCore snapServer - tagsoup text time + dataDefault deepseq filepath fsnotify httpConduit httpTypes + lrucache mtl network pandoc parsec random regexBase regexTdfa + snapCore snapServer systemFilepath tagsoup text time ]; testDepends = [ binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash - dataDefault deepseq filepath httpConduit httpTypes HUnit lrucache - mtl pandoc parsec QuickCheck random regexBase regexTdfa snapCore - snapServer tagsoup testFramework testFrameworkHunit - testFrameworkQuickcheck2 text time + dataDefault deepseq filepath fsnotify httpConduit httpTypes HUnit + lrucache mtl network pandoc parsec QuickCheck random regexBase + regexTdfa snapCore snapServer systemFilepath tagsoup testFramework + testFrameworkHunit testFrameworkQuickcheck2 text time ]; doCheck = false; - patchPhase = '' - sed -i -e 's|cryptohash .*,|cryptohash,|' hakyll.cabal - ''; meta = { homepage = "http://jaspervdj.be/hakyll"; description = "A static website compiler library"; license = self.stdenv.lib.licenses.bsd3; platforms = self.ghc.meta.platforms; - maintainers = [ - self.stdenv.lib.maintainers.andres - self.stdenv.lib.maintainers.simons - ]; + maintainers = [ self.stdenv.lib.maintainers.andres ]; }; }) diff --git a/pkgs/development/libraries/haskell/hashable/1.2.0.7.nix b/pkgs/development/libraries/haskell/hashable/1.2.0.10.nix similarity index 87% rename from pkgs/development/libraries/haskell/hashable/1.2.0.7.nix rename to pkgs/development/libraries/haskell/hashable/1.2.0.10.nix index e92f0c2c9d13..2bafe55f4204 100644 --- a/pkgs/development/libraries/haskell/hashable/1.2.0.7.nix +++ b/pkgs/development/libraries/haskell/hashable/1.2.0.10.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "hashable"; - version = "1.2.0.7"; - sha256 = "1v70b85g9kx0ikgxpiqpl8dp3w9hdxm75h73g69giyiy7swn9630"; + version = "1.2.0.10"; + sha256 = "155r7zqc0kisjdslr8d1c04yqwvzwqx4d99c0zla113dvsdjhp37"; buildDepends = [ text ]; testDepends = [ HUnit QuickCheck random testFramework testFrameworkHunit diff --git a/pkgs/development/libraries/haskell/hflags/default.nix b/pkgs/development/libraries/haskell/hflags/default.nix new file mode 100644 index 000000000000..17c01f9a6599 --- /dev/null +++ b/pkgs/development/libraries/haskell/hflags/default.nix @@ -0,0 +1,14 @@ +{ cabal, text }: + +cabal.mkDerivation (self: { + pname = "hflags"; + version = "0.1.3"; + sha256 = "0nn08xqn0hvdlblnaad3nsdfkc0ssab6kvhi4qbrcq9jmjmspld3"; + buildDepends = [ text ]; + meta = { + homepage = "http://github.com/errge/hflags"; + description = "Command line flag parser, very similar to Google's gflags"; + license = "Apache-2.0"; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/hit/default.nix b/pkgs/development/libraries/haskell/hit/default.nix new file mode 100644 index 000000000000..9791478d3e81 --- /dev/null +++ b/pkgs/development/libraries/haskell/hit/default.nix @@ -0,0 +1,27 @@ +{ cabal, attoparsec, blazeBuilder, bytedump, cryptohash, HUnit, mtl +, parsec, QuickCheck, random, systemFileio, systemFilepath +, testFramework, testFrameworkQuickcheck2, time, vector, zlib +, zlibBindings +}: + +cabal.mkDerivation (self: { + pname = "hit"; + version = "0.5.0"; + sha256 = "05v49l3k8gwn922d5b5xrzdrakh6bw02bp8hd8yc8163jyazk2vx"; + isLibrary = true; + isExecutable = true; + buildDepends = [ + attoparsec blazeBuilder cryptohash mtl parsec random systemFileio + systemFilepath time vector zlib zlibBindings + ]; + testDepends = [ + bytedump HUnit QuickCheck testFramework testFrameworkQuickcheck2 + time + ]; + meta = { + homepage = "http://github.com/vincenthz/hit"; + description = "Git operations in haskell"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/hsdns/default.nix b/pkgs/development/libraries/haskell/hsdns/default.nix index b72f4d947c48..464047d0c610 100644 --- a/pkgs/development/libraries/haskell/hsdns/default.nix +++ b/pkgs/development/libraries/haskell/hsdns/default.nix @@ -2,11 +2,10 @@ cabal.mkDerivation (self: { pname = "hsdns"; - version = "1.6"; - sha256 = "1vf3crkhs7z572bqdf7p2hfcqkjxvnyg0w0cf8b7kyfxzn8bj3fa"; + version = "1.6.1"; + sha256 = "0s63acjy1n75k7gjm4kam7v5d4a5kn0aw178mygkqwr5frflghb4"; buildDepends = [ network ]; extraLibraries = [ adns ]; - noHaddock = true; meta = { homepage = "http://github.com/peti/hsdns"; description = "Asynchronous DNS Resolver"; diff --git a/pkgs/development/libraries/haskell/hsshellscript/default.nix b/pkgs/development/libraries/haskell/hsshellscript/default.nix new file mode 100644 index 000000000000..126a0d316bf6 --- /dev/null +++ b/pkgs/development/libraries/haskell/hsshellscript/default.nix @@ -0,0 +1,15 @@ +{ cabal, c2hs, parsec, random }: + +cabal.mkDerivation (self: { + pname = "hsshellscript"; + version = "3.3.1"; + sha256 = "0z3afp3r1j1in03fv2yb5sfbzgcrhdig6gay683bzgh85glwxhlp"; + buildDepends = [ parsec random ]; + buildTools = [ c2hs ]; + meta = { + homepage = "http://www.volker-wysk.de/hsshellscript/"; + description = "Haskell for Unix shell scripting tasks"; + license = "LGPL"; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/iteratee/default.nix b/pkgs/development/libraries/haskell/iteratee/default.nix index ee9026bae493..c4438d973644 100644 --- a/pkgs/development/libraries/haskell/iteratee/default.nix +++ b/pkgs/development/libraries/haskell/iteratee/default.nix @@ -10,6 +10,7 @@ cabal.mkDerivation (self: { ListLike MonadCatchIOTransformers monadControl parallel transformers transformersBase ]; + jailbreak = true; meta = { homepage = "http://www.tiresiaspress.us/haskell/iteratee"; description = "Iteratee-based I/O"; diff --git a/pkgs/development/libraries/haskell/monadcryptorandom/default.nix b/pkgs/development/libraries/haskell/monadcryptorandom/default.nix index df63e3ec6591..e955bb14a727 100644 --- a/pkgs/development/libraries/haskell/monadcryptorandom/default.nix +++ b/pkgs/development/libraries/haskell/monadcryptorandom/default.nix @@ -2,8 +2,8 @@ cabal.mkDerivation (self: { pname = "monadcryptorandom"; - version = "0.5.1"; - sha256 = "10waxc0i7hcqlgb9iwcdz0xqkym4ihavgwq466xlaqzzhcpp38d6"; + version = "0.5.2"; + sha256 = "0a0qx331c1kvhmwwam7pbbrnq8ky3spfnw6zsz6rz7g1lk1hfawn"; buildDepends = [ cryptoApi mtl tagged transformers ]; meta = { homepage = "https://github.com/TomMD/monadcryptorandom"; diff --git a/pkgs/development/libraries/haskell/mongoDB/default.nix b/pkgs/development/libraries/haskell/mongoDB/default.nix index e730125544e0..12c65deb4453 100644 --- a/pkgs/development/libraries/haskell/mongoDB/default.nix +++ b/pkgs/development/libraries/haskell/mongoDB/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "mongoDB"; - version = "1.4.0"; - sha256 = "1cj73k6lfpxmfaigqwwglnncfl1ikz6yjgs0d9f6k42kwysbddwz"; + version = "1.4.1"; + sha256 = "1r1ywqy3igcmmwxjy4fjqdnf8m4zqbc8l0nj43h2xwrl86lhfym9"; buildDepends = [ binary bson cryptohash liftedBase monadControl mtl network parsec random randomShuffle text transformersBase diff --git a/pkgs/development/libraries/haskell/persistent-template/default.nix b/pkgs/development/libraries/haskell/persistent-template/default.nix index f3ab1800dae4..2afc416cb522 100644 --- a/pkgs/development/libraries/haskell/persistent-template/default.nix +++ b/pkgs/development/libraries/haskell/persistent-template/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "persistent-template"; - version = "1.2.0.1"; - sha256 = "1l8ws4mijl0cwcl14ms8hibfgcn3y6b1679xc0cdyz1ifiymkdns"; + version = "1.2.0.2"; + sha256 = "0zj35mg7fzyk4b98s3s8m5i064s0wznz9aixgxa4kzm4xps7hj4z"; buildDepends = [ aeson monadControl monadLogger persistent text transformers ]; diff --git a/pkgs/development/libraries/haskell/persistent/default.nix b/pkgs/development/libraries/haskell/persistent/default.nix index 79fd1f6f781a..57bb615800b4 100644 --- a/pkgs/development/libraries/haskell/persistent/default.nix +++ b/pkgs/development/libraries/haskell/persistent/default.nix @@ -7,8 +7,8 @@ cabal.mkDerivation (self: { pname = "persistent"; - version = "1.2.0.1"; - sha256 = "1bs74g1fkwq4wvz18lp0ial6z58vpslgv0rqdn91ka6gw8k4fvlb"; + version = "1.2.0.2"; + sha256 = "026zdfccy57dbsacg8227jzcdyq50nb1bkcr56ryxi91ymlyf50k"; buildDepends = [ aeson attoparsec base64Bytestring blazeHtml blazeMarkup conduit liftedBase monadControl monadLogger pathPieces poolConduit diff --git a/pkgs/development/libraries/haskell/pipes-concurrency/default.nix b/pkgs/development/libraries/haskell/pipes-concurrency/default.nix index 702853766a7e..d931845f16e8 100644 --- a/pkgs/development/libraries/haskell/pipes-concurrency/default.nix +++ b/pkgs/development/libraries/haskell/pipes-concurrency/default.nix @@ -1,10 +1,10 @@ -{ cabal, pipes, stm, transformers }: +{ cabal, pipes, stm }: cabal.mkDerivation (self: { pname = "pipes-concurrency"; - version = "1.1.0"; - sha256 = "05xpwxhf08yf88ya89f8gcy4vphi6qxyccf2yiyi5zrf6c2pkr00"; - buildDepends = [ pipes stm transformers ]; + version = "1.2.0"; + sha256 = "058v9d3wf9n1d25rhdq5vj60p8mll5yv2zn2k1092bg7qisip1fq"; + buildDepends = [ pipes stm ]; meta = { description = "Concurrency for the pipes ecosystem"; license = self.stdenv.lib.licenses.bsd3; diff --git a/pkgs/development/libraries/haskell/postgresql-simple/default.nix b/pkgs/development/libraries/haskell/postgresql-simple/default.nix index 0a40cdf7a969..888f992b159a 100644 --- a/pkgs/development/libraries/haskell/postgresql-simple/default.nix +++ b/pkgs/development/libraries/haskell/postgresql-simple/default.nix @@ -5,8 +5,8 @@ cabal.mkDerivation (self: { pname = "postgresql-simple"; - version = "0.3.3.0"; - sha256 = "0srkalfg41gdnzwwa2bmwwrcdqnw13f7b94wv4d5a6sg6yf1ry1l"; + version = "0.3.3.2"; + sha256 = "1gh2ih1n6g17jry12g7nv344sfzrhfc1assslx0cjlsryhbz25lp"; buildDepends = [ attoparsec blazeBuilder blazeTextual postgresqlLibpq text time transformers vector diff --git a/pkgs/development/libraries/haskell/regex-tdfa-text/default.nix b/pkgs/development/libraries/haskell/regex-tdfa-text/default.nix new file mode 100644 index 000000000000..1a329c25b2d1 --- /dev/null +++ b/pkgs/development/libraries/haskell/regex-tdfa-text/default.nix @@ -0,0 +1,13 @@ +{ cabal, regexBase, regexTdfa, text }: + +cabal.mkDerivation (self: { + pname = "regex-tdfa-text"; + version = "1.0.0.2"; + sha256 = "1p17xv3j2xd74iilyqwlqhkmyp26asq4k1pb0h2f0wdqqfr87bfd"; + buildDepends = [ regexBase regexTdfa text ]; + meta = { + description = "Text interface for regex-tdfa"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/shake/default.nix b/pkgs/development/libraries/haskell/shake/default.nix index c5cc24cc8da1..b7f605c2b7e5 100644 --- a/pkgs/development/libraries/haskell/shake/default.nix +++ b/pkgs/development/libraries/haskell/shake/default.nix @@ -4,8 +4,8 @@ cabal.mkDerivation (self: { pname = "shake"; - version = "0.10.3"; - sha256 = "0dvpjswiiw2s4zh5sjx7qs4xp41bw2wqny0k61pkg5wvgw3b7jmh"; + version = "0.10.5"; + sha256 = "1abbls2rmpyxpj41c0afvfjh1bw6j6rz1n0w4jhqrmq0d32kpg7a"; isLibrary = true; isExecutable = true; buildDepends = [ diff --git a/pkgs/development/libraries/haskell/snap/core.nix b/pkgs/development/libraries/haskell/snap/core.nix index a20ec8e7ca5a..f2440ef250f9 100644 --- a/pkgs/development/libraries/haskell/snap/core.nix +++ b/pkgs/development/libraries/haskell/snap/core.nix @@ -1,19 +1,19 @@ { cabal, attoparsec, attoparsecEnumerator, blazeBuilder , blazeBuilderEnumerator, bytestringMmap, caseInsensitive, deepseq -, enumerator, filepath, HUnit, MonadCatchIOTransformers, mtl -, random, regexPosix, text, time, unixCompat, unorderedContainers -, vector, zlibEnum +, enumerator, filepath, hashable, HUnit, MonadCatchIOTransformers +, mtl, random, regexPosix, text, time, unixCompat +, unorderedContainers, vector, zlibEnum }: cabal.mkDerivation (self: { pname = "snap-core"; - version = "0.9.3.1"; - sha256 = "1q2lk70l0hk4l6ksjnal1bfkby0i08gdzvj9cscvxs4njxmgdapq"; + version = "0.9.4.0"; + sha256 = "08afaj4ln4nl7ymdixijzjx8hc7nnr70gz7avpzaanq5nrw0k054"; buildDepends = [ attoparsec attoparsecEnumerator blazeBuilder blazeBuilderEnumerator - bytestringMmap caseInsensitive deepseq enumerator filepath HUnit - MonadCatchIOTransformers mtl random regexPosix text time unixCompat - unorderedContainers vector zlibEnum + bytestringMmap caseInsensitive deepseq enumerator filepath hashable + HUnit MonadCatchIOTransformers mtl random regexPosix text time + unixCompat unorderedContainers vector zlibEnum ]; meta = { homepage = "http://snapframework.com/"; diff --git a/pkgs/development/libraries/haskell/template-default/default.nix b/pkgs/development/libraries/haskell/template-default/default.nix new file mode 100644 index 000000000000..a450b09b551f --- /dev/null +++ b/pkgs/development/libraries/haskell/template-default/default.nix @@ -0,0 +1,14 @@ +{ cabal, dataDefault }: + +cabal.mkDerivation (self: { + pname = "template-default"; + version = "0.1.1"; + sha256 = "07b8j11v0247fwaf3mv72m7aaq3crbsyrxmxa352vn9h2g6l1jsd"; + buildDepends = [ dataDefault ]; + meta = { + homepage = "https://github.com/haskell-pkg-janitors/template-default"; + description = "declaring Default instances just got even easier"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/vector-th-unbox/default.nix b/pkgs/development/libraries/haskell/vector-th-unbox/default.nix new file mode 100644 index 000000000000..8f5ec4b52bf8 --- /dev/null +++ b/pkgs/development/libraries/haskell/vector-th-unbox/default.nix @@ -0,0 +1,13 @@ +{ cabal, vector }: + +cabal.mkDerivation (self: { + pname = "vector-th-unbox"; + version = "0.2.0.1"; + sha256 = "1q01yk6cyjxbdnmq31d5mfac09hbql43d7xiw1snc96nmkklfpjv"; + buildDepends = [ vector ]; + meta = { + description = "Deriver for Data.Vector.Unboxed using Template Haskell"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/vector/0.10.nix b/pkgs/development/libraries/haskell/vector/0.10.nix deleted file mode 100644 index 8fac71eed4b3..000000000000 --- a/pkgs/development/libraries/haskell/vector/0.10.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ cabal, deepseq, primitive }: - -cabal.mkDerivation (self: { - pname = "vector"; - version = "0.10"; - sha256 = "0lwhsdg7wv6gwjswakf2d1h9w7lp4pznab0mz6xg5q48pgknrcig"; - buildDepends = [ deepseq primitive ]; - meta = { - homepage = "http://code.haskell.org/vector"; - description = "Efficient Arrays"; - license = self.stdenv.lib.licenses.bsd3; - platforms = self.ghc.meta.platforms; - maintainers = [ self.stdenv.lib.maintainers.andres ]; - }; -}) diff --git a/pkgs/development/libraries/haskell/vector/0.9.1.nix b/pkgs/development/libraries/haskell/vector/0.9.1.nix deleted file mode 100644 index 63add64226d6..000000000000 --- a/pkgs/development/libraries/haskell/vector/0.9.1.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ cabal, primitive }: - -cabal.mkDerivation (self: { - pname = "vector"; - version = "0.9.1"; - sha256 = "1m6p9dy48fwh2y21y7r6svhzs86a1yijkjil7ch1mdn86gv0f9as"; - buildDepends = [ primitive ]; - meta = { - homepage = "http://code.haskell.org/vector"; - description = "Efficient Arrays"; - license = self.stdenv.lib.licenses.bsd3; - platforms = self.ghc.meta.platforms; - maintainers = [ self.stdenv.lib.maintainers.andres ]; - }; -}) diff --git a/pkgs/development/libraries/haskell/xtest/default.nix b/pkgs/development/libraries/haskell/xtest/default.nix new file mode 100644 index 000000000000..d9ce47647cad --- /dev/null +++ b/pkgs/development/libraries/haskell/xtest/default.nix @@ -0,0 +1,14 @@ +{ cabal, libXtst, X11 }: + +cabal.mkDerivation (self: { + pname = "xtest"; + version = "0.2"; + sha256 = "118xxx7sydpsvdqz0x107ngb85fggn630ysw6d2ckky75fmhmxk7"; + buildDepends = [ X11 ]; + extraLibraries = [ libXtst ]; + meta = { + description = "Thin FFI bindings to X11 XTest library"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/yesod-bin/default.nix b/pkgs/development/libraries/haskell/yesod-bin/default.nix new file mode 100644 index 000000000000..717ca54d8088 --- /dev/null +++ b/pkgs/development/libraries/haskell/yesod-bin/default.nix @@ -0,0 +1,31 @@ +{ cabal, attoparsec, base64Bytestring, blazeBuilder, Cabal, conduit +, fileEmbed, filepath, fsnotify, ghcPaths, httpConduit +, httpReverseProxy, httpTypes, liftedBase, network, networkConduit +, optparseApplicative, parsec, projectTemplate, resourcet +, shakespeare, shakespeareCss, shakespeareJs, shakespeareText +, split, systemFileio, systemFilepath, tar, text, time +, transformers, unixCompat, unorderedContainers, wai, warp, yaml +, zlib +}: + +cabal.mkDerivation (self: { + pname = "yesod-bin"; + version = "1.2.0.1"; + sha256 = "0dikjxs1wdqv87ng6iqnnc3pwi3hzgqfwnnj3bb1fpz4plv4bnbc"; + isLibrary = false; + isExecutable = true; + buildDepends = [ + attoparsec base64Bytestring blazeBuilder Cabal conduit fileEmbed + filepath fsnotify ghcPaths httpConduit httpReverseProxy httpTypes + liftedBase network networkConduit optparseApplicative parsec + projectTemplate resourcet shakespeare shakespeareCss shakespeareJs + shakespeareText split systemFileio systemFilepath tar text time + transformers unixCompat unorderedContainers wai warp yaml zlib + ]; + meta = { + homepage = "http://www.yesodweb.com/"; + description = "The yesod helper executable"; + license = self.stdenv.lib.licenses.mit; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/development/libraries/haskell/yesod-core/default.nix b/pkgs/development/libraries/haskell/yesod-core/default.nix index 7518e6ff82a7..d2188c68951c 100644 --- a/pkgs/development/libraries/haskell/yesod-core/default.nix +++ b/pkgs/development/libraries/haskell/yesod-core/default.nix @@ -10,8 +10,8 @@ cabal.mkDerivation (self: { pname = "yesod-core"; - version = "1.2.1"; - sha256 = "1p9xaw0d9dx68q7i99kjcqy1lhmd164drbcw3489560wa71mwamk"; + version = "1.2.2"; + sha256 = "1fapqx1lrhhqjc9k9yc964sxnawj7ga62w83csbkkhwq3g5425yp"; buildDepends = [ aeson attoparsecConduit blazeBuilder blazeHtml blazeMarkup caseInsensitive cereal clientsession conduit cookie dataDefault diff --git a/pkgs/development/libraries/haskell/yesod-persistent/default.nix b/pkgs/development/libraries/haskell/yesod-persistent/default.nix index 1f0b330ff2c8..2c6b6f96fbc5 100644 --- a/pkgs/development/libraries/haskell/yesod-persistent/default.nix +++ b/pkgs/development/libraries/haskell/yesod-persistent/default.nix @@ -5,8 +5,8 @@ cabal.mkDerivation (self: { pname = "yesod-persistent"; - version = "1.2.0"; - sha256 = "1gzzs62mnx2q15sm3hvlk18qjgk3bi828klgl2ckc0462f7z8d0k"; + version = "1.2.1"; + sha256 = "06kzxdbg3xw128zlacsf51qi7qnccw0gjnwscxshljgipiicfhfc"; buildDepends = [ blazeBuilder conduit liftedBase persistent persistentTemplate poolConduit resourcet transformers yesodCore diff --git a/pkgs/development/libraries/haskell/yesod-platform/default.nix b/pkgs/development/libraries/haskell/yesod-platform/default.nix index 09514ea9316f..fbec41ce1249 100644 --- a/pkgs/development/libraries/haskell/yesod-platform/default.nix +++ b/pkgs/development/libraries/haskell/yesod-platform/default.nix @@ -28,8 +28,8 @@ cabal.mkDerivation (self: { pname = "yesod-platform"; - version = "1.2.0.1"; - sha256 = "0hff8kx5d1z8xmy7fnzzhvy9774r26i4bczkb4cz30v3v5pf2g15"; + version = "1.2.1"; + sha256 = "1wa1g37ipigscv8xwb5zyfawjw0fxqmwr2l6wdf507r0kvclk2ap"; buildDepends = [ aeson ansiTerminal asn1Data asn1Types attoparsec attoparsecConduit authenticate base64Bytestring baseUnicodeSymbols blazeBuilder diff --git a/pkgs/development/libraries/haskell/yesod-routes/default.nix b/pkgs/development/libraries/haskell/yesod-routes/default.nix index 44d728ffcfdf..4cbb865c9069 100644 --- a/pkgs/development/libraries/haskell/yesod-routes/default.nix +++ b/pkgs/development/libraries/haskell/yesod-routes/default.nix @@ -2,8 +2,8 @@ cabal.mkDerivation (self: { pname = "yesod-routes"; - version = "1.2.0"; - sha256 = "1d7z0v6jrl08w7qz3apwdjss3vq151y28l7231cpqiia46damib2"; + version = "1.2.0.1"; + sha256 = "0pp7g3ccd0swh1j62am1vg9r2gh65jcci5w2n4r42sqzfnql0i8z"; buildDepends = [ pathPieces text vector ]; testDepends = [ hspec HUnit pathPieces text ]; meta = { diff --git a/pkgs/development/libraries/haskell/yesod/default.nix b/pkgs/development/libraries/haskell/yesod/default.nix index 53dc5cab87cf..d2d0417da271 100644 --- a/pkgs/development/libraries/haskell/yesod/default.nix +++ b/pkgs/development/libraries/haskell/yesod/default.nix @@ -6,8 +6,8 @@ cabal.mkDerivation (self: { pname = "yesod"; - version = "1.2.0.1"; - sha256 = "1whkw0lmkyja2j6vbfcf5rjmmhmc85r4arjwjrvdmz6jkjyqham3"; + version = "1.2.1"; + sha256 = "19gwhav6sr6gd2kh92ga8a09hq9grllmnacdqkgasxwjsfxqa6zg"; buildDepends = [ aeson blazeHtml blazeMarkup dataDefault hamlet monadControl networkConduit safe shakespeareCss shakespeareJs text transformers diff --git a/pkgs/development/libraries/iksemel/default.nix b/pkgs/development/libraries/iksemel/default.nix new file mode 100644 index 000000000000..7e8061ee8bb1 --- /dev/null +++ b/pkgs/development/libraries/iksemel/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, pkgconfig, gnutls, zlib }: + +stdenv.mkDerivation rec { + name = "iksemel-${version}"; + version = "1.4"; + + src = fetchurl { + url = "https://iksemel.googlecode.com/files/${name}.tar.gz"; + sha1 = "722910b99ce794fd3f6f0e5f33fa804732cf46db"; + }; + + preConfigure = '' + sed -i -e '/if.*gnutls_check_version/,/return 1;/c return 0;' configure + export LIBGNUTLS_CONFIG="${pkgconfig}/bin/pkg-config gnutls" + ''; + + buildInputs = [ pkgconfig gnutls zlib ]; + + meta = { + homepage = "https://code.google.com/p/iksemel/"; + license = stdenv.lib.licenses.lgpl21Plus; + description = "Fast and portable XML parser and Jabber protocol library"; + }; +} diff --git a/pkgs/development/libraries/imlib/default.nix b/pkgs/development/libraries/imlib/default.nix index 24e7d2afab54..27aaad7598a0 100644 --- a/pkgs/development/libraries/imlib/default.nix +++ b/pkgs/development/libraries/imlib/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { name = "imlib-1.9.15"; src = fetchurl { - url = http://nixos.org/tarballs/imlib-1.9.15.tar.gz; + url = http://tarballs.nixos.org/imlib-1.9.15.tar.gz; md5 = "2a5561457e7f8b2e04d88f73508fd13a"; }; diff --git a/pkgs/development/libraries/java/jakarta-bcel/default.nix b/pkgs/development/libraries/java/jakarta-bcel/default.nix index 3bea2a0d8f4b..1ff88a362473 100644 --- a/pkgs/development/libraries/java/jakarta-bcel/default.nix +++ b/pkgs/development/libraries/java/jakarta-bcel/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/bcel-5.1.tar.gz; + url = http://tarballs.nixos.org/bcel-5.1.tar.gz; md5 = "318f22e4f5f59b68cd004db83a7d65dc"; }; diff --git a/pkgs/development/libraries/java/jakarta-regexp/default.nix b/pkgs/development/libraries/java/jakarta-regexp/default.nix index d6c093423d84..55c3beff70a5 100644 --- a/pkgs/development/libraries/java/jakarta-regexp/default.nix +++ b/pkgs/development/libraries/java/jakarta-regexp/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { builder = ./java-bin-builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/jakarta-regexp-1.4.tar.gz; + url = http://tarballs.nixos.org/jakarta-regexp-1.4.tar.gz; md5 = "d903d84c949df848009f3bf205b32c97"; }; diff --git a/pkgs/development/libraries/javascript/jquery-ui/default.nix b/pkgs/development/libraries/javascript/jquery-ui/default.nix index e2d48f25bb5d..24217657b108 100644 --- a/pkgs/development/libraries/javascript/jquery-ui/default.nix +++ b/pkgs/development/libraries/javascript/jquery-ui/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, unzip }: stdenv.mkDerivation rec { - name = "jquery-ui-1.10.2"; + name = "jquery-ui-1.10.3"; src = fetchurl { url = "http://jqueryui.com/resources/download/${name}.custom.zip"; - sha256 = "0r1fmqpym7bjqhjay9br4h3izky781bsda7v7552yjwkgiv391hl"; + sha256 = "1nqh3fmjgy73cbwb5sj775242i6jhz3f5b9fxgrkq00dfvkls779"; }; buildInputs = [ unzip ]; @@ -17,9 +17,13 @@ stdenv.mkDerivation rec { # For convenience, provide symlinks "jquery.min.js" etc. (i.e., # without the version number). - ln -s $out/js/jquery-ui-*.custom.min.js $out/js/jquery-ui.min.js - ln -s $out/js/jquery-1.*.min.js $out/js/jquery.min.js - ln -s $out/css/smoothness/jquery-ui-*.custom.css $out/css/smoothness/jquery-ui.css + pushd $out/js + ln -s jquery-ui-*.custom.js jquery-ui.js + ln -s jquery-ui-*.custom.min.js jquery-ui.min.js + ln -s jquery-1.*.js jquery.js + popd + pushd $out/css/smoothness + ln -s jquery-ui-*.custom.css jquery-ui.css ''; meta = { diff --git a/pkgs/development/libraries/libcanberra/default.nix b/pkgs/development/libraries/libcanberra/default.nix index 6d56cd446338..710f6bd87009 100644 --- a/pkgs/development/libraries/libcanberra/default.nix +++ b/pkgs/development/libraries/libcanberra/default.nix @@ -1,25 +1,25 @@ { stdenv, fetchurl, pkgconfig, libtool, gtk ? null -, alsaLib, pulseaudio, gstreamer ? null, libvorbis, libcap }: +, alsaLib, pulseaudio, gstreamer, gst_plugins_base, libvorbis }: stdenv.mkDerivation rec { - name = "libcanberra-0.28"; + name = "libcanberra-0.30"; src = fetchurl { - url = "http://0pointer.de/lennart/projects/libcanberra/${name}.tar.gz"; - sha256 = "1346d2y24wiyanyr5bvdnjjgq7iysy8nlq2dwjv0fzxdmcn8n7zb"; + url = "http://0pointer.de/lennart/projects/libcanberra/${name}.tar.xz"; + sha256 = "0wps39h8rx2b00vyvkia5j40fkak3dpipp1kzilqla0cgvk73dn2"; }; - buildInputs = - [ pkgconfig libtool alsaLib pulseaudio gstreamer libvorbis libcap gtk ]; + buildInputs = # ToDo: gstreamer not found (why?), add (g)udev? + [ pkgconfig libtool alsaLib pulseaudio /*gstreamer gst_plugins_base*/ libvorbis gtk ]; - configureFlags = "--disable-oss --disable-schemas-install"; + configureFlags = "--disable-oss"; passthru = { gtkModule = "/lib/gtk-2.0/"; }; meta = { - description = "libcanberra, an implementation of the XDG Sound Theme and Name Specifications"; + description = "An implementation of the XDG Sound Theme and Name Specifications"; longDescription = '' libcanberra is an implementation of the XDG Sound Theme and Name diff --git a/pkgs/development/libraries/libcroco/default.nix b/pkgs/development/libraries/libcroco/default.nix deleted file mode 100644 index 99604475e625..000000000000 --- a/pkgs/development/libraries/libcroco/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{stdenv, fetchurl, pkgconfig, libxml2, glib}: - -stdenv.mkDerivation { - name = "libcroco-0.6.4"; - - src = fetchurl { - url = mirror://gnome/sources/libcroco/0.6/libcroco-0.6.4.tar.xz; - sha256 = "1sij88na1skd4d5dx75l803fww3v9872q8m2hj6sjlkc839vl5n8"; - }; - buildInputs = [ pkgconfig libxml2 glib ]; -} diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index a2546bf2d69a..e411e599dc54 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -1,24 +1,23 @@ { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev }: stdenv.mkDerivation rec { - name = "libdrm-2.4.33"; - + name = "libdrm-2.4.42"; + src = fetchurl { url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; - sha256 = "1slgi61n4dlsfli47ql354fd1ppj7n40jd94wvnsdqx0mna9syrd"; + sha256 = "1qbnpi64hyqzd650hj6jki1d50pzypdhj3rw9m3whwbqly110rz0"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libpthreadstubs libpciaccess udev ]; + buildInputs = [ libpthreadstubs libpciaccess ] + ++ stdenv.lib.optional stdenv.isLinux udev; patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch; preConfigure = stdenv.lib.optionalString stdenv.isDarwin "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache"; - configureFlags = [ "--enable-nouveau-experimental-api" - "--enable-radeon-experimental-api" - "--enable-udev" ] + configureFlags = stdenv.lib.optional stdenv.isLinux "--enable-udev" ++ stdenv.lib.optional stdenv.isDarwin "-C"; crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ]; diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index 0438816b1b4f..cb60355ef558 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, libgpgerror }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "libgcrypt-1.5.2"; src = fetchurl { url = "mirror://gnupg/libgcrypt/${name}.tar.bz2"; - sha1 = "c9998383532ba3e8bcaf690f2f0d65e814b48d2f"; + sha256 = "0gwnzqd64cpwdmk93nll54nidsr74jpimxzj4p4z7502ylwl66p4"; }; propagatedBuildInputs = [ libgpgerror ]; @@ -34,4 +34,8 @@ stdenv.mkDerivation rec { homepage = http://gnupg.org/; platforms = stdenv.lib.platforms.all; }; -} +} # old "as" problem, see #616 and http://gnupg.10057.n7.nabble.com/Fail-to-build-on-freebsd-7-3-td30245.html + // stdenv.lib.optionalAttrs (stdenv.isFreeBSD && stdenv.isi686) + { configureFlags = [ "--disable-aesni-support" ]; } +) + diff --git a/pkgs/development/libraries/libgnome-keyring/3.x.nix b/pkgs/development/libraries/libgnome-keyring/3.x.nix deleted file mode 100644 index 54a023a16f8b..000000000000 --- a/pkgs/development/libraries/libgnome-keyring/3.x.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, fetchurl, glib, dbus_libs, libgcrypt, pkgconfig, -intltool }: - -stdenv.mkDerivation { - name = "libgnome-keyring-3.2.2"; - - src = fetchurl { - url = mirror://gnome/sources/libgnome-keyring/3.2/libgnome-keyring-3.2.2.tar.xz; - sha256 = "1cxd2vb1lzm8smq1q45dsn13s6kdqdb60lashdk7hwv035xy9jrb"; - }; - - propagatedBuildInputs = [ glib dbus_libs libgcrypt ]; - nativeBuildInputs = [ pkgconfig intltool ]; - - meta = { - inherit (glib.meta) platforms maintainers; - }; -} diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index eafa857598cb..eb0de7aa2bed 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation (rec { src = fetchurl { url = "mirror://gnupg/libgpg-error/${name}.tar.bz2"; - sha1 = "be209b013652add5c7e2c473ea114f58203cc6cd"; + sha256 = "1h0ql8j65ns2rmhj9wnc9035026crzkg226xg8614fq71947ccxf"; }; doCheck = true; diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix index 0c0dc5b764f7..af985ac91fcd 100644 --- a/pkgs/development/libraries/libgphoto2/default.nix +++ b/pkgs/development/libraries/libgphoto2/default.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl, pkgconfig, libusb, libtool, libexif, libjpeg, gettext}: stdenv.mkDerivation rec { - name = "libgphoto2-2.5.2"; + name = "libgphoto2-${meta.version}"; src = fetchurl { url = "mirror://sourceforge/gphoto/${name}.tar.bz2"; @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { MTP, and other vendor specific protocols for controlling and transferring data from digital cameras. ''; + version = "2.5.2"; # XXX: the homepage claims LGPL, but several src files are lgpl21Plus license = stdenv.lib.licenses.lgpl21Plus; platforms = with stdenv.lib.platforms; unix; diff --git a/pkgs/development/libraries/libgphoto2/default.upstream b/pkgs/development/libraries/libgphoto2/default.upstream new file mode 100644 index 000000000000..0029e6959306 --- /dev/null +++ b/pkgs/development/libraries/libgphoto2/default.upstream @@ -0,0 +1,9 @@ +url http://sourceforge.net/projects/gphoto/files/libgphoto/ +SF_version_dir +version_link '[.]tar[.]bz2/download$' +SF_redirect +do_overwrite () { + ensure_hash + set_var_value version "$CURRENT_VERSION" + set_var_value sha256 "$CURRENT_HASH" +} diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix index 56f6242c09e8..7f44e6b1706e 100644 --- a/pkgs/development/libraries/libgsf/default.nix +++ b/pkgs/development/libraries/libgsf/default.nix @@ -1,26 +1,21 @@ -{ fetchurl, stdenv, perl, perlXMLParser, pkgconfig, libxml2 -, gettext, intltool, bzip2, glib, python -, gnomeSupport ? true, gdk_pixbuf ? null -, gnome_vfs ? null, libbonobo ? null }: +{ fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2 +, python, gdk_pixbuf, libiconvOrEmpty +}: -assert gnomeSupport -> gdk_pixbuf != null && gnome_vfs != null && libbonobo != null - && glib != null; +with { inherit (stdenv.lib) optionals; }; stdenv.mkDerivation rec { - name = "libgsf-1.14.25"; + name = "libgsf-1.14.26"; src = fetchurl { url = "mirror://gnome/sources/libgsf/1.14/${name}.tar.xz"; - sha256 = "127548f07e07951984fb139c3f89d65b9e471aefe6555387de03e1113944d1a2"; + sha256 = "1md67l60li7rkma9m6mwchqz6b6q4xsfr38c6n056y6xm8jyf6c9"; }; - nativeBuildInputs = [ intltool pkgconfig ]; - buildInputs = - [ perl perlXMLParser gettext bzip2 python ] - ++ stdenv.lib.optionals gnomeSupport [ gnome_vfs gdk_pixbuf ]; + nativeBuildInputs = [ pkgconfig intltool ]; + buildInputs = [ gettext bzip2 zlib python ]; - propagatedBuildInputs = [ libxml2 glib ] - ++ stdenv.lib.optionals gnomeSupport [ libbonobo ]; + propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ] ++ libiconvOrEmpty; doCheck = true; diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix deleted file mode 100644 index 5e7a4cff741f..000000000000 --- a/pkgs/development/libraries/libgweather/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, libxml2, gtk3, intltool, libsoup, GConf3 }: - -stdenv.mkDerivation { - name = "libgweather-3.4.1"; - - src = fetchurl { - url = mirror://gnome/sources/libgweather/3.4/libgweather-3.4.1.tar.xz; - sha256 = "0q0vkggrbvy2ihwcsfynlv5qk9l3wjinls8yvmkb1qisyc4lv77f"; - }; - configureFlags = if stdenv ? glibc then "--with-zoneinfo-dir=${stdenv.glibc}/share/zoneinfo" else ""; - propagatedBuildInputs = [ libxml2 gtk3 libsoup GConf3 ]; - nativeBuildInputs = [ pkgconfig intltool ]; -} diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index eb86a1d3ff23..a4aa1cf44b41 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,15 +1,18 @@ { stdenv, fetchurl, nasm }: stdenv.mkDerivation rec { - name = "libjpeg-turbo-1.2.1"; + name = "libjpeg-turbo-1.3.0"; src = fetchurl { url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz"; - sha256 = "0w1pj3j7hkx6irkrxlcmz53l94s6im0wml1v36nysb50akq26cyb"; + sha256 = "0d0jwdmj3h89bxdxlwrys2mw18mqcj4rzgb5l2ndpah8zj600mr6"; }; buildInputs = [ nasm ]; + doCheck = true; + checkTarget = "test"; + meta = { homepage = http://libjpeg-turbo.virtualgl.org/; description = "A faster (using SIMD) libjpeg implementation"; diff --git a/pkgs/development/libraries/libmtp/default.nix b/pkgs/development/libraries/libmtp/default.nix index ced11c0ef4da..95d060df7f7d 100644 --- a/pkgs/development/libraries/libmtp/default.nix +++ b/pkgs/development/libraries/libmtp/default.nix @@ -1,13 +1,17 @@ -{ stdenv, fetchurl, libusb }: +{ stdenv, fetchurl, pkgconfig, libusb1 }: stdenv.mkDerivation rec { - name = "libmtp-1.0.1"; + name = "libmtp-1.1.5"; - propagatedBuildInputs = [ libusb ]; + propagatedBuildInputs = [ libusb1 ]; + buildInputs = [ pkgconfig ]; + + # tried to install files to /lib/udev, hopefully OK + configureFlags = [ "--with-udev=$$out/lib/udev" ]; src = fetchurl { url = "mirror://sourceforge/libmtp/${name}.tar.gz"; - sha256 = "19iha1yi07cdqzlba4ng1mn7h701binalwwkb71q0ld9b88mad6s"; + sha256 = "0fn6y7kirgln6sfizmwvjsy7qkdb0p3rccf0zkr3r2xg3cbpjxkq"; }; meta = { diff --git a/pkgs/development/libraries/libpaper/default.nix b/pkgs/development/libraries/libpaper/default.nix new file mode 100644 index 000000000000..9505a6cf052f --- /dev/null +++ b/pkgs/development/libraries/libpaper/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "1.1.24"; + name = "libpaper-${version}"; + + src = fetchurl { + url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz"; + sha256 = "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"; + }; + + meta = { + description = "Library for handling paper characteristics"; + homepage = "http://packages.debian.org/unstable/source/libpaper"; + license = "GPLv2"; + }; +} diff --git a/pkgs/development/libraries/libpng/15.nix b/pkgs/development/libraries/libpng/15.nix new file mode 100644 index 000000000000..8f62ef1e8dc9 --- /dev/null +++ b/pkgs/development/libraries/libpng/15.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, zlib }: + +assert zlib != null; + +stdenv.mkDerivation rec { + name = "libpng-1.5.15"; + + src = fetchurl { + url = "mirror://sourceforge/libpng/${name}.tar.xz"; + sha256 = "1iaplghmv5qhd4dgwfymhp42sh27vz6s2107jk698xm57z2v9hwm"; + }; + + propagatedBuildInputs = [ zlib ]; + + doCheck = true; + + passthru = { inherit zlib; }; + + meta = { + description = "The official reference implementation for the PNG file format"; + homepage = http://www.libpng.org/pub/png/libpng.html; + license = "free-non-copyleft"; # http://www.libpng.org/pub/png/src/libpng-LICENSE.txt + }; +} diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index ce23cf48587a..0a1506107817 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -3,20 +3,23 @@ assert zlib != null; stdenv.mkDerivation rec { - name = "libpng-1.5.13"; + name = "libpng-1.6.2"; src = fetchurl { url = "mirror://sourceforge/libpng/${name}.tar.xz"; - sha256 = "1vks4mqv4140b10kp53qrywsx9m4xan5ibwsrlmf42ni075zjhxq"; + sha256 = "1pljkqjqgyz8c32w8fipd9f0v2gcyhah2ypp0h7ya1r1q85sk5qw"; }; propagatedBuildInputs = [ zlib ]; + doCheck = true; + passthru = { inherit zlib; }; meta = { description = "The official reference implementation for the PNG file format"; homepage = http://www.libpng.org/pub/png/libpng.html; license = "free-non-copyleft"; # http://www.libpng.org/pub/png/src/libpng-LICENSE.txt + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/libpng/libpng-apng.nix b/pkgs/development/libraries/libpng/libpng-apng.nix index 534b0ae5a45f..bc6a773dba3b 100644 --- a/pkgs/development/libraries/libpng/libpng-apng.nix +++ b/pkgs/development/libraries/libpng/libpng-apng.nix @@ -1,29 +1,27 @@ { stdenv, fetchurl, zlib }: -assert zlib != null; - stdenv.mkDerivation rec { - version = "1.4.4"; + version = "1.5.14"; name = "libpng-apng-${version}"; - + patch_src = fetchurl { - url = "mirror://sourceforge/project/libpng-apng/libpng-master/${version}/libpng-${version}-apng.patch.gz"; - sha256 = "d729a2feacfd80547e06c30343d598302f4417cf2e6f649e4ee617690987bd24"; + url = "mirror://sourceforge/libpng-apng/libpng15/${version}/libpng-${version}-apng.patch.gz"; + sha256 = "1vcqbkdssy4srm8jqyzaipdc70xzanilqssypmwqyngp8ph0m45p"; }; src = fetchurl { - url = "mirror://sourceforge/libpng/libpng-${version}.tar.gz"; - sha256 = "d07616ba1e9c161017384feb3b576d70c160b970abfd9549ad39a622284b574a"; + url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; + sha256 = "0m3vz3gig7s63zanq5b1dgb5ph12qm0cylw4g4fbxlsq3f74hn8l"; }; preConfigure = '' gunzip < ${patch_src} | patch -Np1 ''; - + propagatedBuildInputs = [ zlib ]; passthru = { inherit zlib; }; - + meta = { description = "The official reference implementation for the PNG file format with animation patch"; homepage = http://www.libpng.org/pub/png/libpng.html; diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index 0da302038769..13385dfb65c0 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -1,16 +1,24 @@ -{stdenv, fetchurl, pkgconfig, libxml2, libgsf, bzip2, glib, gtk, libcroco}: +{ stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo +, libxml2, libgsf, bzip2, libcroco +, gtk2 ? null, gtk3 ? null +, gobjectIntrospection ? null, enableIntrospection ? false }: -stdenv.mkDerivation { - name = "librsvg-2.34.2"; +# no introspection by default, it's too big + +stdenv.mkDerivation rec { + name = "librsvg-2.36.4"; src = fetchurl { - url = mirror://gnome/sources/librsvg/2.34/librsvg-2.34.2.tar.xz; - sha256 = "0r24xr10chmz4l3ka2zy9c2245s7svzljbw9nrda3h44bcr03rsx"; + url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz"; + sha256 = "1hp6325gdkzx8yqn2d2r915ak3k6hfshjjh0sc54z3vr0i99688h"; }; - buildInputs = [ libxml2 libgsf bzip2 libcroco ]; - propagatedBuildInputs = [ glib gtk ]; + buildInputs = [ libxml2 libgsf bzip2 libcroco pango cairo ] + ++ stdenv.lib.optional enableIntrospection [ gobjectIntrospection ]; + propagatedBuildInputs = [ glib gdk_pixbuf gtk2 gtk3 ]; nativeBuildInputs = [ pkgconfig ]; + configureFlags = ["--enable-introspection=auto"]; + # It wants to add loaders and update the loaders.cache in gdk-pixbuf # Patching the Makefiles to it creates rsvg specific loaders and the # relevant loader.cache here. diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix new file mode 100644 index 000000000000..70c20caa88af --- /dev/null +++ b/pkgs/development/libraries/libsecret/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, glib, dbus_libs, unzip, automake, libtool, autoconf, m4, docbook_xsl, + intltool, gtk_doc, gobjectIntrospection, pkgconfig, libxslt, libgcrypt }: + +stdenv.mkDerivation rec { + version = "0.15"; + name = "libsecret-${version}"; + + src = fetchurl { + url = "https://git.gnome.org/browse/libsecret/snapshot/libsecret-${version}.zip"; + sha256 = "088v1z7zbdi8b0779jads7q20x1gx6c4zmrj3q0vysc7a0k16i6k"; + }; + + propagatedBuildInputs = [ glib dbus_libs ]; + nativeBuildInputs = [ unzip ]; + buildInputs = [ gtk_doc automake libtool autoconf intltool gobjectIntrospection pkgconfig libxslt libgcrypt m4 docbook_xsl ]; + + configureScript = "./autogen.sh"; + + meta = { + inherit (glib.meta) platforms maintainers; + }; +} diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 44b286459278..5101429a4037 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, zlib, libjpeg }: -let version = "3.9.7"; in +let version = "4.0.3"; in stdenv.mkDerivation rec { name = "libtiff-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { [ "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${version}.tar.gz" "http://download.osgeo.org/libtiff/tiff-${version}.tar.gz" ]; - sha256 = "0spg1hr5rsrmg88sfzb05qnf0haspq7r5hvdkxg5zib1rva4vmpm"; + sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa"; }; outputs = [ "dev" "out" "bin" "doc" ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = { description = "Library and utilities for working with the TIFF image file format"; - homepage = http://www.libtiff.org/; + homepage = http://www.remotesensing.org/libtiff/; license = "bsd"; }; } diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 8a1580d4fbe8..811909c659d2 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, pkgconfig }: stdenv.mkDerivation rec { name = "libusb-1.0.9"; @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "16sz34ix6hw2wwl3kqx6rf26fg210iryr68wc439dc065pffw879"; }; + buildInputs = [ pkgconfig ]; + meta = { homepage = http://www.libusb.org; description = "User-space USB library"; diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 5caea5ba6109..5b35d2b24ad4 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libX11, pkgconfig, libXext, mesa, libdrm, libXfixes }: stdenv.mkDerivation rec { - name = "libva-1.1.0"; + name = "libva-1.1.1"; src = fetchurl { url = "http://www.freedesktop.org/software/vaapi/releases/libva/${name}.tar.bz2"; - sha256 = "1a7g7i96ww8hmim2pq2a3xc89073lzacxn1xh9526bzhlqjdqsnv"; + sha256 = "0kfdcrzcr82g15l0vvmm6rqr0f0604d4dgrza78gn6bfx7rppby0"; }; buildInputs = [ libX11 libXext pkgconfig mesa libdrm libXfixes ]; diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index 92ab8d67c91e..158106247055 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, pkgconfig, libX11 }: +{ stdenv, fetchurl, pkgconfig, xlibs }: stdenv.mkDerivation rec { - name = "libvdpau-0.5"; - + name = "libvdpau-0.6"; + src = fetchurl { url = "http://people.freedesktop.org/~aplattner/vdpau/${name}.tar.gz"; - sha256 = "0k2ydz4yp7zynlkpd1llfwax30xndwbca36z83ah1i4ldjw2gfhx"; + sha256 = "0x9dwxzw0ilsy88kqlih3170z1zfrrsx1dr9jbwbn0cbkpnbwmcv"; }; - buildInputs = [ pkgconfig libX11 ]; + buildInputs = with xlibs; [ pkgconfig dri2proto libXext ]; - propagatedBuildInputs = [ libX11 ]; + propagatedBuildInputs = [ xlibs.libX11 ]; meta = { homepage = http://people.freedesktop.org/~aplattner/vdpau/; diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 1c225aa7853d..494a5c36a3c4 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -1,11 +1,13 @@ {stdenv, fetchurl, bash, yasm, which, perl}: +let version = "1.2.0"; +in stdenv.mkDerivation rec { - name = "libvpx-1.1.0"; - - src = fetchurl { - url = http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2; - sha256 = "1ibjxcdsazqfbbjhb8w56vy3n9qwny2m9q4kzx4rmk9v9g7p9q4w"; + name = "libvpx-" + version; + + src = fetchurl { # sadly, there's no official tarball for this release + url = "ftp://ftp.archlinux.org/other/libvpx/libvpx-${version}.tar.xz"; + sha256 = "02k9ylswgr2hvjqmg422fa9ggym0g94gzwb14nnckly698rvjc50"; }; patchPhase = '' @@ -14,15 +16,17 @@ stdenv.mkDerivation rec { sed -e '/enable linux/d' -i configure ''; - configureScript = "../configure"; + buildInputs = [ yasm which perl ]; preConfigure = '' mkdir -p build cd build ''; + configureScript = "../configure"; configureFlags = [ "--disable-install-srcs" + "--disable-install-docs" "--disable-examples" "--enable-vp8" "--enable-runtime-cpu-detect" @@ -34,8 +38,6 @@ stdenv.mkDerivation rec { make quiet=false DIST_DIR=$out install ''; - buildInputs = [ yasm which perl ]; - meta = { description = "VP8 video encoder"; homepage = http://code.google.com/p/webm; diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix new file mode 100644 index 000000000000..4a1327778d47 --- /dev/null +++ b/pkgs/development/libraries/libxkbcommon/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, yacc, flex, xkeyboard_config }: + +stdenv.mkDerivation rec { + name = "libxkbcommon-0.2.0"; + + src = fetchurl { + url = "http://xkbcommon.org/download/${name}.tar.bz2"; + sha256 = "0hpvfa8p4bhvhc1gcb578m354p5idd192xb8zlaq16d33h90msvl"; + }; + + buildInputs = [ yacc flex xkeyboard_config ]; + + configureFlags = '' + --with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb + ''; + + meta = { + description = "A library to handle keyboard descriptions"; + homepage = http://xkbcommon.org; + }; +} diff --git a/pkgs/development/libraries/libxtc_dxtn/default.nix b/pkgs/development/libraries/libxtc_dxtn/default.nix index 0e7442633d77..a23d74a2be86 100644 --- a/pkgs/development/libraries/libxtc_dxtn/default.nix +++ b/pkgs/development/libraries/libxtc_dxtn/default.nix @@ -8,8 +8,5 @@ stdenv.mkDerivation rec { sha256 = "0q5fjaknl7s0z206dd8nzk9bdh8g4p23bz7784zrllnarl90saa5"; }; - postUnpack = '' - tar xf ${mesa.src} --wildcards '*/include/' - export NIX_CFLAGS_COMPILE="-I $NIX_BUILD_TOP/[mM]esa*/include" - ''; + NIX_CFLAGS_COMPILE = "-I ${mesa}/include"; } diff --git a/pkgs/development/libraries/mesa-glu/default.nix b/pkgs/development/libraries/mesa-glu/default.nix new file mode 100644 index 000000000000..502329226ff3 --- /dev/null +++ b/pkgs/development/libraries/mesa-glu/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, pkgconfig, mesa_noglu }: + +stdenv.mkDerivation rec { + name = "glu-9.0.0"; + + src = fetchurl { + url = "ftp://ftp.freedesktop.org/pub/mesa/glu/${name}.tar.bz2"; + sha256 = "04nzlil3a6fifcmb95iix3yl8mbxdl66b99s62yzq8m7g79x0yhz"; + }; + + buildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ mesa_noglu ]; + + meta = { + description = "OpenGL utility library"; + homepage = http://cgit.freedesktop.org/mesa/glu/; + license = "bsd"; # SGI-B-2.0, which seems BSD-like + }; +} diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index d3f7afbd3084..de130d465c2e 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,41 +1,143 @@ -{ stdenv, fetchurl, flex, bison, pkgconfig, libdrm, file, expat, makedepend -, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext -, libXt, udev, enableTextureFloats ? false -, python, libxml2Python }: +{ stdenv, fetchurl, pkgconfig, intltool, flex, bison, autoconf, automake, libtool +, python, libxml2Python, file, expat, makedepend +, libdrm, xorg, wayland, udev, llvm, libffi +, libvdpau +, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt +, enableR600LlvmCompiler ? false # we would need currently unreleased LLVM or patches +, enableExtraFeatures ? false # add ~15 MB to mesa_drivers +}: if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then throw "unsupported platform for Mesa" else -let version = "8.0.4"; in +/** Packaging design: + - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). + This or the mesa attribute (which also contains GLU) are small (~ 2.2 MB, mostly headers) + and are designed to be the buildInput of other packages. + - DRI and EGL drivers are compiled into $drivers output, + which is bigger (~13 MB) and depends on LLVM (~40 MB). + These should be searched at runtime in /run/current-system/sw/lib/* + and so are kind-of impure (given by NixOS). + (I suppose on non-NixOS one would create the appropriate symlinks from there.) +*/ +let + version = "9.1.3"; + driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32"; +in stdenv.mkDerivation { - name = "mesa-${version}"; + name = "mesa-noglu-${version}"; src = fetchurl { url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2"; - md5 = "d546f988adfdf986cff45b1efa2d8a46"; + sha256="0rnpaambxv5cd6kbfyvv4b8x2rw1xj13a67xbkzmndfh08iaqpcd"; }; - patches = - stdenv.lib.optional (stdenv.system == "mips64el-linux") ./mips_wmb.patch; - prePatch = "patchShebangs ."; - configureFlags = - " --enable-gles1 --enable-gles2 --enable-gallium-egl" - + " --with-gallium-drivers=i915,nouveau,r600,svga,swrast" - # Texture floats are patented, see docs/patents.txt - + stdenv.lib.optionalString enableTextureFloats " --enable-texture-float"; + patches = [ + ./static-gallium.patch + ./dricore-gallium.patch + ./fix-rounding.patch + ]; - buildInputs = [ expat libdrm libXxf86vm libXfixes libXdamage glproto dri2proto - libxml2Python libX11 libXext libxcb libXt udev ]; + # Change the search path for EGL drivers from $drivers/* to driverLink + postPatch = '' + sed '/D_EGL_DRIVER_SEARCH_DIR=/s,EGL_DRIVER_INSTALL_DIR,${driverLink}/lib/egl,' \ + -i src/egl/main/Makefile.am + ''; + + outputs = ["out" "drivers"]; + + preConfigure = "./autogen.sh"; + + configureFlags = with stdenv.lib; [ + "--with-dri-driverdir=$(drivers)/lib/dri" + "--with-egl-driver-dir=$(drivers)/lib/egl" + "--with-dri-searchpath=${driverLink}/lib/dri" + + "--enable-dri" + "--enable-glx-tls" + "--enable-shared-glapi" "--enable-shared-gallium" + "--enable-driglx-direct" # seems enabled anyway + "--enable-gallium-llvm" "--with-llvm-shared-libs" + "--enable-xa" # used in vmware driver + + "--with-dri-drivers=i965,r200,radeon" + "--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" # radeonsi complains about R600 missing in LLVM + "--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi" + ] + ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler" # complains about R600 missing in LLVM + ++ optional enableTextureFloats "--enable-texture-float" + ++ optionals enableExtraFeatures [ + "--enable-gles1" "--enable-gles2" + "--enable-osmesa" + "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful + #"--enable-xvmc" # tests segfault with 9.1.{1,2,3} + "--enable-vdpau" + #"--enable-opencl" # ToDo: opencl seems to need libclc for clover + ]; nativeBuildInputs = [ pkgconfig python makedepend file flex bison ]; - enableParallelBuilding = true; + propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] + ++ + stdenv.lib.optionals stdenv.isLinux [libdrm] + ; + buildInputs = with xorg; [ + autoconf automake libtool intltool expat libxml2Python llvm + libXfixes glproto dri2proto libX11 libXext libxcb libXt + libffi wayland + ] ++ stdenv.lib.optionals enableExtraFeatures [ /*libXvMC*/ libvdpau ] + ++ stdenv.lib.optional stdenv.isLinux [udev] + ; - passthru = { inherit libdrm; }; + enableParallelBuilding = true; + doCheck = true; + + # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM + # ToDo: probably not all .la files are completely fixed, but it shouldn't matter + postInstall = with stdenv.lib; '' + mv -t "$drivers/lib/" \ + '' + optionalString enableExtraFeatures '' + `#$out/lib/libXvMC*` \ + $out/lib/vdpau \ + $out/lib/libOSMesa* \ + $out/lib/gbm $out/lib/libgbm* \ + $out/lib/gallium-pipe \ + '' + '' + $out/lib/libdricore* \ + $out/lib/libgallium* \ + $out/lib/libxatracker* + + '' + /* now fix references in .la files */ '' + sed "/^libdir=/s,$out,$drivers," -i \ + '' + optionalString enableExtraFeatures '' + `#$drivers/lib/libXvMC*.la` \ + $drivers/lib/vdpau/*.la \ + $drivers/lib/libOSMesa*.la \ + $drivers/lib/gallium-pipe/*.la \ + '' + '' + $drivers/lib/libgallium.la \ + $drivers/lib/libdricore*.la + + sed "s,$out\(/lib/\(libdricore[0-9\.]*\|libgallium\).la\),$drivers\1,g" \ + -i $drivers/lib/*.la $drivers/lib/*/*.la + + '' + /* work around bug #529, but maybe $drivers should also be patchelf-ed */ '' + find $drivers/ -type f -executable -print0 | xargs -0 strip -S || true + + '' + /* add RPATH so the drivers can find the moved libgallium and libdricore9 */ '' + for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do + if [[ ! -L "$lib" ]]; then + patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" + fi + done + ''; + #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM + + passthru = { inherit libdrm; inherit version; }; meta = { description = "An open source implementation of OpenGL"; diff --git a/pkgs/development/libraries/mesa/dricore-gallium.patch b/pkgs/development/libraries/mesa/dricore-gallium.patch new file mode 100644 index 000000000000..9a8b6768277b --- /dev/null +++ b/pkgs/development/libraries/mesa/dricore-gallium.patch @@ -0,0 +1,216 @@ +commit 5208f187c7dade2c33385a56c1a5f1c3cedc8377 (HEAD, nix-patches) +Author: Vladimír Čunát +Date: Mon May 13 11:34:59 2013 +0200 + + 118-dricore-gallium.patch + +diff --git a/configure.ac b/configure.ac +index be89843..08f6761 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -928,6 +928,8 @@ AC_SUBST([GLESv2_LIB_DEPS]) + AC_SUBST([GLESv2_PC_LIB_PRIV]) + + DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la" ++MESAGALLIUM_LIBS="${DRI_LIB_DEPS}" ++AC_SUBST([MESAGALLIUM_LIBS], ${MESAGALLIUM_LIBS}) + + AC_SUBST([HAVE_XF86VIDMODE]) + +diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am +index 3cdec83..53ff69b 100644 +--- a/src/gallium/auxiliary/Makefile.am ++++ b/src/gallium/auxiliary/Makefile.am +@@ -34,14 +34,14 @@ if LLVM_NEEDS_FNORTTI + + AM_CXXFLAGS += -fno-rtti + +-libgallium_la_LIBADD = $(LLVM_LIBS) +- + endif + + libgallium_la_SOURCES += \ + $(GALLIVM_SOURCES) \ + $(GALLIVM_CPP_SOURCES) + ++libgallium_la_LIBADD = ../../mesa/libdricore/libmesagallium.la $(LLVM_LIBS) $(GALLIUM_DRI_LIB_DEPS) ++ + endif + + indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py +diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am +index f4f9030..e9b9462 100644 +--- a/src/gallium/targets/dri-i915/Makefile.am ++++ b/src/gallium/targets/dri-i915/Makefile.am +@@ -49,7 +49,7 @@ i915_dri_la_SOURCES = \ + i915_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + i915_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ + $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \ +diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am +index 69ccf32..fef4c63 100644 +--- a/src/gallium/targets/dri-nouveau/Makefile.am ++++ b/src/gallium/targets/dri-nouveau/Makefile.am +@@ -48,7 +48,7 @@ nouveau_dri_la_SOURCES = \ + nouveau_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + nouveau_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ + $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \ +diff --git a/src/gallium/targets/dri-r300/Makefile.am b/src/gallium/targets/dri-r300/Makefile.am +index 8c0215d..6beb536 100644 +--- a/src/gallium/targets/dri-r300/Makefile.am ++++ b/src/gallium/targets/dri-r300/Makefile.am +@@ -49,7 +49,7 @@ r300_dri_la_SOURCES = \ + r300_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + r300_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ + $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \ +diff --git a/src/gallium/targets/dri-r600/Makefile.am b/src/gallium/targets/dri-r600/Makefile.am +index 2b3524b..d40fb89 100644 +--- a/src/gallium/targets/dri-r600/Makefile.am ++++ b/src/gallium/targets/dri-r600/Makefile.am +@@ -48,7 +48,7 @@ r600_dri_la_SOURCES = \ + r600_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + r600_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/drivers/r600/libr600.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ +diff --git a/src/gallium/targets/dri-radeonsi/Makefile.am b/src/gallium/targets/dri-radeonsi/Makefile.am +index f7d87a6..87ab2aa 100644 +--- a/src/gallium/targets/dri-radeonsi/Makefile.am ++++ b/src/gallium/targets/dri-radeonsi/Makefile.am +@@ -49,7 +49,7 @@ radeonsi_dri_la_SOURCES = \ + radeonsi_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + radeonsi_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ +diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am +index 1104379..72d2401 100644 +--- a/src/gallium/targets/dri-swrast/Makefile.am ++++ b/src/gallium/targets/dri-swrast/Makefile.am +@@ -49,7 +49,7 @@ swrast_dri_la_SOURCES = \ + swrast_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + swrast_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \ + $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \ +diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am +index ca7df65..4384976 100644 +--- a/src/gallium/targets/dri-vmwgfx/Makefile.am ++++ b/src/gallium/targets/dri-vmwgfx/Makefile.am +@@ -48,7 +48,7 @@ vmwgfx_dri_la_SOURCES = \ + vmwgfx_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined + + vmwgfx_dri_la_LIBADD = \ +- $(top_builddir)/src/mesa/libmesagallium.la \ ++ @MESAGALLIUM_LIBS@ \ + $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \ + $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \ +diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am +index 5c40ae8..6922ab2 100644 +--- a/src/gallium/targets/egl-static/Makefile.am ++++ b/src/gallium/targets/egl-static/Makefile.am +@@ -104,7 +104,7 @@ AM_CPPFLAGS += \ + $(API_DEFINES) + + egl_gallium_la_LIBADD += \ +- $(top_builddir)/src/mesa/libmesagallium.la ++ @MESAGALLIUM_LIBS@ + # make st/mesa built-in when there is a single glapi provider + if HAVE_SHARED_GLAPI + egl_gallium_la_LIBADD += \ +diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am +index 41483dd..0045a673 100644 +--- a/src/mesa/Makefile.am ++++ b/src/mesa/Makefile.am +@@ -75,9 +75,6 @@ noinst_LTLIBRARIES += libmesa.la + else + check_LTLIBRARIES = libmesa.la + endif +-if HAVE_GALLIUM +-noinst_LTLIBRARIES += libmesagallium.la +-endif + + SRCDIR = $(top_srcdir)/src/mesa/ + BUILDDIR = $(top_builddir)/src/mesa/ +@@ -119,15 +116,6 @@ libmesa_la_LIBADD = \ + $() + libmesa_la_LDFLAGS = + +-libmesagallium_la_SOURCES = \ +- $(MESA_GALLIUM_FILES) \ +- $(MESA_ASM_FILES_FOR_ARCH) +- +-libmesagallium_la_LIBADD = \ +- $(top_builddir)/src/glsl/libglsl.la \ +- $(top_builddir)/src/mesa/program/libprogram.la \ +- $() +- + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = gl.pc + +diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am +index 753548e..8761418 100644 +--- a/src/mesa/libdricore/Makefile.am ++++ b/src/mesa/libdricore/Makefile.am +@@ -42,6 +42,7 @@ libdricore@VERSION@_la_SOURCES = \ + libdricore@VERSION@_la_LDFLAGS = -version-number 1:0 + libdricore@VERSION@_la_LIBADD = \ + ../program/libdricore_program.la \ ++ $(top_builddir)/src/mapi/shared-glapi/libglapi.la + $() + + if HAVE_X86_ASM +@@ -65,8 +66,10 @@ AM_CPPFLAGS += \ + -I$(top_srcdir)/src/mesa/sparc + endif + ++lib_LTLIBRARIES = ++ + if HAVE_DRI +-lib_LTLIBRARIES = libdricore@VERSION@.la ++lib_LTLIBRARIES += libdricore@VERSION@.la + + # Provide compatibility with scripts for the old Mesa build system for + # a while by putting a link to the driver into /lib of the build tree. +@@ -76,6 +79,17 @@ all-local: libdricore@VERSION@.la + ln -sf libdricore@VERSION@.so.1 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so + endif + ++libmesagallium_la_SOURCES = \ ++ $(STATETRACKER_FILES) ++libmesagallium_la_CFLAGS = @LLVM_CFLAGS@ ++libmesagallium_la_CXXFLAGS = @LLVM_CXXFLAGS@ ++libmesagallium_la_LIBADD = libdricore@VERSION@.la $(LLVM_LIBS) ++ ++if HAVE_GALLIUM ++noinst_LTLIBRARIES = libmesagallium.la ++endif ++ ++ + CLEANFILES = \ + $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1 \ + $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so diff --git a/pkgs/development/libraries/mesa/fix-rounding.patch b/pkgs/development/libraries/mesa/fix-rounding.patch new file mode 100644 index 000000000000..f81760a6708a --- /dev/null +++ b/pkgs/development/libraries/mesa/fix-rounding.patch @@ -0,0 +1,357 @@ +From c25ae5d27b114e23d5734f846002df1a05759658 Mon Sep 17 00:00:00 2001 +From: Roland Scheidegger +Date: Thu, 31 Jan 2013 19:27:49 +0000 +Subject: gallivm: fix issues with trunc/round/floor/ceil with no arch rounding + +The emulation of these if there's no rounding instruction available +is a bit more complicated than what the code did. +In particular, doing fp-to-int/int-to-fp will not work if the exponent +is large enough (and with NaNs, Infs). Hence such values need to be filtered +out and the original value returned in this case (which fortunately should +always be exact). This comes at the expense of performance (if your cpu +doesn't support rounding instructions). +Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for +values near negative (for floor) or positive (for ceil) zero, fix that as well +(fixing this issue might not actually be slower except for ceil/iceil if the +type is not signed which is probably rare - note iceil has no callers left +in any case). + +Also add some new rounding test values in lp_test_arit to actually test +for that stuff (which previously would have failed without sse41). + +This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701. +--- +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c +index b4e9f23..ec05026 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c +@@ -1590,12 +1590,37 @@ lp_build_trunc(struct lp_build_context *bld, + return lp_build_round_arch(bld, a, LP_BUILD_ROUND_TRUNCATE); + } + else { +- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type); +- LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->gallivm, type); +- LLVMValueRef res; +- res = LLVMBuildFPToSI(builder, a, int_vec_type, ""); +- res = LLVMBuildSIToFP(builder, res, vec_type, ""); +- return res; ++ const struct lp_type type = bld->type; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); ++ LLVMValueRef trunc, res, anosign, mask; ++ LLVMTypeRef int_vec_type = bld->int_vec_type; ++ LLVMTypeRef vec_type = bld->vec_type; ++ ++ assert(type.width == 32); /* might want to handle doubles at some point */ ++ ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); ++ ++ /* round by truncation */ ++ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, ""); ++ res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc"); ++ ++ /* mask out sign bit */ ++ anosign = lp_build_abs(bld, a); ++ /* ++ * mask out all values if anosign > 2^24 ++ * This should work both for large ints (all rounding is no-op for them ++ * because such floats are always exact) as well as special cases like ++ * NaNs, Infs (taking advantage of the fact they use max exponent). ++ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.) ++ */ ++ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, ""); ++ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, ""); ++ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval); ++ return lp_build_select(bld, mask, a, res); + } + } + +@@ -1620,11 +1645,36 @@ lp_build_round(struct lp_build_context *bld, + return lp_build_round_arch(bld, a, LP_BUILD_ROUND_NEAREST); + } + else { +- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type); +- LLVMValueRef res; ++ const struct lp_type type = bld->type; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); ++ LLVMValueRef res, anosign, mask; ++ LLVMTypeRef int_vec_type = bld->int_vec_type; ++ LLVMTypeRef vec_type = bld->vec_type; ++ ++ assert(type.width == 32); /* might want to handle doubles at some point */ ++ ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); ++ + res = lp_build_iround(bld, a); + res = LLVMBuildSIToFP(builder, res, vec_type, ""); +- return res; ++ ++ /* mask out sign bit */ ++ anosign = lp_build_abs(bld, a); ++ /* ++ * mask out all values if anosign > 2^24 ++ * This should work both for large ints (all rounding is no-op for them ++ * because such floats are always exact) as well as special cases like ++ * NaNs, Infs (taking advantage of the fact they use max exponent). ++ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.) ++ */ ++ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, ""); ++ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, ""); ++ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval); ++ return lp_build_select(bld, mask, a, res); + } + } + +@@ -1648,11 +1698,52 @@ lp_build_floor(struct lp_build_context *bld, + return lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR); + } + else { +- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type); +- LLVMValueRef res; +- res = lp_build_ifloor(bld, a); +- res = LLVMBuildSIToFP(builder, res, vec_type, ""); +- return res; ++ const struct lp_type type = bld->type; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); ++ LLVMValueRef trunc, res, anosign, mask; ++ LLVMTypeRef int_vec_type = bld->int_vec_type; ++ LLVMTypeRef vec_type = bld->vec_type; ++ ++ assert(type.width == 32); /* might want to handle doubles at some point */ ++ ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); ++ ++ /* round by truncation */ ++ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, ""); ++ res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc"); ++ ++ if (type.sign) { ++ LLVMValueRef tmp; ++ ++ /* ++ * fix values if rounding is wrong (for non-special cases) ++ * - this is the case if trunc > a ++ */ ++ mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, res, a); ++ /* tmp = trunc > a ? 1.0 : 0.0 */ ++ tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, ""); ++ tmp = lp_build_and(&intbld, mask, tmp); ++ tmp = LLVMBuildBitCast(builder, tmp, vec_type, ""); ++ res = lp_build_sub(bld, res, tmp); ++ } ++ ++ /* mask out sign bit */ ++ anosign = lp_build_abs(bld, a); ++ /* ++ * mask out all values if anosign > 2^24 ++ * This should work both for large ints (all rounding is no-op for them ++ * because such floats are always exact) as well as special cases like ++ * NaNs, Infs (taking advantage of the fact they use max exponent). ++ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.) ++ */ ++ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, ""); ++ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, ""); ++ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval); ++ return lp_build_select(bld, mask, a, res); + } + } + +@@ -1676,11 +1767,48 @@ lp_build_ceil(struct lp_build_context *bld, + return lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL); + } + else { +- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type); +- LLVMValueRef res; +- res = lp_build_iceil(bld, a); +- res = LLVMBuildSIToFP(builder, res, vec_type, ""); +- return res; ++ const struct lp_type type = bld->type; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); ++ LLVMValueRef trunc, res, anosign, mask, tmp; ++ LLVMTypeRef int_vec_type = bld->int_vec_type; ++ LLVMTypeRef vec_type = bld->vec_type; ++ ++ assert(type.width == 32); /* might want to handle doubles at some point */ ++ ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); ++ ++ /* round by truncation */ ++ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, ""); ++ trunc = LLVMBuildSIToFP(builder, trunc, vec_type, "ceil.trunc"); ++ ++ /* ++ * fix values if rounding is wrong (for non-special cases) ++ * - this is the case if trunc < a ++ */ ++ mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a); ++ /* tmp = trunc < a ? 1.0 : 0.0 */ ++ tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, ""); ++ tmp = lp_build_and(&intbld, mask, tmp); ++ tmp = LLVMBuildBitCast(builder, tmp, vec_type, ""); ++ res = lp_build_add(bld, trunc, tmp); ++ ++ /* mask out sign bit */ ++ anosign = lp_build_abs(bld, a); ++ /* ++ * mask out all values if anosign > 2^24 ++ * This should work both for large ints (all rounding is no-op for them ++ * because such floats are always exact) as well as special cases like ++ * NaNs, Infs (taking advantage of the fact they use max exponent). ++ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.) ++ */ ++ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, ""); ++ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, ""); ++ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval); ++ return lp_build_select(bld, mask, a, res); + } + } + +@@ -1826,32 +1954,30 @@ lp_build_ifloor(struct lp_build_context *bld, + res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR); + } + else { +- /* Take the sign bit and add it to 1 constant */ +- LLVMTypeRef vec_type = bld->vec_type; +- unsigned mantissa = lp_mantissa(type); +- LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type, +- (unsigned long long)1 << (type.width - 1)); +- LLVMValueRef sign; +- LLVMValueRef offset; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef trunc, itrunc, mask; + +- /* sign = a < 0 ? ~0 : 0 */ +- sign = LLVMBuildBitCast(builder, a, int_vec_type, ""); +- sign = LLVMBuildAnd(builder, sign, mask, ""); +- sign = LLVMBuildAShr(builder, sign, +- lp_build_const_int_vec(bld->gallivm, type, +- type.width - 1), +- "ifloor.sign"); ++ assert(type.floating); ++ assert(lp_check_value(type, a)); + +- /* offset = -0.99999(9)f */ +- offset = lp_build_const_vec(bld->gallivm, type, +- -(double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa)); +- offset = LLVMConstBitCast(offset, int_vec_type); ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); + +- /* offset = a < 0 ? offset : 0.0f */ +- offset = LLVMBuildAnd(builder, offset, sign, ""); +- offset = LLVMBuildBitCast(builder, offset, vec_type, "ifloor.offset"); ++ /* round by truncation */ ++ itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, ""); ++ trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "ifloor.trunc"); + +- res = LLVMBuildFAdd(builder, res, offset, "ifloor.res"); ++ /* ++ * fix values if rounding is wrong (for non-special cases) ++ * - this is the case if trunc > a ++ * The results of doing this with NaNs, very large values etc. ++ * are undefined but this seems to be the case anyway. ++ */ ++ mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, trunc, a); ++ /* cheapie minus one with mask since the mask is minus one / zero */ ++ return lp_build_add(&intbld, itrunc, mask); + } + } + +@@ -1883,35 +2009,30 @@ lp_build_iceil(struct lp_build_context *bld, + res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL); + } + else { +- LLVMTypeRef vec_type = bld->vec_type; +- unsigned mantissa = lp_mantissa(type); +- LLVMValueRef offset; ++ struct lp_type inttype; ++ struct lp_build_context intbld; ++ LLVMValueRef trunc, itrunc, mask; + +- /* offset = 0.99999(9)f */ +- offset = lp_build_const_vec(bld->gallivm, type, +- (double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa)); ++ assert(type.floating); ++ assert(lp_check_value(type, a)); + +- if (type.sign) { +- LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type, +- (unsigned long long)1 << (type.width - 1)); +- LLVMValueRef sign; ++ inttype = type; ++ inttype.floating = 0; ++ lp_build_context_init(&intbld, bld->gallivm, inttype); + +- /* sign = a < 0 ? 0 : ~0 */ +- sign = LLVMBuildBitCast(builder, a, int_vec_type, ""); +- sign = LLVMBuildAnd(builder, sign, mask, ""); +- sign = LLVMBuildAShr(builder, sign, +- lp_build_const_int_vec(bld->gallivm, type, +- type.width - 1), +- "iceil.sign"); +- sign = LLVMBuildNot(builder, sign, "iceil.not"); +- +- /* offset = a < 0 ? 0.0 : offset */ +- offset = LLVMConstBitCast(offset, int_vec_type); +- offset = LLVMBuildAnd(builder, offset, sign, ""); +- offset = LLVMBuildBitCast(builder, offset, vec_type, "iceil.offset"); +- } ++ /* round by truncation */ ++ itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, ""); ++ trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "iceil.trunc"); + +- res = LLVMBuildFAdd(builder, a, offset, "iceil.res"); ++ /* ++ * fix values if rounding is wrong (for non-special cases) ++ * - this is the case if trunc < a ++ * The results of doing this with NaNs, very large values etc. ++ * are undefined but this seems to be the case anyway. ++ */ ++ mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a); ++ /* cheapie plus one with mask since the mask is minus one / zero */ ++ return lp_build_sub(&intbld, itrunc, mask); + } + + /* round to nearest (toward zero) */ +diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c +index 99928b8..f14e4b3 100644 +--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c ++++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c +@@ -207,6 +207,18 @@ const float round_values[] = { + -10.0, -1, 0.0, 12.0, + -1.49, -0.25, 1.25, 2.51, + -0.99, -0.01, 0.01, 0.99, ++ 1.401298464324817e-45f, // smallest denormal ++ -1.401298464324817e-45f, ++ 1.62981451e-08f, ++ -1.62981451e-08f, ++ 1.62981451e15f, // large number not representable as 32bit int ++ -1.62981451e15f, ++ FLT_EPSILON, ++ -FLT_EPSILON, ++ 1.0f - 0.5f*FLT_EPSILON, ++ -1.0f + FLT_EPSILON, ++ FLT_MAX, ++ -FLT_MAX + }; + + static float fractf(float x) +-- +cgit v0.9.0.2-2-gbebe diff --git a/pkgs/development/libraries/mesa/mips_wmb.patch b/pkgs/development/libraries/mesa/mips_wmb.patch deleted file mode 100644 index 1ffa1bdd8df4..000000000000 --- a/pkgs/development/libraries/mesa/mips_wmb.patch +++ /dev/null @@ -1,16 +0,0 @@ -rixed told me (viric) it's the patch to apply for mesa. -I adapted his patch for mesa 7.5 to this 7.10 - -diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h -index a82a659..d8d8d9a 100644 ---- a/src/mesa/drivers/dri/sis/sis_context.h -+++ b/src/mesa/drivers/dri/sis/sis_context.h -@@ -404,6 +404,8 @@ struct sis_context - #define MMIO_WMB() __asm __volatile("" : : : "memory") - #elif defined(__ia64__) - #define MMIO_WMB() __asm __volatile("mf" : : : "memory") -+#elif defined(__mips__) -+#define MMIO_WMB() __asm __volatile("" : : : "memory") - #else - #error platform needs WMB - #endif diff --git a/pkgs/development/libraries/mesa/static-gallium.patch b/pkgs/development/libraries/mesa/static-gallium.patch new file mode 100644 index 000000000000..755682d9f1e8 --- /dev/null +++ b/pkgs/development/libraries/mesa/static-gallium.patch @@ -0,0 +1,71 @@ +commit 2c910b6f186616cac8134e2a2cbe239c8351ed99 +Author: Vladimír Čunát +Date: Mon May 13 11:34:34 2013 +0200 + + 117-static-gallium.patch + + Conflicts (moving of VISIBILITY_ confused the merge): + src/gallium/auxiliary/Makefile.am + +diff --git a/configure.ac b/configure.ac +index b9fcb0b..be89843 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -747,6 +747,19 @@ if test "x$enable_shared_glapi" = xyes; then + fi + AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes) + ++AC_ARG_ENABLE([shared-gallium], ++ [AS_HELP_STRING([--enable-shared-gallium], ++ [Enable shared gallium core @<:@default=yes@:>@])], ++ [enable_shared_gallium="$enableval"], ++ [enable_shared_gallium=yes]) ++ ++SHARED_GALLIUM="0" ++if test "x$enable_shared_gallium" = xyes; then ++ SHARED_GALLIUM="1" ++fi ++AC_SUBST([SHARED_GALLIUM]) ++AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test $SHARED_GALLIUM = 1) ++ + dnl + dnl Driver specific build directories + dnl +diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am +index f14279b..3cdec83 100644 +--- a/src/gallium/auxiliary/Makefile.am ++++ b/src/gallium/auxiliary/Makefile.am +@@ -3,14 +3,19 @@ AUTOMAKE_OPTIONS = subdir-objects + include Makefile.sources + include $(top_srcdir)/src/gallium/Automake.inc + +-noinst_LTLIBRARIES = libgallium.la +- + AM_CFLAGS = \ + -I$(top_srcdir)/src/gallium/auxiliary/util \ +- $(GALLIUM_CFLAGS) \ +- $(VISIBILITY_CFLAGS) ++ $(GALLIUM_CFLAGS) + +-AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) ++AM_CXXFLAGS = ++ ++if HAVE_SHARED_GALLIUM ++lib_LTLIBRARIES = libgallium.la ++else ++noinst_LTLIBRARIES = libgallium.la ++AM_CFLAGS += $(VISIBILITY_CFLAGS) ++AM_CXXFLAGS += $(VISIBILITY_CXXFLAGS) ++endif + + libgallium_la_SOURCES = \ + $(C_SOURCES) \ +@@ -29,6 +34,8 @@ if LLVM_NEEDS_FNORTTI + + AM_CXXFLAGS += -fno-rtti + ++libgallium_la_LIBADD = $(LLVM_LIBS) ++ + endif + + libgallium_la_SOURCES += \ diff --git a/pkgs/development/libraries/mpfr/3.1.2.nix b/pkgs/development/libraries/mpfr/3.1.2.nix new file mode 100644 index 000000000000..fd164cf91052 --- /dev/null +++ b/pkgs/development/libraries/mpfr/3.1.2.nix @@ -0,0 +1,51 @@ + +{stdenv, fetchurl, gmp}: + +stdenv.mkDerivation (rec { + name = "mpfr-3.1.2"; + + src = fetchurl { + url = "mirror://gnu/mpfr/${name}.tar.bz2"; + sha256 = "0sqvpfkzamxdr87anzakf9dhkfh15lfmm5bsqajk02h1mxh3zivr"; + }; + + buildInputs = [ gmp ]; + + doCheck = true; + + enableParallelBuilding = true; + + meta = { + homepage = http://www.mpfr.org/; + description = "GNU MPFR, a library for multiple-precision floating-point arithmetic"; + + longDescription = '' + The GNU MPFR library is a C library for multiple-precision + floating-point computations with correct rounding. MPFR is + based on the GMP multiple-precision library. + + The main goal of MPFR is to provide a library for + multiple-precision floating-point computation which is both + efficient and has a well-defined semantics. It copies the good + ideas from the ANSI/IEEE-754 standard for double-precision + floating-point arithmetic (53-bit mantissa). + ''; + + license = "LGPLv2+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = stdenv.lib.platforms.all; + }; +} + +// + +(stdenv.lib.optionalAttrs stdenv.isFreeBSD { + /* Work around a FreeBSD bug that otherwise leads to segfaults in + the test suite: + http://hydra.bordeaux.inria.fr/build/34862 + http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00015.html + http://www.freebsd.org/cgi/query-pr.cgi?pr=161344 + */ + configureFlags = [ "--disable-thread-safe" ]; + })) diff --git a/pkgs/development/libraries/nlopt/default.nix b/pkgs/development/libraries/nlopt/default.nix index 0936332cd489..cc216a59d758 100644 --- a/pkgs/development/libraries/nlopt/default.nix +++ b/pkgs/development/libraries/nlopt/default.nix @@ -1,12 +1,19 @@ -{ fetchurl, stdenv }: +{ fetchurl, stdenv +, withOctave ? true, octave ? null}: stdenv.mkDerivation rec { - name = "nlopt-2.2.1"; + name = "nlopt-2.3"; src = fetchurl { url = "http://ab-initio.mit.edu/nlopt/${name}.tar.gz"; - sha256 = "0p7ri7dcp6vga7jwng7wj9bf2ixk6p5ldxp76r93xkrdixqfngaq"; + sha256 = "1iw2cjgypyqz779f47fz0nmifbrvk4zs4rxi1ibk36f4ly3wg6p6"; }; - configureFlags = "--with-cxx --with-pic --without-guile --without-python --without-octave --without-matlab"; + buildInputs = stdenv.lib.optional withOctave octave; + + configureFlags = "--with-cxx --enable-shared --with-pic --without-guile --without-python + --without-matlab " + + stdenv.lib.optionalString withOctave ("--with-octave " + + "M_INSTALL_DIR=$(out)/${octave.sitePath}/m " + + "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct "); } diff --git a/pkgs/development/libraries/openjpeg/default.nix b/pkgs/development/libraries/openjpeg/default.nix index 6024456652c6..7fd18af450c3 100644 --- a/pkgs/development/libraries/openjpeg/default.nix +++ b/pkgs/development/libraries/openjpeg/default.nix @@ -1,13 +1,21 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, pkgconfig, libpng, libtiff, lcms2, glib/*passthru only*/ }: stdenv.mkDerivation rec { name = "openjpeg-1.5.1"; + passthru = { + incDir = "openjpeg-1.5"; + }; src = fetchurl { url = "http://openjpeg.googlecode.com/files/${name}.tar.gz"; sha256 = "13dbyf3jwr4h2dn1k11zph3jgx17z7d66xmi640mbsf8l6bk1yvc"; }; + nativebuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ libpng libtiff lcms2 ]; # in closure anyway + + postInstall = glib.flattenInclude; + meta = { homepage = http://www.openjpeg.org/; description = "Open-source JPEG 2000 codec written in C language"; diff --git a/pkgs/development/libraries/pango/1.30.x.nix b/pkgs/development/libraries/pango/default.nix similarity index 72% rename from pkgs/development/libraries/pango/1.30.x.nix rename to pkgs/development/libraries/pango/default.nix index fa6d50d6c877..2de9d98e579a 100644 --- a/pkgs/development/libraries/pango/1.30.x.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -1,20 +1,23 @@ -{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng, fontconfig }: +{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng, harfbuzz, fontconfig +, libintlOrEmpty }: stdenv.mkDerivation rec { - name = "pango-1.30.1"; + name = "pango-1.32.5"; #.6 needs a not-yet-stable fontconfig src = fetchurl { - url = "mirror://gnome/sources/pango/1.30/${name}.tar.xz"; - sha256 = "3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe"; + url = "mirror://gnome/sources/pango/1.32/${name}.tar.xz"; + sha256 = "08aqis6j8nd1lb4f2h4h9d9kjvp54iwf8zvqzss0qn4v7nfcjyvx"; }; outputs = [ "dev" "out" "bin" "doc" ]; + NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ]; nativeBuildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ x11 glib cairo libpng ]; + propagatedBuildInputs = [ x11 glib cairo libpng harfbuzz ] ++ libintlOrEmpty; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/pangox-compat/default.nix b/pkgs/development/libraries/pangox-compat/default.nix new file mode 100644 index 000000000000..8518083b4d35 --- /dev/null +++ b/pkgs/development/libraries/pangox-compat/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, pkgconfig, glib, pango, libX11 }: + +stdenv.mkDerivation rec { + name = "pangox-compat-0.0.2"; + + src = fetchurl { + url = "mirror://gnome/sources/pangox-compat/0.0/${name}.tar.xz"; + sha256 = "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"; + }; + + buildInputs = [ pkgconfig glib pango libX11 ]; + + meta = { + description = "A compatibility library for pango>1.30.*"; + + homepage = http://www.pango.org/; + license = "LGPLv2+"; + }; +} diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix index 0f9a3dc2b2da..4f3cd931fce5 100644 --- a/pkgs/development/libraries/pdf2xml/default.nix +++ b/pkgs/development/libraries/pdf2xml/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation { name = "pdf2xml"; src = fetchurl { - url = http://nixos.org/tarballs/pdf2xml.tar.gz; + url = http://tarballs.nixos.org/pdf2xml.tar.gz; sha256 = "04rl7ppxqgnvxvvws669cxp478lnrdmiqj0g3m4p69bawfjc4z3w"; }; sourceRoot = "pdf2xml/pdf2xml"; diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix new file mode 100644 index 000000000000..7fbcedda3956 --- /dev/null +++ b/pkgs/development/libraries/pixman/default.nix @@ -0,0 +1,22 @@ +{ fetchurl, stdenv, pkgconfig, perl, withPNG ? true, libpng, glib /*just passthru*/ }: + +stdenv.mkDerivation rec { + name = "pixman-0.28.2"; + + src = fetchurl { + url = "http://cairographics.org/releases/${name}.tar.gz"; + sha256 = "0mcvxd5gx3w1wzgph91l2vaiic91jmx7s01hi2igphyvd80ckyia"; + }; + + nativeBuildInputs = [ pkgconfig perl ]; + + buildInputs = stdenv.lib.optional withPNG [ libpng ]; # NOT in closure anyway + + postInstall = glib.flattenInclude; + + meta = { + homepage = http://pixman.org; + description = "A low-level library for pixel manipulation"; + license = "MIT"; + }; +} diff --git a/pkgs/development/libraries/poppler/0.18.nix b/pkgs/development/libraries/poppler/0.18.nix new file mode 100644 index 000000000000..29e99b675491 --- /dev/null +++ b/pkgs/development/libraries/poppler/0.18.nix @@ -0,0 +1,53 @@ +{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib +, libjpeg, curl, libpthreadstubs, xorg, openjpeg +, libxml2, pkgconfig, cmake, lcms2, libiconvOrEmpty +, glibSupport ? false, glib, gtk3Support ? false, gtk3 # gtk2 no longer accepted +, qt4Support ? false, qt4 ? null +}: + +stdenv.mkDerivation rec { + name = "poppler-0.18.4"; + + src = fetchurl { + url = "${meta.homepage}${name}.tar.gz"; + sha256 = "0bnl05al7mjndp2h0355946j59nfw76f5v0x57d47q68rm412hik"; + }; + + propagatedBuildInputs = with xorg; + [ zlib cairo freetype fontconfig libjpeg lcms2 curl + libpthreadstubs libxml2 stdenv.gcc.libc + libXau libXdmcp libxcb libXrender libXext + openjpeg + ] + ++ stdenv.lib.optional glibSupport glib + ++ stdenv.lib.optional gtk3Support gtk3 + ++ stdenv.lib.optional qt4Support qt4; + + nativeBuildInputs = [ pkgconfig cmake ] ++ libiconvOrEmpty; + + cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON"; + + patches = [ ./datadir_env.patch ]; + + # XXX: The Poppler/Qt4 test suite refers to non-existent PDF files + # such as `../../../test/unittestcases/UseNone.pdf'. + #doCheck = !qt4Support; + checkTarget = "test"; + + enableParallelBuilding = true; + + meta = { + homepage = http://poppler.freedesktop.org/; + description = "Poppler, a PDF rendering library"; + + longDescription = '' + Poppler is a PDF rendering library based on the xpdf-3.0 code base. + ''; + + platforms = if qt4Support + then qt4.meta.platforms + else stdenv.lib.platforms.all; + + license = "GPLv2"; + }; +} diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 1d796789210c..7c392832406a 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -1,50 +1,72 @@ -{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib -, libjpeg, pixman, curl, libpthreadstubs, libXau, libXdmcp, openjpeg -, libxml2, pkgconfig, cmake, lcms -, gtkSupport ? false, glib ? null, gtk ? null +{ stdenv, fetchurl, fetchgit, pkgconfig, cmake, libiconvOrEmpty, libintlOrEmpty +, zlib, curl, cairo, freetype, fontconfig, lcms2, libjpeg, openjpeg , qt4Support ? false, qt4 ? null }: -stdenv.mkDerivation rec { - name = "poppler-0.22.4"; +let + version = "0.22.4"; # even major numbers are stable + sha256 = "0fz1vk0rbxvnv7ssj8l910k1rx0gjhzl5wr7hkdf4r9jwqs8yhsg"; - src = fetchurl { - url = "${meta.homepage}${name}.tar.gz"; - sha256 = "0fz1vk0rbxvnv7ssj8l910k1rx0gjhzl5wr7hkdf4r9jwqs8yhsg"; - }; + qtcairo_patches = + let qtcairo = fetchgit { # the version for poppler-0.22 + url = "git://github.com/giddie/poppler-qt4-cairo-backend.git"; + rev = "7a12c58e5cefc2b7a5179c53b387fca8963195c0"; + sha256 = "1jg2d5y62d0bv206nijb63x426zfb2awy70505nx22d0fx1v1p9k"; + }; in + [ "${qtcairo}/0001-Cairo-backend-added-to-Qt4-wrapper.patch" + "${qtcairo}/0002-Setting-default-Qt4-backend-to-Cairo.patch" + "${qtcairo}/0003-Forcing-subpixel-rendering-in-Cairo-backend.patch" ]; - propagatedBuildInputs = - [ zlib cairo freetype fontconfig libjpeg lcms pixman curl - libpthreadstubs libXau libXdmcp openjpeg libxml2 stdenv.gcc.libc - ] - ++ stdenv.lib.optionals gtkSupport [ glib gtk ] - ++ stdenv.lib.optional qt4Support qt4; + poppler_drv = nameSuff: merge: stdenv.mkDerivation (stdenv.lib.mergeAttrsByFuncDefaultsClean [ + rec { + name = "poppler-${nameSuff}-${version}"; - nativeBuildInputs = [ pkgconfig cmake ]; + src = fetchurl { + url = "${meta.homepage}/poppler-${version}.tar.gz"; + inherit sha256; + }; - cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON"; + propagatedBuildInputs = [ zlib cairo freetype fontconfig libjpeg lcms2 curl openjpeg ]; - patches = [ ./datadir_env.patch ]; + nativeBuildInputs = [ pkgconfig cmake ] ++ libiconvOrEmpty ++ libintlOrEmpty; - # XXX: The Poppler/Qt4 test suite refers to non-existent PDF files - # such as `../../../test/unittestcases/UseNone.pdf'. - #doCheck = !qt4Support; - checkTarget = "test"; + cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON"; - enableParallelBuilding = true; + patches = [ ./datadir_env.patch ]; - meta = { - homepage = http://poppler.freedesktop.org/; - description = "Poppler, a PDF rendering library"; + # XXX: The Poppler/Qt4 test suite refers to non-existent PDF files + # such as `../../../test/unittestcases/UseNone.pdf'. + #doCheck = !qt4Support; + checkTarget = "test"; - longDescription = '' - Poppler is a PDF rendering library based on the xpdf-3.0 code base. - ''; + enableParallelBuilding = true; - platforms = if qt4Support - then qt4.meta.platforms - else stdenv.lib.platforms.all; + meta = { + homepage = http://poppler.freedesktop.org/; + description = "A PDF rendering library"; - license = "GPLv2"; + longDescription = '' + Poppler is a PDF rendering library based on the xpdf-3.0 code base. + ''; + + license = "GPLv2"; + platforms = stdenv.lib.platforms.all; + }; + } merge ]); # poppler_drv + +in rec { + /* We always use cairo in poppler, so we always depend on glib, + so we always build the glib wrapper (~350kB). + We also always build the cpp wrapper (<100kB). + ToDo: around half the size could be saved by splitting out headers and tools (1.5 + 0.5 MB). + */ + + poppler_glib = poppler_drv "glib" { }; + + poppler_qt4 = poppler_drv "qt4" { + propagatedBuildInputs = [ qt4 poppler_glib ]; + patches = qtcairo_patches; + NIX_LDFLAGS = "-lpoppler"; + postConfigure = "cd qt4"; }; } diff --git a/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch b/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch new file mode 100644 index 000000000000..48cc05f1800d --- /dev/null +++ b/pkgs/development/libraries/qt-4.x/4.8/CVE-2013-0254.patch @@ -0,0 +1,66 @@ +From 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Sat, 22 Dec 2012 08:32:12 -0800 +Subject: [PATCH] Change all shmget calls to user-only memory + +Drop the read and write permissions for group and other users in the +system. + +Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 +(cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5) +Reviewed-by: Richard J. Moore +--- + src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++--- + src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++-- + +diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp +index 20d76e3..4cf3acf 100644 +--- a/src/corelib/kernel/qsharedmemory_unix.cpp ++++ b/src/corelib/kernel/qsharedmemory_unix.cpp +@@ -238,7 +238,7 @@ bool QSharedMemoryPrivate::create(int size) + } + + // create +- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) { ++ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) { + QString function = QLatin1String("QSharedMemory::create"); + switch (errno) { + case EINVAL: +@@ -293,7 +293,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) + { + #ifndef QT_POSIX_IPC + // grab the shared memory segment id +- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660)); ++ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600)); + if (-1 == id) { + setErrorString(QLatin1String("QSharedMemory::attach (shmget)")); + return false; +@@ -381,7 +381,7 @@ bool QSharedMemoryPrivate::detach() + size = 0; + + // Get the number of current attachments +- int id = shmget(unix_key, 0, 0444); ++ int id = shmget(unix_key, 0, 0400); + cleanHandle(); + + struct shmid_ds shmid_ds; +diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp +index fad9acc..e77456b 100644 +--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp ++++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp +@@ -153,10 +153,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) + } + + // Get semaphore +- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL); ++ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL); + if (-1 == semaphore) { + if (errno == EEXIST) +- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT); ++ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT); + if (-1 == semaphore) { + setErrorString(QLatin1String("QSystemSemaphore::handle")); + cleanHandle(); +-- +1.7.1 + diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index ade9a67cbcc4..b797f631b8e7 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -5,8 +5,8 @@ , libtiff, glib, icu , mysql, postgresql, sqlite , perl, coreutils, libXi -, buildMultimedia ? true, alsaLib, gstreamer, gst_plugins_base -, buildWebkit ? true +, buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst_plugins_base +, buildWebkit ? stdenv.isLinux , flashplayerFix ? false, gdk_pixbuf , gtkStyle ? false, libgnomeui, gtk, GConf, gnome_vfs , developerBuild ? false @@ -31,8 +31,15 @@ stdenv.mkDerivation rec { sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k"; }; + prePatch = '' + substituteInPlace configure --replace /bin/pwd pwd + substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls + sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf + ''; + patches = [ ./glib-2.32.patch + ./CVE-2013-0254.patch (substituteAll { src = ./dlopen-absolute-paths.diff; inherit cups icu libXfixes; @@ -63,6 +70,7 @@ stdenv.mkDerivation rec { " ''; + prefixKey = "-prefix "; configureFlags = '' -v -no-separate-debug-info -release -no-fast -confirm-license -opensource @@ -88,7 +96,7 @@ stdenv.mkDerivation rec { libXv libXi libSM ] ++ optional (stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms) mesa - ++ optional (buildWebkit || buildMultimedia) alsaLib + ++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib ++ [ zlib libpng openssl dbus.libs freetype fontconfig glib ] ++ optionals (buildWebkit || buildMultimedia) [ gstreamer gst_plugins_base ]; @@ -100,15 +108,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl pkgconfig which ]; - prefixKey = "-prefix "; - - prePatch = '' - substituteInPlace configure --replace /bin/pwd pwd - substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls - sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf - ''; - - enableParallelBuilding = true; + # occasional build problems if one has too many cores (like on Hydra) + # @vcunat has been unable to find a *reliable* fix + enableParallelBuilding = false; crossAttrs = let isMingw = stdenv.cross.config == "i686-pc-mingw32" || @@ -149,6 +151,6 @@ stdenv.mkDerivation rec { description = "A cross-platform application framework for C++"; license = "GPL/LGPL"; maintainers = with maintainers; [ urkud sander phreedom ]; - platforms = platforms.linux; + platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/ruby_gpgme/default.nix b/pkgs/development/libraries/ruby_gpgme/default.nix new file mode 100644 index 000000000000..c5f2366bfa1c --- /dev/null +++ b/pkgs/development/libraries/ruby_gpgme/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, gpgme, ruby, rubygems, hoe }: + +stdenv.mkDerivation { + name = "ruby-gpgme-1.0.8"; + + src = fetchurl { + url = "https://github.com/ueno/ruby-gpgme/archive/1.0.8.tar.gz"; + sha256 = "1j7jkl9s8iqcmxf3x6c9kljm19hw1jg6yvwbndmkw43qacdr9nxb"; + }; + + meta = { + description = '' + Ruby-GPGME is a Ruby language binding of GPGME (GnuPG Made + Easy) + ''; + homepage = "http://rubyforge.org/projects/ruby-gpgme/"; + longDescription = '' + Ruby-GPGME is a Ruby language binding of GPGME (GnuPG Made Easy). + + GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG + easier for applications. It provides a High-Level Crypto API for + encryption, decryption, signing, signature verification and key + management. + ''; + }; + + buildInputs = [ gpgme rubygems hoe ruby ]; + + buildPhase = '' + ${ruby}/bin/ruby extconf.rb + rake gem + ''; + + installPhase = '' + export HOME=$TMP/home; mkdir -pv "$HOME" + + # For some reason, the installation phase doesn't work with the default + # make install command run by gem (we'll fix it and do it ourselves later) + gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \ + --bindir "$out/bin" --no-rdoc --no-ri pkg/gpgme-1.0.8.gem || true + + # Create a bare-bones gemspec file so that ruby will recognise the gem + cat <"$out/${ruby.gemPath}/specifications/gpgme.gemspec" + Gem::Specification.new do |s| + s.name = 'gpgme' + s.version = '1.0.8' + s.files = Dir['{lib,examples}/**/*'] + s.rubyforge_project = 'ruby-gpgme' + s.require_paths = ['lib'] + end + EOF + + cd "$out/${ruby.gemPath}/gems/gpgme-1.0.8" + mkdir src + mv lib src + sed -i "s/srcdir = ./srcdir = src/" Makefile + make install + + mv lib lib.bak + mv src/lib lib + rmdir src + ''; +} + diff --git a/pkgs/development/libraries/ruby_ncursesw_sup/default.nix b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix new file mode 100644 index 000000000000..67041ad06078 --- /dev/null +++ b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, ncurses, ruby, rubygems }: + +stdenv.mkDerivation rec { + name = ''ncursesw-sup-afd962b9c06108ff0643e98593c5605314d76917''; + + src = fetchurl { + url = "https://github.com/sup-heliotrope/ncursesw-ruby/archive/afd962b9c06108ff0643e98593c5605314d76917.tar.gz"; + sha256 = "13i286p4bm8zqg9xh96a1dg7wkywj9m6975gbh3w43d3rmfc1h6a"; + }; + + meta = { + description = '' + Hacked up version of ncurses gem that supports wide characters for + supmua.org + ''; + homepage = ''http://github.com/sup-heliotrope/ncursesw-ruby''; + longDescription = '' + This wrapper provides access to the functions, macros, global variables + and constants of the ncurses library. These are mapped to a Ruby Module + named "Ncurses": Functions and external variables are implemented as + singleton functions of the Module Ncurses. + ''; + }; + + buildInputs = [ ncurses rubygems ]; + + buildPhase = "gem build ncursesw.gemspec"; + + installPhase = '' + export HOME=$TMP/home; mkdir -pv "$HOME" + + # For some reason, the installation phase doesn't work with the default + # make install command run by gem (we'll fix it and do it ourselves later) + gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \ + --bindir "$out/bin" --no-rdoc --no-ri ncursesw-sup-1.3.1.2.gem || true + + # Needed for ruby to recognise the gem + cp ncursesw.gemspec "$out/${ruby.gemPath}/specifications" + + cd "$out/${ruby.gemPath}/gems/ncursesw-sup-1.3.1.2" + mkdir src + mv lib src + sed -i "s/srcdir = ./srcdir = src/" Makefile + make install + ''; +} + diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index e259e22ff018..41a6b8501eca 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchsvn, SDL, autoconf, automake, libtool, gtk, m4, pkgconfig, mesa }: stdenv.mkDerivation rec { - name = "smpeg-svn-${version}"; + name = "smpeg-svn${version}"; version = "390"; src = fetchsvn { diff --git a/pkgs/development/libraries/suitesparse/default.nix b/pkgs/development/libraries/suitesparse/default.nix index e3a7fbb5a086..017620839346 100644 --- a/pkgs/development/libraries/suitesparse/default.nix +++ b/pkgs/development/libraries/suitesparse/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, blas, liblapack, gfortran } : stdenv.mkDerivation rec { - version = "4.0.0"; + version = "4.2.0"; name = "suitesparse-${version}"; src = fetchurl { url = "http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-${version}.tar.gz" ; - sha256 = "1nvbdw10wa6654k8sa2vhr607q6fflcywyji5xd767cqpwag4v5j"; + sha256 = "0i0ivsc5sr3jdz6nqq4wz5lwxc8rpnkqgddyhqqgfhwzgrcqh9v6"; }; buildInputs = [blas liblapack gfortran] ; patches = [./disable-metis.patch]; diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/vaapi-intel/default.nix index 548aeb8a2de6..f05c01bf58df 100644 --- a/pkgs/development/libraries/vaapi-intel/default.nix +++ b/pkgs/development/libraries/vaapi-intel/default.nix @@ -2,17 +2,16 @@ , intelgen4asm }: stdenv.mkDerivation rec { - name = "libva-intel-driver-1.0.19"; - + name = "libva-intel-driver-1.0.20"; + src = fetchurl { url = "http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/${name}.tar.bz2"; - sha256 = "14m7krah3ajkwj190q431lqqa84hdljcdmrcrqkbgaffyjlqvdid"; + sha256 = "1jfl8909j3a3in6m8b5bx3dn7pzr8a1sw3sk4vzm7h3j2dkgpzhj"; }; - buildInputs = [ autoconf automake libtool mesa libva pkgconfig libdrm libX11 intelgen4asm ]; + buildInputs = [ pkgconfig libdrm libva libX11 ]; preConfigure = '' - sh autogen.sh sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure ''; diff --git a/pkgs/development/libraries/vaapi-vdpau/default.nix b/pkgs/development/libraries/vaapi-vdpau/default.nix index a3d51217ead8..fb24ba98b450 100644 --- a/pkgs/development/libraries/vaapi-vdpau/default.nix +++ b/pkgs/development/libraries/vaapi-vdpau/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure ''; + patches = [ ./glext85.patch ]; + meta = { homepage = http://cgit.freedesktop.org/vaapi/vdpau-driver/; license = "GPLv2+"; diff --git a/pkgs/development/libraries/vaapi-vdpau/glext85.patch b/pkgs/development/libraries/vaapi-vdpau/glext85.patch new file mode 100644 index 000000000000..073b8cf11904 --- /dev/null +++ b/pkgs/development/libraries/vaapi-vdpau/glext85.patch @@ -0,0 +1,20 @@ +http://www.mail-archive.com/libva@lists.freedesktop.org/msg01457.html + +diff --git a/src/utils_glx.h b/src/utils_glx.h +index 19d03e4..f270fba 100644 +--- a/src/utils_glx.h ++++ b/src/utils_glx.h +@@ -42,6 +42,13 @@ typedef void (*PFNGLVDPAUMAPSURFACESNVPROC)(GLsizei numSurfaces, const GLvdpauSu + typedef void (*PFNGLVDPAUUNMAPSURFACESNVPROC)(GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); + #endif + ++#if GL_GLEXT_VERSION >= 85 ++/* XXX: PFNGLMULTITEXCOORD2FPROC got out of the GL_VERSION_1_3_DEPRECATED ++ block and is not defined if GL_VERSION_1_3 is defined in ++ Redefine the type here as an interim solution */ ++typedef void (*PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); ++#endif ++ + /* GLX_EXT_texture_from_pixmap */ + #if GLX_GLXEXT_VERSION < 18 + typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *); diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index 9e00b0d8bcf5..8854a41210b6 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -1,23 +1,21 @@ { stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }: +let version = "1.0.5"; in + stdenv.mkDerivation rec { - name = "wayland-1.0.5"; + name = "wayland-${version}"; src = fetchurl { url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; - sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w"; }; buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ]; meta = { - description = "The reference implementation of the Wayland protocol"; - - homepage = http://wayland.freedesktop.org; - - license = stdenv.lib.licenses.bsd3; - + description = "Reference implementation of the wayland protocol"; + homepage = http://wayland.freedesktop.org/; + license = stdenv.lib.licenses.mit; platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix index 109077269544..e11de87415d0 100644 --- a/pkgs/development/libraries/wxGTK-2.8/default.nix +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -7,12 +7,13 @@ assert withMesa -> mesa != null; with stdenv.lib; -stdenv.mkDerivation { - name = "wxGTK-2.8.12"; +stdenv.mkDerivation rec { + version = "2.8.12.1"; + name = "wxGTK-${version}"; src = fetchurl { - url = mirror://sourceforge/wxwindows/wxGTK-2.8.12.tar.gz; - sha256 = "1gjs9vfga60mk4j4ngiwsk9h6c7j22pw26m3asxr1jwvqbr8kkqk"; + url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2"; + sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz"; }; buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gst_plugins_base GConf ] @@ -29,11 +30,12 @@ stdenv.mkDerivation { "--enable-mediactrl" ] ++ optional withMesa "--with-opengl"; - # This variable is used by configure to find some dependencies. + # These variables are used by configure to find some dependencies. SEARCH_INCLUDE = "${libXinerama}/include ${libSM}/include ${libXxf86vm}/include"; - - SEARCH_LIB = optionalString withMesa "${mesa}/lib"; + SEARCH_LIB = + "${libXinerama}/lib ${libSM}/lib ${libXxf86vm}/lib " + + optionalString withMesa "${mesa}/lib "; # Work around a bug in configure. NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1"; diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 9f53d36bb63c..51666e3ba6de 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { version = "snapshot-20130424-2245-stable"; - name = "x264-${version}"; + name = "x264-20130424_2245"; src = fetchurl { url = "ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-${version}.tar.bz2"; diff --git a/pkgs/development/misc/amdadl-sdk/default.nix b/pkgs/development/misc/amdadl-sdk/default.nix new file mode 100644 index 000000000000..d311b6b722a9 --- /dev/null +++ b/pkgs/development/misc/amdadl-sdk/default.nix @@ -0,0 +1,44 @@ +{ fetchurl, stdenv, unzip }: + +stdenv.mkDerivation rec { + version = "4.0"; + name = "amdadl-sdk-${version}"; + + src = fetchurl { + url = "http://download2-developer.amd.com/amd/GPU/zip/ADL_SDK_${version}.zip"; + sha256 = "4265ee2f265b69cc39b61e10f79741c1d799f4edb71dce14a7d88509fbec0efa"; + }; + + buildInputs = [ unzip ]; + + doCheck = false; + + unpackPhase = '' + unzip $src + ''; + + buildPhase = '' + #Build adlutil + cd adlutil + gcc main.c -o adlutil -DLINUX -ldl -I ../include/ + cd .. + ''; + + installPhase = '' + #Install SDK + mkdir -p $out/bin + cp -r include "$out/" + cp "adlutil/adlutil" "$out/bin/adlutil" + + #Fix modes + chmod -R 755 "$out/bin/" + ''; + + meta = with stdenv.lib; { + description = "API to access display driver functionality for ATI graphics cards"; + homepage = http://developer.amd.com/tools/graphics-development/display-library-adl-sdk/; + license = licenses.amdadl; + maintainers = [ maintainers.offline ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/development/misc/amdapp-sdk/01-remove-aparapi-samples.patch b/pkgs/development/misc/amdapp-sdk/01-remove-aparapi-samples.patch new file mode 100644 index 000000000000..f474f76f01e4 --- /dev/null +++ b/pkgs/development/misc/amdapp-sdk/01-remove-aparapi-samples.patch @@ -0,0 +1,10 @@ +--- samples/Makefile 2012-11-29 05:58:48.000000000 +0100 ++++ samples/Makefile 2012-12-30 20:13:30.926576277 +0100 +@@ -3,7 +3,6 @@ + include $(DEPTH)/make/openclsdkdefs.mk + + SUBDIRS = opencl +-SUBDIRS += aparapi + ifneq ($(OS), lnx) + SUBDIRS += C++Amp + ifeq ($(BITS), 64) diff --git a/pkgs/development/misc/amdapp-sdk/default.nix b/pkgs/development/misc/amdapp-sdk/default.nix new file mode 100644 index 000000000000..021c84fee0f1 --- /dev/null +++ b/pkgs/development/misc/amdapp-sdk/default.nix @@ -0,0 +1,106 @@ +{ stdenv, fetchurl, makeWrapper, perl, mesa, xorg, + version? "2.8", # What version + samples? false # Should samples be installed +}: + +let + + bits = if stdenv.system == "x86_64-linux" then "64" + else "32"; + + arch = if stdenv.system == "x86_64-linux" then "x86_64" + else "x86"; + + src_info = { + "2.6" = { + url = "http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.6-lnx${bits}.tgz"; + x86 = "03vyvqp44f96036zsyy8n21ymbzy2bx09hlbd6ci3ikj8g7ic1dm"; + x86_64 = "1fj55358s4blxq9bp77k07gqi22n5nfkzwjkbdc62gmy1zxxlhih"; + }; + + "2.7" = { + url = "http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.7-lnx${bits}.tgz"; + x86 = "1v26n7g1xvlg5ralbfk3qiy34gj8fascpnjzm3120b6sgykfp16b"; + x86_64 = "08bi43bgnsxb47vbirh09qy02w7zxymqlqr8iikk9aavfxjlmch1"; + }; + + "2.8" = { + url = "http://developer.amd.com/wordpress/media/2012/11/AMD-APP-SDK-v2.8-lnx${bits}.tgz"; + x86 = "99610737f21b2f035e0eac4c9e776446cc4378a614c7667de03a82904ab2d356"; + x86_64 = "d9c120367225bb1cd21abbcf77cb0a69cfb4bb6932d0572990104c566aab9681"; + + # TODO: Add support for aparapi, java parallel api + patches = [ ./01-remove-aparapi-samples.patch ]; + }; + }; + +in stdenv.mkDerivation rec { + name = "amdapp-sdk-${version}"; + + src = fetchurl { + url = stdenv.lib.getAttrFromPath [version "url"] src_info; + sha256 = stdenv.lib.getAttrFromPath [version arch] src_info; + }; + + patches = stdenv.lib.attrByPath [version "patches"] [] src_info; + + patchFlags = "-p0"; + buildInputs = [ makeWrapper perl mesa xorg.libX11 xorg.libXext xorg.libXaw xorg.libXi xorg.libXxf86vm ]; + propagatedBuildInputs = [ stdenv.gcc ]; + NIX_LDFLAGS = "-lX11 -lXext -lXmu -lXi -lXxf86vm"; + doCheck = false; + + unpackPhase = '' + tar xvzf $src + tar xf AMD-APP-SDK-v${version}-*-lnx${bits}.tgz + cd AMD-APP-SDK-v${version}-*-lnx${bits} + ''; + + buildPhase = if !samples then ''echo "nothing to build"'' else null; + + installPhase = '' + # Install SDK + mkdir -p $out + cp -r {docs,include} "$out/" + mkdir -p "$out/"{bin,lib,samples/opencl/bin} + cp -r "./bin/${arch}/clinfo" "$out/bin/clinfo" + cp -r "./lib/${arch}/"* "$out/lib/" + + # Register ICD + mkdir -p "$out/etc/OpenCL/vendors" + echo "$out/lib/libamdocl${bits}.so" > "$out/etc/OpenCL/vendors/amd.icd" + # The OpenCL ICD specifications: http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt + + # Install includes + mkdir -p "$out/usr/include/"{CAL,OpenVideo} + install -m644 './include/OpenVideo/'{OVDecode.h,OVDecodeTypes.h} "$out/usr/include/OpenVideo/" + + ${ if samples then '' + # Install samples + find ./samples/opencl/ -mindepth 1 -maxdepth 1 -type d -not -name bin -exec cp -r {} "$out/samples/opencl" \; + cp -r "./samples/opencl/bin/${arch}/"* "$out/samples/opencl/bin" + for f in $(find "$out/samples/opencl/bin/" -type f -not -name "*.*"); + do + wrapProgram "$f" --prefix PATH ":" "${stdenv.gcc}/bin" + done'' else "" + } + + # Create wrappers + patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/bin/clinfo + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib $out/bin/clinfo + + # Fix modes + find "$out/" -type f -exec chmod 644 {} \; + chmod -R 755 "$out/bin/" + find "$out/samples/opencl/bin/" -type f -name ".*" -exec chmod 755 {} \; + find "$out/samples/opencl/bin/" -type f -not -name "*.*" -exec chmod 755 {} \; + ''; + + meta = with stdenv.lib; { + description = "AMD Accelerated Parallel Processing (APP) SDK, with OpenCL 1.2 support"; + homepage = http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/; + license = licenses.amd; + maintainers = [ maintainers.offline ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk.nix index edae828bd08c..46227e5f14d5 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk.nix @@ -1,14 +1,14 @@ {stdenv, fetchurl, unzip, makeWrapper, python, jdk}: stdenv.mkDerivation { - name = "titanium-mobilesdk-3.1.0.v20130415184552"; + name = "titanium-mobilesdk-3.1.1.v20130612114553"; src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { - url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.0.v20130415184552-linux.zip; - sha1 = "7a8b34b92f6c3eff33eefb9a1b6b0d2e3670001d"; + url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.1.v20130612114553-linux.zip; + sha1 = "410ba7e8171a887b6a4b3173116430657c3d84aa"; } else if stdenv.system == "x86_64-darwin" then fetchurl { - url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.0.v20130415184552-osx.zip; - sha1 = "e0ed7e399a104e0838e245550197bf787a66bf98"; + url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.1.v20130612114553-osx.zip; + sha1 = "0893a1560ac6fb63369fc9f6ea9550b6649438fa"; } else throw "Platform: ${stdenv.system} not supported!"; diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix new file mode 100644 index 000000000000..037ebdea6b61 --- /dev/null +++ b/pkgs/development/ocaml-modules/camlimages/default.nix @@ -0,0 +1,43 @@ +{stdenv, fetchurl, omake, ocaml, omake_rc1, libtiff, libjpeg, libpng12, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "camlimages"; + version = "4.0.1"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz"; + sha256 = "b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4"; + }; + + buildInputs = [ocaml omake_rc1 findlib graphicsmagick ghostscript libtiff libjpeg libpng12 giflib freetype libXpm ]; + + propagatedbuildInputs = [libtiff libjpeg libpng12 giflib freetype libXpm ]; + + createFindlibDestdir = true; + + preConfigure = '' + rm ./configure + ''; + + buildPhase = '' + omake + ''; + + installPhase = '' + omake install + ''; + + #makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib"; + + meta = { + homepage = http://cristal.inria.fr/camlimages; + description = "Image manipulation library"; + license = "GnuGPLV2"; +# maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix index 03a6dbef23ee..2024f5a5ab8f 100644 --- a/pkgs/development/ocaml-modules/camlzip/default.nix +++ b/pkgs/development/ocaml-modules/camlzip/default.nix @@ -2,16 +2,16 @@ let ocaml_version = (builtins.parseDrvName ocaml.name).version; - version = "1.04"; + version = "1.05"; in stdenv.mkDerivation { name = "camlzip-${version}"; src = fetchurl { - url = "http://forge.ocamlcore.org/frs/download.php/328/" + + url = "http://forge.ocamlcore.org/frs/download.php/1037/" + "camlzip-${version}.tar.gz"; - sha256 = "1zpchmp199x7f4mzmapvfywgy7f6wy9yynd9nd8yh8l78s5gixbn"; + sha256 = "930b70c736ab5a7ed1b05220102310a0a2241564786657abe418e834a538d06b"; }; buildInputs = [zlib ocaml findlib]; diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix index 48e86ed9a68f..94b36fb66513 100644 --- a/pkgs/development/ocaml-modules/cryptokit/default.nix +++ b/pkgs/development/ocaml-modules/cryptokit/default.nix @@ -2,16 +2,16 @@ let ocaml_version = (builtins.parseDrvName ocaml.name).version; - version = "1.5"; + version = "1.7"; in stdenv.mkDerivation { name = "cryptokit-${version}"; src = fetchurl { - url = "http://forge.ocamlcore.org/frs/download.php/639/" + + url = "http://forge.ocamlcore.org/frs/download.php/1166/" + "cryptokit-${version}.tar.gz"; - sha256 = "1r5kbsbsicrbpdrdim7h8xg2b1a8qg8sxig9q6cywzm57r33lj72"; + sha256 = "56a8c0339c47ca3cf43c8881d5b519d3bff68bc8a53267e9c5c9cbc9239600ca"; }; buildInputs = [zlib ocaml findlib ncurses]; diff --git a/pkgs/development/ocaml-modules/dypgen/default.nix b/pkgs/development/ocaml-modules/dypgen/default.nix new file mode 100644 index 000000000000..73f543f5b626 --- /dev/null +++ b/pkgs/development/ocaml-modules/dypgen/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchurl, ocaml, findlib}: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "dypgen"; + version = "20120619-1"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://dypgen.free.fr/dypgen-20120619-1.tar.bz2"; + sha256 = "ecb53d6e469e9ec4d57ee6323ff498d45b78883ae13618492488e7c5151fdd97"; + }; + + buildInputs = [ocaml findlib]; + + createFindlibDestdir = true; + + buildPhase = '' + make + ''; + + makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib"; + + meta = { + homepage = http://dypgen.free.fr; + description = "Dypgen GLR self extensible parser generator"; + license = "CeCILL-B_V1"; +# maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch b/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch new file mode 100644 index 000000000000..c896978f57ea --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch @@ -0,0 +1,117 @@ +diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config +--- lablGL.ori/Makefile.config 1970-01-01 01:00:00.000000000 +0100 ++++ lablGL/Makefile.config 2013-06-02 08:13:10.000000000 +0200 +@@ -0,0 +1,63 @@ ++# LablGL and Togl configuration file ++# ++# Please have a look at the config/Makefile in the Objective Caml distribution, ++# or at the labltklink script to get the information needed here ++# ++ ++##### Adjust these always ++ ++# Uncomment if you have the fast ".opt" compilers ++#CAMLC = ocamlc.opt ++#CAMLOPT = ocamlopt.opt ++ ++# Where to put the lablgl script ++BINDIR = @BINDIR@ ++ ++# Where to find X headers ++XINCLUDES = @XINCLUDES@ ++# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lX11 -lXi ++ ++# Where to find Tcl/Tk headers ++# This must the same version as for LablTk ++TKINCLUDES = @TKINCLUDES@ ++# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#TKLIBS = -L/usr/local/lib -ltk84 -ltcl84 ++ ++# Where to find OpenGL/Mesa/Glut headers and libraries ++GLINCLUDES = ++GLLIBS = -lGL -lGLU ++GLUTLIBS = -lglut ++# The following libraries may be required (try to add them one at a time) ++#GLLIBS = -lGL -lGLU -lXmu -lXext -lXi -lcipher -lpthread ++ ++# How to index a library after installing (ranlib required on MacOSX) ++RANLIB = : ++#RANLIB = ranlib ++ ++##### Uncomment these for windows ++#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib ++#GLLIBS = opengl32.lib glu32.lib ++#TOOLCHAIN = msvc ++#XA = .lib ++#XB = .bat ++#XE = .exe ++#XO = .obj ++#XS = .dll ++ ++##### Adjust these if non standard ++ ++# The Objective Caml library directory ++#LIBDIR = `ocamlc -where` ++ ++# Where to put dlls (if dynamic loading available) ++DLLDIR = @DLLDIR@ ++ ++# Where to put LablGL (standard) ++INSTALLDIR = @INSTALLDIR@ ++ ++# Where is Togl (default) ++#TOGLDIR = Togl ++ ++# C Compiler options ++#COPTS = -c -O +diff -Naur lablGL.ori/META lablGL/META +--- lablGL.ori/META 1970-01-01 01:00:00.000000000 +0100 ++++ lablGL/META 2013-06-02 22:00:59.000000000 +0200 +@@ -0,0 +1,21 @@ ++description = "Bindings for OpenGL graphics engines" ++version = "1.04-1" ++archive(byte) = "lablgl.cma" ++archive(native) = "lablgl.cmxa" ++ ++#package "togl" ( ++# description = "OpenGL widget for labltk" ++# version = "1.01" ++# requires = "lablgl, labltk" ++# archive(byte) = "togl.cma" ++# archive(native) = "togl.cmxa" ++#) ++ ++package "glut" ( ++ description = "Platform-independent OpenGL window" ++ version = "1.01" ++ requires = "lablgl" ++ archive(byte) = "lablglut.cma" ++ archive(native) = "lablglut.cmxa" ++) ++ +diff -Naur lablGL.ori/META~ lablGL/META~ +--- lablGL.ori/META~ 1970-01-01 01:00:00.000000000 +0100 ++++ lablGL/META~ 2013-06-02 21:59:17.000000000 +0200 +@@ -0,0 +1,21 @@ ++description = "Bindings for OpenGL graphics engines" ++version = "1.04-1" ++archive(byte) = "lablgl.cma" ++archive(native) = "lablgl.cmxa" ++ ++#package "togl" ( ++# description = "OpenGL widget for labltk" ++# version = "1.01" ++# requires = "lablGL, labltk" ++# archive(byte) = "togl.cma" ++# archive(native) = "togl.cmxa" ++#) ++ ++package "glut" ( ++ description = "Platform-independent OpenGL window" ++ version = "1.01" ++ requires = "lablGL" ++ archive(byte) = "lablglut.cma" ++ archive(native) = "lablglut.cmxa" ++) ++ diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix new file mode 100644 index 000000000000..a739e4a7146b --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgl/default.nix @@ -0,0 +1,45 @@ +{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } : + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "lablgl"; + version = "1.04-1"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-20120306.tar.gz"; + sha256 = "1w5di2n38h7fkrf668zphnramygwl7ybjhrmww3pi9jcf9apa09r"; + }; + + buildInputs = [ocaml findlib lablgtk mesa freeglut ]; + + patches = [ ./Makefile.config.patch ]; + + preConfigure = '' + substituteInPlace Makefile.config \ + --subst-var-by BINDIR $out/bin \ + --subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl \ + --subst-var-by DLLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl/stublibs \ + --subst-var-by TKINCLUDES "" \ + --subst-var-by XINCLUDES "" + ''; + + createFindlibDestdir = true; + + #makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib"; + buildFlags = "lib libopt glut glutopt"; + + postInstall = '' + cp ./META $out/lib/ocaml/${ocaml_version}/site-lib/lablgl + ''; + + meta = { + homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html; + description = "OpenGL bindings for ocaml"; + license = "GnuGPLV2"; +# maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index 8a51c216ab40..a62f4ab9ae96 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -3,25 +3,26 @@ let ocaml_version = (builtins.parseDrvName ocaml.name).version; pname = "lablgtk"; - version = "2.14.2"; + version = "2.16.0"; in stdenv.mkDerivation (rec { name = "${pname}-${version}"; src = fetchurl { - url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/${name}.tar.gz"; - sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; + url = "https://forge.ocamlcore.org/frs/download.php/979/${name}.tar.gz"; + sha256 = "a0ea9752eb257dadcfc2914408fff339d4c34357802f02c63329dd41b777de2f"; }; buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview]; - patches = [ ./META.patch ]; + # patches = [ ./META.patch ]; configureFlags = "--with-libdir=$(out)/lib/ocaml/${ocaml_version}/site-lib"; buildFlags = "world"; - postInstall = '' - ocamlfind install lablgtk2 META + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml_version}/site-lib + export OCAMLPATH=$out/lib/ocaml/${ocaml_version}/site-lib/:$OCAMLPATH ''; meta = { diff --git a/pkgs/development/ocaml-modules/mlgmp/META b/pkgs/development/ocaml-modules/mlgmp/META new file mode 100644 index 000000000000..e132e179b33f --- /dev/null +++ b/pkgs/development/ocaml-modules/mlgmp/META @@ -0,0 +1,7 @@ +name="gmp" +version="@VERSION@" +description="bindings to GNU MP library" +archive(byte)="gmp.cma" +archive(native)="gmp.cmxa" +requires="" + diff --git a/pkgs/development/ocaml-modules/mlgmp/default.nix b/pkgs/development/ocaml-modules/mlgmp/default.nix new file mode 100644 index 000000000000..78447796025a --- /dev/null +++ b/pkgs/development/ocaml-modules/mlgmp/default.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl, ocaml, findlib, gmp, mpfr, ncurses }: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "mlgmp"; + version = "20120224"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://www-verimag.imag.fr/~monniaux/download/${pname}_${version}.tar.gz"; + sha256 = "3ce1a53fa452ff5a9ba618864d3bc46ef32190b57202d1e996ca7df837ad4f24"; + }; + + makeFlags = [ + "DESTDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib/gmp" + ]; + + preConfigure = "make clean"; + buildInputs = [ocaml findlib gmp mpfr ncurses]; + + createFindlibDestdir = true; + + propagatedbuildInputs = [gmp mpfr ncurses]; + + postInstall = '' + cp ${./META} $out/lib/ocaml/${ocaml_version}/site-lib/gmp/META + ''; + + meta = { + homepage = http://opam.ocamlpro.com/pkg/mlgmp.20120224.html; + description = "OCaml bindings to GNU MP library"; + license = "Free software ?"; + }; +} diff --git a/pkgs/development/ocaml-modules/mysql/default.nix b/pkgs/development/ocaml-modules/mysql/default.nix index 32455fb4310c..ed70d1b9c3ee 100644 --- a/pkgs/development/ocaml-modules/mysql/default.nix +++ b/pkgs/development/ocaml-modules/mysql/default.nix @@ -7,17 +7,22 @@ let ocaml_version = (builtins.parseDrvName ocaml.name).version; pname = "ocaml-mysql"; - version = "1.0.4"; + version = "1.1.1"; in stdenv.mkDerivation { name = "${pname}-${version}"; src = fetchurl { - url = "http://raevnos.pennmush.org/code/${pname}/${pname}-${version}.tar.gz"; - sha256 = "17i5almar8qrhc9drq0cvlprxf9wi9szj5kh4gnz11l9al8i3lar"; + url = "https://forge.ocamlcore.org/frs/download.php/870/${pname}-${version}.tar.gz"; + sha256 = "f896fa101a05d81b85af8122fe1c2809008a5e5fdca00f9ceeb7eec356369e3a"; }; + configureFlags = [ + "--prefix=$out" + "--libdir=$out/lib/ocaml/${ocaml_version}/site-lib/mysql" + ]; + buildInputs = [ocaml findlib mysql]; createFindlibDestdir = true; @@ -34,7 +39,7 @@ stdenv.mkDerivation { ''; meta = { - homepage = http://raevnos.pennmush.org/code/ocaml-mysql/; + homepage = http://ocaml-mysql.forge.ocamlcore.org; description = "Bindings for interacting with MySQL databases from ocaml"; license = "LGPLv2.1+"; maintainers = [ stdenv.lib.maintainers.roconnor ]; diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/META.patch b/pkgs/development/ocaml-modules/ocaml-cairo/META.patch new file mode 100644 index 000000000000..ba6e5927b00a --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-cairo/META.patch @@ -0,0 +1,16 @@ +diff -Naur cairo-ocaml-1.2.0.ori/META cairo-ocaml-1.2.0/META +--- cairo-ocaml-1.2.0.ori/META 1970-01-01 01:00:00.000000000 +0100 ++++ cairo-ocaml-1.2.0/META 2013-06-04 03:31:32.000000000 +0200 +@@ -0,0 +1,12 @@ ++name = "cairo-ocaml" ++description = "Bindings to the cairo library." ++version = "@VERSION@" ++archive(byte) = "cairo.cma" ++archive(native) = "cairo.cmxa" ++requires = "bigarray" ++ ++package "lablgtk2" ( ++ requires = "cairo lablgtk2" ++ archive(byte) = "cairo_lablgtk.cma" ++ archive(native) = "cairo_lablgtk.cmxa" ++) diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix new file mode 100644 index 000000000000..8f19847680b6 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix @@ -0,0 +1,44 @@ +{stdenv, fetchurl, automake, ocaml, autoconf, gnum4, pkgconfig, freetype, lablgtk, unzip, cairo, findlib, gdk_pixbuf, glib, gtk, pango }: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + pname = "ocaml-cairo"; + version = "1.2.0"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip"; + sha256 = "2d59678e322c331e3f4bc02a77240fce4a0917acb0d3ae75953a6ac62d70a125"; + }; + + patches = [ ./META.patch ]; + + buildInputs = [ocaml automake gnum4 autoconf unzip pkgconfig findlib freetype lablgtk cairo gdk_pixbuf gtk pango ]; + + createFindlibDestdir = true; + + preConfigure = '' + aclocal -I support + autoconf + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib gtk+ pango`" + export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2 + cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/pango.ml ./src + cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/gaux.ml ./src + ''; + + postInstall = '' + cp META $out/lib/ocaml/${ocaml_version}/site-lib/cairo/ + ''; + + makeFlags = "INSTALLDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib/cairo"; + + meta = { + homepage = http://cairographics.org/cairo-ocaml; + description = "ocaml bindings for cairo library"; + license = "GnuGPLV2"; +# maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/pkgs/development/ocaml-modules/ocamlnet/configure.patch b/pkgs/development/ocaml-modules/ocamlnet/configure.patch new file mode 100644 index 000000000000..38b240f3c2c4 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocamlnet/configure.patch @@ -0,0 +1,63 @@ +diff -Naur ocamlnet-3.6.3.ori/configure ocamlnet-3.6.3/configure +--- ocamlnet-3.6.3.ori/configure 2013-01-14 00:04:59.000000000 +0000 ++++ ocamlnet-3.6.3/configure 2013-06-02 21:33:08.000000000 +0000 +@@ -642,59 +642,6 @@ + exit 1 + fi + +- printf "%s" "Checking whether lablgtk2 has GMain.Io.remove... " +- mkdir -p tmp +- cat <tmp/gtk.ml +-let _ = GMain.Io.remove;; +-EOF +- +- if ocamlfind ocamlc -package lablgtk2 -c tmp/gtk.ml >/dev/null 2>/dev/null; +- then +- echo "yes" +- else +- echo "no" +- echo "Your version of lablgtk2 is too old!" +- exit 1 +- fi +- +- printf "%s" "Checking whether lablgtk2 has GMain.Io.add_watch with list support... " +- mkdir -p tmp +- cat <<'EOF' >tmp/gtk.ml +-open GMain.Io +-let _ = (add_watch : cond:condition list -> callback:(condition list -> bool) -> ?prio:int -> channel -> id);; +-exit 0 +-EOF +- # Note: this newer API is never broken in the sense checked below, i.e. +- # such lablgtk2 versions do not exist. +- if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then +- echo "yes" +- gtk2_io_add_watch_supports_lists="-ppopt -DGTK2_IO_ADD_WATCH_SUPPORTS_LISTS" +- else +- echo "no" +- printf "%s" "Checking whether lablgtk2's GMain.Io.add_watch is broken... " +- mkdir -p tmp +- cat <<'EOF' >tmp/gtk.ml +-GMain.Main.init();; +-let ch = GMain.Io.channel_of_descr (Unix.stdout) in +-let w = GMain.Io.add_watch +- ~cond:`OUT ~callback:(fun () -> true) ch in +-(* add_watch is broken when it just returns Val_unit, and ok when it +- * returns a positive int +- *) +-if (Obj.magic w : int) > 0 then +- exit 0 +-else +- exit 1 +-EOF +- if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then +- echo "no" +- else +- echo "yes" +- echo "You should apply the patch-ab-ml_glib.c to lablgtk2 to fix this!" +- exit 1 +- fi +- fi +- + for f in Makefile uq_gtk.ml uq_gtk.mli uq_gtk_helper.ml; do + rm -f src/equeue-gtk2/$f + ln -s ../equeue-gtk1/$f src/equeue-gtk2 diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 4d9e934b6283..c1960d4706e4 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -1,18 +1,22 @@ -{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl}: +{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl, lablgtk, cryptokit }: let ocaml_version = (builtins.parseDrvName ocaml.name).version; in stdenv.mkDerivation { - name = "ocamlnet-3.6"; + name = "ocamlnet-3.6.3"; src = fetchurl { - url = http://download.camlcity.org/download/ocamlnet-3.6.tar.gz; - sha256 = "306c20aee6512be3564c0f39872b70f929c06e1e893cfcf528ac47ae35cf7a69"; + url = http://download.camlcity.org/download/ocamlnet-3.6.3.tar.gz; + sha256 = "c62fe0a4db6c63c04e24c8d76bcb504054f0b59a7a41c1abcbb8dd504afc9f29"; }; - buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl]; + buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit]; + + propagatedbuildInputs = [ncurses ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit]; + + patches = [ ./configure.patch ]; createFindlibDestdir = true; @@ -23,6 +27,10 @@ stdenv.mkDerivation { -bindir $out/bin -enable-ssl -enable-zip + -enable-pcre + -enable-crypto + -disable-gtk2 + -with-nethttpd -datadir $out/lib/ocaml/${ocaml_version}/ocamlnet ) ''; diff --git a/pkgs/development/ocaml-modules/sqlite3/default.nix b/pkgs/development/ocaml-modules/sqlite3/default.nix index a01660216bb0..63dc06634d71 100644 --- a/pkgs/development/ocaml-modules/sqlite3/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3/default.nix @@ -1,18 +1,19 @@ -{stdenv, fetchurl, sqlite, ocaml, findlib}: +{stdenv, fetchurl, sqlite, ocaml, findlib, pkgconfig}: stdenv.mkDerivation { - name = "ocaml-sqlite3-1.6.3"; + name = "ocaml-sqlite3-2.0.4"; src = fetchurl { - url = https://bitbucket.org/mmottl/sqlite3-ocaml/downloads/sqlite3-ocaml-1.6.3.tar.gz; - sha256 = "004wysf80bmb8r4yaa648v0bqrh2ry3kzy763gdksw4n15blghv5"; + url = https://bitbucket.org/mmottl/sqlite3-ocaml/downloads/sqlite3-ocaml-2.0.4.tar.gz; + sha256 = "51ccb4c7a240eb40652c59e1770cfe1827dfa1eb926c969d19ff414aef4e80a1"; }; - buildInputs = [ocaml findlib]; + buildInputs = [ocaml findlib pkgconfig ]; - configureFlags = "--with-sqlite3=${sqlite}"; + #configureFlags = "--with-sqlite3=${sqlite}"; preConfigure = '' + export PKG_CONFIG_PATH=${sqlite}/lib/pkgconfig/ export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR mkdir -p $out/bin ''; diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index f72fbff1806a..d32c6818bb26 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -68,6 +68,7 @@ python.stdenv.mkDerivation (attrs // { pythonPath = [ setuptools ] ++ pythonPath; preConfigure = '' + export DETERMINISTIC_BUILD=1 PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH" ${preConfigure} ''; diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix index 347501f8a5b7..912642e3ea94 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame/default.nix @@ -1,46 +1,37 @@ -{ fetchurl, stdenv, python, pkgconfig, SDL, SDL_image, SDL_mixer, SDL_ttf -, numeric }: +{ stdenv, fetchurl, python, pkgconfig +, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg +}: stdenv.mkDerivation { - name = "pygame-1.7"; + name = "pygame-1.9.1"; src = fetchurl { - url = http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz ; - sha256 = "0hl0rmgjcqj217fibwyilz7w9jpg0kh7hsa7vyzd4cgqyliskpqi"; + url = "http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz"; + sha256 = "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"; }; - buildInputs = [python pkgconfig SDL SDL_image SDL_ttf numeric]; - + buildInputs = [ + python pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg + ]; + + patches = [ ./pygame-v4l.patch ]; + configurePhase = '' - export LOCALBASE=/// - sed -e "/origincdirs =/a'${SDL_image}/include/SDL','${SDL_image}/include'," -i config_unix.py - sed -e "/origlibdirs =/aoriglibdirs += '${SDL_image}/lib'," -i config_unix.py - sed -e "/origincdirs =/a'${SDL_mixer}/include/SDL','${SDL_mixer}/include'," -i config_unix.py - sed -e "/origlibdirs =/aoriglibdirs += '${SDL_mixer}/lib'," -i config_unix.py - sed -e "/origincdirs =/a'${SDL_ttf}/include/SDL','${SDL_ttf}/include'," -i config_unix.py - sed -e "/origlibdirs =/aoriglibdirs += '${SDL_ttf}/lib'," -i config_unix.py - sed -e "/origincdirs =/a'${numeric}/include/python2.5'," -i config_unix.py + for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg}; do + sed -e "/origincdirs =/a'$i/include'," -i config_unix.py + sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py + done - sed -e "s|get_python_inc(0)|\"${numeric}/include/python2.5\"|g" -i config_unix.py - - # XXX: `Numeric.pth' should be found by Python but it's not, hence the - # $PYTHONPATH setting below. Gobolinux has the same problem: - # http://bugs.python.org/issue1431 . - yes Y | \ - PYTHONPATH="${numeric}/lib/python2.5/site-packages/Numeric:$PYTHONPATH" \ - python config.py - - # That `config.py' is really deeply broken. - sed -i Setup \ - -e "s|^NUMERIC *=.*$|NUMERIC = -I${numeric}/include/python2.5|g ; - s|^MIXER *=.*$|MIXER = -I${SDL_mixer}/include -L${SDL_mixer}/lib -lSDL_mixer|g" + yes Y | LOCALBASE=/ python config.py ''; - buildPhase = "yes Y | python setup.py build"; + buildPhase = "python setup.py build"; - installPhase = "yes Y | python setup.py install --prefix=\${out} "; + installPhase = "python setup.py install --prefix=$out"; meta = { description = "Python library for games"; + homepage = "http://www.pygame.org/"; + licences = "LGPLv2.1+"; }; } diff --git a/pkgs/development/python-modules/pygame/pygame-v4l.patch b/pkgs/development/python-modules/pygame/pygame-v4l.patch new file mode 100644 index 000000000000..3b5a2b9d2bf9 --- /dev/null +++ b/pkgs/development/python-modules/pygame/pygame-v4l.patch @@ -0,0 +1,88 @@ +diff -crB pygame-1.9.1release/Setup.in pygame-1.9.1release-v4lpatch//Setup.in +*** pygame-1.9.1release/Setup.in Thu Jul 2 06:41:56 2009 +--- pygame-1.9.1release-v4lpatch//Setup.in Thu Mar 24 17:31:22 2011 +*************** +*** 34,40 **** + _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG) + movie src/movie.c $(SDL) $(SMPEG) $(DEBUG) + scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG) +! _camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG) + pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) + + GFX = src/SDL_gfx/SDL_gfxPrimitives.c +--- 34,40 ---- + _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG) + movie src/movie.c $(SDL) $(SMPEG) $(DEBUG) + scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG) +! _camera src/_camera.c src/camera_v4l2.c $(SDL) $(DEBUG) + pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) + + GFX = src/SDL_gfx/SDL_gfxPrimitives.c +diff -crB pygame-1.9.1release/src/_camera.c pygame-1.9.1release-v4lpatch//src/_camera.c +*** pygame-1.9.1release/src/_camera.c Sun Mar 15 20:30:41 2009 +--- pygame-1.9.1release-v4lpatch//src/_camera.c Thu Mar 24 16:58:18 2011 +*************** +*** 160,179 **** + { + #if defined(__unix__) + if (v4l2_open_device(self) == 0) { +! if (v4l_open_device(self) == 0) { +! v4l2_close_device(self); +! return NULL; +! } else { +! self->camera_type = CAM_V4L; +! if (v4l_init_device(self) == 0) { +! v4l2_close_device(self); +! return NULL; +! } +! if (v4l_start_capturing(self) == 0) { +! v4l2_close_device(self); +! return NULL; +! } +! } + } else { + self->camera_type = CAM_V4L2; + if (v4l2_init_device(self) == 0) { +--- 160,167 ---- + { + #if defined(__unix__) + if (v4l2_open_device(self) == 0) { +! v4l2_close_device(self); +! return NULL; + } else { + self->camera_type = CAM_V4L2; + if (v4l2_init_device(self) == 0) { +diff -crB pygame-1.9.1release/src/camera.h pygame-1.9.1release-v4lpatch//src/camera.h +*** pygame-1.9.1release/src/camera.h Fri Oct 10 04:37:10 2008 +--- pygame-1.9.1release-v4lpatch//src/camera.h Thu Mar 24 16:44:32 2011 +*************** +*** 39,45 **** + + #include /* for videodev2.h */ + +- #include + #include + #endif + +--- 39,44 ---- +*************** +*** 51,57 **** + #define RGB_OUT 1 + #define YUV_OUT 2 + #define HSV_OUT 4 +- #define CAM_V4L 1 + #define CAM_V4L2 2 + + struct buffer +--- 50,55 ---- +*************** +*** 111,118 **** + int v4l2_close_device (PyCameraObject* self); + int v4l2_open_device (PyCameraObject* self); + +- /* internal functions specific to v4l */ +- int v4l_open_device (PyCameraObject* self); +- int v4l_init_device(PyCameraObject* self); +- int v4l_start_capturing(PyCameraObject* self); + #endif +--- 109,112 ---- diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix index 07d57591f1ac..940ba18f2a2a 100644 --- a/pkgs/development/python-modules/pygtk/default.nix +++ b/pkgs/development/python-modules/pygtk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, pkgconfig, glib, gtk, pygobject, pycairo +{ stdenv, fetchurl, python, pkgconfig, gtk, pygobject, pycairo , buildPythonPackage, libglade ? null }: buildPythonPackage rec { @@ -9,11 +9,10 @@ buildPythonPackage rec { sha256 = "4acf0ef2bde8574913c40ee4a43d9c4f43bb77b577b67147271b534501a54cc8"; }; - buildInputs = - [ pkgconfig glib gtk ] + buildInputs = [ pkgconfig ] ++ stdenv.lib.optional (libglade != null) libglade; - propagatedBuildInputs = [ pygobject pycairo ]; + propagatedBuildInputs = [ gtk pygobject pycairo ]; installCommand = "make install"; checkPhase = stdenv.lib.optionalString (libglade == null) diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix b/pkgs/development/tools/build-managers/gnumake-3.80/default.nix index dbc68e1d90ce..b0926a7f531c 100644 --- a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix +++ b/pkgs/development/tools/build-managers/gnumake-3.80/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { name = "gnumake-3.80"; src = fetchurl { - url = http://nixos.org/tarballs/make-3.80.tar.bz2; + url = http://tarballs.nixos.org/make-3.80.tar.bz2; md5 = "0bbd1df101bc0294d440471e50feca71"; }; patches = [./log.patch]; diff --git a/pkgs/development/tools/build-managers/mk/default.nix b/pkgs/development/tools/build-managers/mk/default.nix index 9cd208f5a818..6e40e4653acb 100644 --- a/pkgs/development/tools/build-managers/mk/default.nix +++ b/pkgs/development/tools/build-managers/mk/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { name = "mk-2006-01-31"; src = fetchurl { - url = http://nixos.org/tarballs/mk-20060131.tar.gz; + url = http://tarballs.nixos.org/mk-20060131.tar.gz; md5 = "167fd4e0eea4f49def01984ec203289b"; }; builder = ./builder.sh; diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix index c4a8b83a7cf1..68a6640951ba 100644 --- a/pkgs/development/tools/build-managers/ninja/default.nix +++ b/pkgs/development/tools/build-managers/ninja/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, unzip, python, asciidoc, re2c }: +{ stdenv, fetchurl, python, asciidoc, re2c }: stdenv.mkDerivation rec { name = "ninja-${version}"; - version = "1.2.0"; + version = "1.3.4"; src = fetchurl { - name = "${name}.zip"; - url = "https://github.com/martine/ninja/archive/v${version}.zip"; - sha256 = "15ynh806ah37bqb57hcs3mj2g82900sncp6n3bssfggb4azgjlh3"; + name = "${name}.tar.gz"; + url = "https://github.com/martine/ninja/archive/v${version}.tar.gz"; + sha256 = "16b0dxq3v19qjchcmfqq3m4l8s4qx2d674vfvamg0s3vvfqnc477"; }; - buildInputs = [ python asciidoc unzip re2c ]; + buildInputs = [ python asciidoc re2c ]; buildPhase = '' python bootstrap.py diff --git a/pkgs/development/tools/build-managers/remake/default.nix b/pkgs/development/tools/build-managers/remake/default.nix index af2465c208c9..676354a6e8d3 100644 --- a/pkgs/development/tools/build-managers/remake/default.nix +++ b/pkgs/development/tools/build-managers/remake/default.nix @@ -1,15 +1,21 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl, readline }: + +stdenv.mkDerivation rec { + name = "remake-${version}"; + version = "3.82+dbg-0.6"; -stdenv.mkDerivation { - name = "remake-3.81-dbg-0.2"; src = fetchurl { - url = mirror://sourceforge/bashdb/remake-3.81+dbg-0.2.tar.gz; - sha256 = "0mhc06zgd39dl8rk16ii0m2x22b9zi67d48km7rn0fzzv519lmwc"; + url = "mirror://sourceforge/project/bashdb/remake/${version}/${name}.tar.bz2"; + sha256 = "0i2g6vi9zya78d9zpigfnmzg2qcl93myjfibh3kfmjk7b9lajfyz"; }; + buildInputs = [ readline ]; + meta = { homepage = http://bashdb.sourceforge.net/remake/; - license = "GPL"; + license = stdenv.lib.licenses.gpl3; description = "GNU Make with comprehensible tracing and a debugger"; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ bjornfor ]; }; } diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix deleted file mode 100644 index 90045b973521..000000000000 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchurl, writeScript, bash, jre }: - -let - - sbt = writeScript "sbt.sh" '' - #!${bash}/bin/bash - ${jre}/bin/java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled \ - -XX:MaxPermSize=384M -jar @out@/lib/sbt-launch.jar "$@" - ''; - -in stdenv.mkDerivation rec { - name = "sbt-${version}"; - - version = "0.12.3"; - - src = fetchurl { - url = "http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/${version}/sbt.tgz"; - sha256 = "154ydaxd6ink5sy4flzpyh47nnhgkxwpzmml8q16am7655fpib08"; - }; - - installPhase = '' - mkdir -p $out/lib $out/bin - mv bin/sbt-launch.jar $out/lib/ - cp ${sbt} $out/bin/sbt - substituteInPlace $out/bin/sbt --replace @out@ $out - ''; -} diff --git a/pkgs/development/tools/build-managers/simple-build-tool/default.nix b/pkgs/development/tools/build-managers/simple-build-tool/default.nix index 218957ae360d..e446bf1c1eb3 100644 --- a/pkgs/development/tools/build-managers/simple-build-tool/default.nix +++ b/pkgs/development/tools/build-managers/simple-build-tool/default.nix @@ -1,41 +1,93 @@ -{ stdenv, fetchurl }: +{ stdenv, versionedDerivation, fetchurl, version ? "xsbt-0.12.3" }: + +let + + description = "A build tool for Scala"; + longDescription = name: '' + ${name} is a simple build tool for Scala projects that aims to do the + basics well. + + This package is the sbt launcher which automatically manages + and downloads dependencies, including the SBT package and the + Scala compiler. + ''; + + metaSBT = { + inherit description; + longDescription = longDescription "sbt"; + homepage = http://code.google.com/p/simple-build-tool/; + license = "bsd"; + }; + + metaXSBT = { + inherit description; + longDescription = longDescription "xsbt"; + homepage = https://github.com/harrah/xsbt; + license = "bsd"; + }; + +in # Depends on a JRE at runtime. -let - version = "0.7.3"; -in - stdenv.mkDerivation rec { +versionedDerivation "simple-build-tool" version { + "0.7.3" = let version = "0.7.3"; in { name = "simple-build-tool-${version}"; src = fetchurl { url = "http://simple-build-tool.googlecode.com/files/sbt-launch-${version}.jar"; sha256 = "1nciifzf00cs54a4h57a7v1hyklm5vgln0sscmz5kzv96ggphs6k"; }; + meta = metaSBT; + }; - installPhase = '' - mkdir -pv "$out/lib/java" - cp $src "$out/lib/java/sbt-launch-${version}.jar" - mkdir -p "$out/bin" - cat > "$out/bin/sbt" < "$out/bin/sbt" <flags |= BFD_DETERMINISTIC_OUTPUT; ++ + link_info.hash = bfd_link_hash_table_create (link_info.output_bfd); + if (link_info.hash == NULL) + einfo (_("%P%F: can not create hash table: %E\n")); diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix index 0ca8b6eb0714..b2a400a61891 100644 --- a/pkgs/development/tools/misc/intltool/default.nix +++ b/pkgs/development/tools/misc/intltool/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, perl, perlXMLParser}: +{ stdenv, fetchurl, perl, perlXMLParser, gettext }: let s = # Generated upstream information rec { @@ -12,12 +12,15 @@ let propagatedBuildInputs = [perl perlXMLParser]; buildInputs = []; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { inherit (s) name version; src = fetchurl { inherit (s) url sha256; }; - inherit propagatedBuildInputs buildInputs; + inherit buildInputs; + + # not needed by intltool itself but (probably) needed for its usage + propagatedBuildInputs = propagatedBuildInputs ++ [ gettext ]; meta = { description = "Translation helper tool"; diff --git a/pkgs/development/tools/misc/intltool/default.upstream b/pkgs/development/tools/misc/intltool/default.upstream index 4a2965b036af..323bf21f45a1 100644 --- a/pkgs/development/tools/misc/intltool/default.upstream +++ b/pkgs/development/tools/misc/intltool/default.upstream @@ -1,2 +1,2 @@ -attribute_name intltool_standalone +attribute_name intltool url https://launchpad.net/intltool/+download diff --git a/pkgs/development/tools/ocaml/deriving/default.nix b/pkgs/development/tools/ocaml/deriving/default.nix new file mode 100644 index 000000000000..d53f41b5da5c --- /dev/null +++ b/pkgs/development/tools/ocaml/deriving/default.nix @@ -0,0 +1,72 @@ +{stdenv, fetchurl, zlib, ocaml, findlib, ncurses +, versionedDerivation, unzip +, version ? + let match = { + "ocaml-3.10.0" = "for-3.10.0"; + "ocaml-3.12.1" = "for-3.12.1"; + }; in stdenv.lib.maybeAttr ocaml.name (throw "no matching source of ocaml-deriving for ocaml version: ${ocaml.name}") match +}: + +/* +Usage example: + +== main.ml == +type t = | A | B + deriving (Show) + +print_string (Show.show (A));; +== + +ocamlopt -pp $out/bin/deriving -I $d/lib -I $d/syntax nums.cmxa show.cmx main.ml +*/ + +versionedDerivation "ocaml-deriving" version { + + "for-3.10.0" = { + name = "deriving-0.1.1a"; + # ocaml: 3.10.0 + src = fetchurl { + url = https://deriving.googlecode.com/files/deriving-0.1.1a.tar.gz; + sha256 = "0ppmqhc23kccfjn3cnd9n205ky627ni8f5djf8sppmc3lc1m97mb"; + }; + }; + + "for-3.12.1" = { + name = "deriving-git20100903"; + + # https://github.com/jaked/deriving + src = fetchurl { + name = "for-3.12.0.zip"; + url = https://codeload.github.com/jaked/deriving/zip/c7b9cea3eb4bbfb9e09673faf725f70247c9df78; + sha256 = "1zrmpqb5lsjmizqs68czmfpsbz9hz30pf97w11kkby175hhj84gi"; + }; + + buildInputs = [ unzip ]; + }; + +} +{ + buildInputs = [ocaml findlib]; + + installPhase = '' + # not all tests compile !? + # (cd tests; make) + + ensureDir $out/bin + cp -a lib $out/ + cp -a syntax $out + + # this allows -pp deriving + ln -s $out/syntax/deriving $out/bin/deriving + ''; + + meta = { + homepage = "https://code.google.com/p/deriving/source/checkout"; + description = "A library of cryptographic primitives for OCaml"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms; + maintainers = [ + stdenv.lib.maintainers.z77z + ]; + }; +} diff --git a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix new file mode 100644 index 000000000000..48a6b3c1f64d --- /dev/null +++ b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl, makeWrapper, ocaml, ncurses}: +let + pname = "omake"; + version = "0.9.8.6-0.rc1"; + webpage = "http://omake.metaprl.org"; +in +stdenv.mkDerivation { + + name = "${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/downloads/${pname}-${version}.tar.gz"; + sha256 = "1sas02pbj56m7wi5vf3vqrrpr4ynxymw2a8ybvfj2dkjf7q9ii13"; + }; + patchFlags = "-p0"; + patches = [ ./warn.patch ]; + + buildInputs = [ ocaml makeWrapper ncurses ]; + + phases = "unpackPhase patchPhase buildPhase"; + buildPhase = '' + make bootstrap + make PREFIX=$out all + make PREFIX=$out install + ''; +# prefixKey = "-prefix "; +# +# configureFlags = if transitional then "--transitional" else "--strict"; +# +# buildFlags = "world.opt"; + + meta = { + description = "Omake build system"; + homepage = "${webpage}"; + license = "GPL"; + }; +} diff --git a/pkgs/development/tools/ocaml/omake/warn.patch b/pkgs/development/tools/ocaml/omake/warn.patch new file mode 100644 index 000000000000..4459e89d7f9c --- /dev/null +++ b/pkgs/development/tools/ocaml/omake/warn.patch @@ -0,0 +1,10 @@ +diff -p1 -aur ../omake-0.9.8.6.ori/lib/build/OCaml.om ./lib/build/OCaml.om +--- ../omake-0.9.8.6.ori/lib/build/OCaml.om 2008-03-05 01:07:25.000000000 +0000 ++++ ./lib/build/OCaml.om 2013-06-01 15:52:37.000000000 +0000 +@@ -178,3 +178,3 @@ declare OCAMLDEPFLAGS + public.OCAMLPPFLAGS = +-public.OCAMLFLAGS = -warn-error A ++public.OCAMLFLAGS = + public.OCAMLCFLAGS = -g +Seulement dans ./lib/build: OCaml.om~ +Seulement dans .: warn.patch diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix index 063af69a7f37..bccaa70ead7c 100644 --- a/pkgs/development/tools/selenium/chromedriver/default.nix +++ b/pkgs/development/tools/selenium/chromedriver/default.nix @@ -1,22 +1,20 @@ { stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib -, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip +, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip, gconf +, libXrender, libXext }: # note: there is a i686 version available as well assert stdenv.system == "x86_64-linux"; stdenv.mkDerivation rec { - name = "chromedriver_linux64_26.0.1383.0"; + name = "chromedriver_linux64_2.0"; src = fetchurl { url = "http://chromedriver.googlecode.com/files/${name}.zip"; - sha256 = "0fh4r2rcpjc3nfrdyj256kjlyc0b6mhxqwxcah73q4vm1kjax8rs"; + sha256 = "165dq5550fs6262qa2jnjvm9smwjvws2zkkz7z5v4ibfg2j3409m"; }; - buildInputs = [ - cairo fontconfig freetype gdk_pixbuf glib gtk libX11 makeWrapper - nspr nss pango unzip - ]; + buildInputs = [ unzip makeWrapper ]; unpackPhase = "unzip $src"; @@ -25,7 +23,7 @@ stdenv.mkDerivation rec { mv chromedriver $out/bin patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver wrapProgram "$out/bin/chromedriver" \ - --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:\$LD_LIBRARY_PATH" + --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:\$LD_LIBRARY_PATH" ''; meta = with stdenv.lib; { @@ -34,4 +32,4 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = [ maintainers.goibhniu ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/web/plone/4.1.6.nix b/pkgs/development/web/plone/4.1.6.nix index 23a0cc34f909..47bd00b80cbf 100644 --- a/pkgs/development/web/plone/4.1.6.nix +++ b/pkgs/development/web/plone/4.1.6.nix @@ -1,11 +1,11 @@ # DO NOT EDIT THIS FILE! # # Nix expressions autogenerated with: -# bin/pypi2nix -n plone43Packages -d Plone -d mailinglogger -d zc.recipe.egg -d plone.recipe.zope2instance -d Pillow -i setuptools -i zc_buildout -i pillow -e plone/4.1.6.json -p plone/4.1.6.txt -o plone/4.1.6.nix +# bin/pypi2nix -n plone41Packages -d Plone -d mailinglogger -d zc.recipe.egg -d plone.recipe.zope2instance -d Pillow -i setuptools -i zc_buildout -i pillow -e plone/4.1.6.json -p plone/4.1.6.txt -o plone/4.1.6.nix { pkgs, pythonPackages }: -let plone43Packages = pythonPackages.python.modules // rec { +let plone41Packages = pythonPackages.python.modules // rec { inherit (pythonPackages) buildPythonPackage setuptools zc_buildout pillow; inherit (pkgs) fetchurl stdenv; @@ -3092,10 +3092,10 @@ let plone43Packages = pythonPackages.python.modules // rec { }; plone_recipe_zope2instance = buildPythonPackage rec { - name = "plone.recipe.zope2instance-4.1.9"; + name = "plone.recipe.zope2instance-4.1.10"; src = fetchurl { - url = "http://pypi.python.org/packages/source/p/plone.recipe.zope2instance/plone.recipe.zope2instance-4.1.9.zip"; - md5 = "ad90efc7948107ab63efac46ab589569"; + url = "http://pypi.python.org/packages/source/p/plone.recipe.zope2instance/plone.recipe.zope2instance-4.1.10.zip"; + md5 = "787fad7fa44757de74a50a91e9bcfcb5"; }; buildInputs = [ pkgs.unzip ]; propagatedBuildInputs = [ zc_buildout zc_recipe_egg mailinglogger setuptools zope2 ]; @@ -5138,4 +5138,4 @@ let plone43Packages = pythonPackages.python.modules // rec { }; }; -}; in plone43Packages +}; in plone41Packages diff --git a/pkgs/games/flightgear/default.nix b/pkgs/games/flightgear/default.nix index fa0bb9bb4f7c..9b9e7ab96806 100644 --- a/pkgs/games/flightgear/default.nix +++ b/pkgs/games/flightgear/default.nix @@ -49,8 +49,7 @@ rec { [ raskin ]; - platforms = with a.lib.platforms; - linux; + #platforms = a.lib.platforms.linux; license = a.lib.licenses.gpl2; }; passthru = { diff --git a/pkgs/games/keen4/default.nix b/pkgs/games/keen4/default.nix index 745d9f6b38ca..4d6189603a97 100644 --- a/pkgs/games/keen4/default.nix +++ b/pkgs/games/keen4/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { builder = ./builder.sh; dist = fetchurl { - url = http://nixos.org/tarballs/keen4.zip; + url = http://tarballs.nixos.org/keen4.zip; md5 = "ffcdd9e3bce224d92797166bc3f56f1c"; }; diff --git a/pkgs/games/quake3/demo/default.nix b/pkgs/games/quake3/demo/default.nix index fb6d1f0b232b..99c07a9a7e04 100644 --- a/pkgs/games/quake3/demo/default.nix +++ b/pkgs/games/quake3/demo/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation { # This is needed for pak0.pk3. demo = fetchurl { - url = http://nixos.org/tarballs/linuxq3ademo-1.11-6.x86.gz.sh; + url = http://tarballs.nixos.org/linuxq3ademo-1.11-6.x86.gz.sh; md5 = "484610c1ce34272223a52ec331c99d5d"; }; # This is needed for the additional pak?.pk3 files. update = fetchurl { - url = http://nixos.org/tarballs/linuxq3apoint-1.31.x86.run; + url = http://tarballs.nixos.org/linuxq3apoint-1.31.x86.run; md5 = "2620b9eefb6d0775f766b6570870157a"; }; diff --git a/pkgs/games/sgt-puzzles/default.nix b/pkgs/games/sgt-puzzles/default.nix index b8043525719a..8aaf1f0865c4 100644 --- a/pkgs/games/sgt-puzzles/default.nix +++ b/pkgs/games/sgt-puzzles/default.nix @@ -10,8 +10,8 @@ in rec { src = fetchsvn { url = svn://svn.tartarus.org/sgt/puzzles; - rev = "9689"; - sha256 = "33285a971fee67324f8867de22582931135d8b8ee4cc2c41c46c3ba81eb99cb7"; + rev = "9773"; + sha256 = "1m0mmxbcj0zi44dlmhk4h30d9hdy8g9f59r7k7906pgnnyf49611"; } + "/"; inherit buildInputs; @@ -27,7 +27,7 @@ rec { setVars = a.noDepEntry '' export NIX_LDFLAGS="$NIX_LDFLAGS -lX11" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error=variadic-macros" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error" ''; /* doConfigure should be removed if not needed */ diff --git a/pkgs/lib/licenses.nix b/pkgs/lib/licenses.nix index 89edcd738f4d..0669bc3f5c30 100644 --- a/pkgs/lib/licenses.nix +++ b/pkgs/lib/licenses.nix @@ -16,6 +16,18 @@ url = https://www.gnu.org/licenses/agpl.html; }; + amd = { + shortName = "amd"; + fullName = "AMD License Agreement"; + url = "http://developer.amd.com/amd-license-agreement/"; + }; + + amdadl = { + shortName = "amd-adl"; + fullName = "amd-adl license"; + url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/AMD-ADL?revision=1.1"; + }; + asl20 = { shortName = "ASL2.0"; fullName = "Apache Software License 2.0"; diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix index e861203fb159..5e506ce25c2a 100644 --- a/pkgs/lib/maintainers.nix +++ b/pkgs/lib/maintainers.nix @@ -8,6 +8,7 @@ all = "Nix Committers "; amiddelk = "Arie Middelkoop "; andres = "Andres Loeh "; + amorsillo = "Andrew Morsillo "; antono = "Antono Vasiljev "; astsmtl = "Alexander Tsamutali "; aszlig = "aszlig "; @@ -22,6 +23,7 @@ goibhniu = "Cillian de Róiste "; guibert = "David Guibert "; iElectric = "Domen Kozar "; + lovek323 = "Jason O'Conal "; jcumming = "Jack Cummings "; kkallio = "Karn Kallio "; ludo = "Ludovic Courtès "; diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index 0f4c0d0de953..19e5081009de 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -315,6 +315,8 @@ rec { ) ]; mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; }; + mergeAttrsByFuncDefaultsClean = list: removeAttrs (mergeAttrsByFuncDefaults list) ["mergeAttrBy"]; + # merge attrs based on version key into mkDerivation args, see mergeAttrBy to learn about smart merge defaults # # This function is best explained by an example: @@ -356,7 +358,8 @@ rec { # sane defaults (same name as attr name so that inherit can be used) mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; } - listToAttrs (map (n : nameValuePair n lib.concat) [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ]) + listToAttrs (map (n : nameValuePair n lib.concat) + [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" "patches" ]) // listToAttrs (map (n : nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ]) // listToAttrs (map (n : nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ]) ; diff --git a/pkgs/lib/modules.nix b/pkgs/lib/modules.nix index 286178a0fa70..ea38010ceccc 100644 --- a/pkgs/lib/modules.nix +++ b/pkgs/lib/modules.nix @@ -75,12 +75,19 @@ rec { ); - unifyOptionModule = {key ? ""}: m: (args: - let module = lib.applyIfFunction m args; in - if lib.isModule module then - { inherit key; } // module + unifyOptionModule = {key ? ""}: name: index: m: (args: + let + module = lib.applyIfFunction m args; + key_ = rec { + file = key; + option = name; + number = index; + outPath = key; + }; + in if lib.isModule module then + { key = key_; } // module else - { inherit key; options = module; } + { key = key_; options = module; } ); @@ -197,9 +204,9 @@ rec { recurseInto = name: moduleMerge (addName name) (modulesOf name); - recurseForOption = name: modules: + recurseForOption = name: modules: args: moduleMerge name ( - map unifyModuleSyntax modules + moduleClosure modules args ); errorSource = modules: @@ -240,7 +247,7 @@ rec { decls = # add location to sub-module options. map (m: mapSubOptions - (unifyOptionModule {inherit (m) key;}) + (unifyOptionModule {inherit (m) key;} name) m.options ) declarations; diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index 3a8cc0006ef1..1fdf9ad8088d 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -31,7 +31,7 @@ rec { mapSubOptions = f: opt: if opt ? options then opt // { - options = map f (toList opt.options); + options = imap f (toList opt.options); } else opt; @@ -82,16 +82,18 @@ rec { handleOptionSets = opt: if opt ? type && opt.type.hasOptions then let - - optionConfig = vals: args: - map (f: lib.applyIfFunction f args) - (opt.options ++ toList vals); - # Evaluate sub-modules. subModuleMerge = path: vals: lib.fix (args: let - result = recurseInto path (optionConfig vals args); + result = recurseInto path (opt.options ++ imap (index: v: args: { + key = rec { + #!!! Would be nice if we had the file the val was from + option = path; + number = index; + outPath = "option ${option} config number ${toString number}"; + }; + } // (lib.applyIfFunction v args)) (toList vals)) args; name = lib.removePrefix (opt.name + ".") path; extraArgs = opt.extraArgs or {}; individualExtraArgs = opt.individualExtraArgs or {}; diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix index 6c4adfaa1a71..ed668e2b9270 100644 --- a/pkgs/lib/strings.nix +++ b/pkgs/lib/strings.nix @@ -109,6 +109,13 @@ rec { stringAsChars subst s; + # Case conversion utilities + lowerChars = stringToCharacters "abcdefghijklmnopqrstuvwxyz"; + upperChars = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + toLower = replaceChars upperChars lowerChars; + toUpper = replaceChars lowerChars upperChars; + + # Compares strings not requiring context equality # Obviously, a workaround but works on all Nix versions eqStrings = a: b: (a+(substring 0 0 b)) == ((substring 0 0 a)+b); diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index be442fd22a61..471fbcdc4645 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "doc" "man" ]; buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb1 ] - ++ stdenv.lib.optionals stdenv.isLinux [ pam dbus acl ] ; + ++ stdenv.lib.optionals stdenv.isLinux [ pam dbus.libs acl ] ; propagatedBuildInputs = [ openssl ]; diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix index 31ed420fe563..69bcea87f6a3 100644 --- a/pkgs/misc/emulators/wine/default.nix +++ b/pkgs/misc/emulators/wine/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, xlibs, flex, bison, mesa, alsaLib , ncurses, libpng, libjpeg, lcms, freetype, fontconfig, fontforge -, libxml2, libxslt, openssl, gnutls, cups +, libxml2, libxslt, openssl, gnutls, cups, libdrm, makeWrapper }: assert stdenv.isLinux; @@ -25,14 +25,14 @@ stdenv.mkDerivation rec { xlibs.libXcursor xlibs.libXinerama xlibs.libXrandr xlibs.libXrender xlibs.libXxf86vm xlibs.libXcomposite alsaLib ncurses libpng libjpeg lcms fontforge - libxml2 libxslt openssl gnutls cups + libxml2 libxslt openssl gnutls cups makeWrapper ]; # Wine locates a lot of libraries dynamically through dlopen(). Add # them to the RPATH so that the user doesn't have to set them in # LD_LIBRARY_PATH. NIX_LDFLAGS = map (path: "-rpath ${path}/lib ") [ - freetype fontconfig stdenv.gcc.gcc mesa mesa.libdrm + freetype fontconfig stdenv.gcc.gcc mesa libdrm xlibs.libXinerama xlibs.libXrender xlibs.libXrandr xlibs.libXcursor xlibs.libXcomposite libpng libjpeg openssl gnutls cups @@ -42,7 +42,10 @@ stdenv.mkDerivation rec { # elements specified above. dontPatchELF = true; - postInstall = "install -D ${gecko} $out/share/wine/gecko/${gecko.name}"; + postInstall = '' + install -D ${gecko} $out/share/wine/gecko/${gecko.name} + wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.gcc.gcc}/lib + ''; enableParallelBuilding = true; diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index ac171b2ff814..79f367446033 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl, lcms, freetype +{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl +, lcms2, freetype, libpaper, jbig2dec, expat, libiconvOrEmpty , x11Support, x11 ? null , cupsSupport ? false, cups ? null , gnuFork ? true @@ -8,7 +9,7 @@ assert x11Support -> x11 != null; assert cupsSupport -> cups != null; let - meta = { + meta_common = { homepage = "http://www.gnu.org/software/ghostscript/"; description = "GNU Ghostscript, a PostScript interpreter"; @@ -34,25 +35,28 @@ let sha256 = "0zqa6ggbkdqiszsywgrra4ij0sddlmrfa50bx2mh568qid4ga0a2"; }; - inherit meta; + meta = meta_common; patches = [ ./purity.patch ]; }; - mainlineSrc = { - name = "ghostscript-9.05"; + mainlineSrc = rec { + name = "ghostscript-9.06"; src = fetchurl { - url = "http://downloads.ghostscript.com/public/ghostscript-9.05.tar.bz2"; - sha256 = "1b6fi76x6pn9dmr9k9lh8kimn968dmh91k824fmm59d5ycm22h8g"; + url = "http://downloads.ghostscript.com/public/${name}.tar.bz2"; + sha256 = "014f10rxn4ihvcr1frby4szd1jvkrwvmdhnbivpp55c9fssx3b05"; }; - meta = meta // { + meta = meta_common // { homepage = "http://www.ghostscript.com/"; description = "GPL Ghostscript, a PostScript interpreter"; }; preConfigure = '' - rm -R libpng jpeg lcms tiff freetype + rm -R libpng jpeg lcms{,2} tiff freetype jbig2dec expat jasper openjpeg + + substituteInPlace base/unix-aux.mak --replace "INCLUDE=/usr/include" "INCLUDE=/no-such-path" + sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@" -i base/unix-aux.mak ''; - patches = [ ./purity-9.05.patch ]; + patches = []; }; variant = if gnuFork then gnuForkSrc else mainlineSrc; @@ -64,8 +68,8 @@ stdenv.mkDerivation rec { fonts = [ (fetchurl { - url = "mirror://gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz"; - sha256 = "1lxr1y52r26qjif8kdqkfhsb5llakdcx3f5b9ppdyn59bb83ivsc"; + url = "mirror://sourceforge/gs-fonts/ghostscript-fonts-std-8.11.tar.gz"; + sha256 = "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"; }) (fetchurl { url = "mirror://gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz"; @@ -74,9 +78,14 @@ stdenv.mkDerivation rec { # ... add other fonts here ]; - buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl lcms] - ++ stdenv.lib.optionals x11Support [x11 freetype] - ++ stdenv.lib.optional cupsSupport cups; + buildInputs = [ + libjpeg libpng libtiff zlib pkgconfig fontconfig openssl lcms2 + libpaper jbig2dec expat + ] ++ stdenv.lib.optionals x11Support [x11 freetype] + ++ stdenv.lib.optional cupsSupport cups + ++ libiconvOrEmpty + # [] # maybe sometimes jpeg2000 support + ; CFLAGS = "-fPIC"; NIX_LDFLAGS = @@ -92,7 +101,7 @@ stdenv.mkDerivation rec { makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups CUPSDATA=$out/share/cups) '' + stdenv.lib.optionalString (variant ? preConfigure) variant.preConfigure; - configureFlags = + configureFlags = [ "--with-system-libtiff" ] ++ (if x11Support then [ "--with-x" ] else [ "--without-x" ]) ++ (if cupsSupport then [ "--enable-cups" "--with-install-cups" ] else [ "--disable-cups" ]); @@ -100,6 +109,7 @@ stdenv.mkDerivation rec { installTargets="install soinstall"; + # ToDo: web says the fonts should be already included postInstall = '' for i in $fonts; do (cd $out/share/ghostscript && tar xvfz $i) diff --git a/pkgs/misc/ghostscript/purity-9.05.patch b/pkgs/misc/ghostscript/purity-9.05.patch deleted file mode 100644 index cae9df7110ba..000000000000 --- a/pkgs/misc/ghostscript/purity-9.05.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/base/unix-aux.mak b/base/unix-aux.mak -index 18745bc..0a67942 100644 ---- a/base/unix-aux.mak -+++ b/base/unix-aux.mak -@@ -111,15 +111,15 @@ $(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) - # The "else true;" is required because Ultrix's implementation of sh -e - # terminates execution of a command if any error occurs, even if the command - # traps the error with ||. --INCLUDE=/usr/include -+INCLUDE=/no-such-path - $(gconfig__h): $(UNIX_AUX_MAK) $(ECHOGS_XE) - $(ECHOGS_XE) -w $(gconfig__h) -x 2f2a -s This file was generated automatically by unix-aux.mak. -s -x 2a2f -- if ( test -f $(INCLUDE)/dirent.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_DIRENT_H; else true; fi -- if ( test -f $(INCLUDE)/ndir.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_NDIR_H; else true; fi -- if ( test -f $(INCLUDE)/sys/dir.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_DIR_H; else true; fi -- if ( test -f $(INCLUDE)/sys/ndir.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_NDIR_H; else true; fi -- if ( test -f $(INCLUDE)/sys/time.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 ifndef HAVE_SYS_TIME_H ; \ -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_DIRENT_H; else true; fi -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_NDIR_H; else true; fi -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_DIR_H; else true; fi -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_NDIR_H; else true; fi -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 ifndef HAVE_SYS_TIME_H ; \ - $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_TIME_H ; \ - $(ECHOGS_XE) -a $(gconfig__h) -x 23 endif; else true; fi -- if ( test -f $(INCLUDE)/sys/times.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_TIMES_H; else true; fi -+ if ( true ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_SYS_TIMES_H; else true; fi - if ( test -f $(JSRCDIR)/jmemsys.h); then true; else $(ECHOGS_XE) -a $(gconfig__h) -x 23 define DONT_HAVE_JMEMSYS_H; fi diff --git a/pkgs/misc/themes/gnome-themes-standard/default.nix b/pkgs/misc/themes/gnome-themes-standard/default.nix new file mode 100644 index 000000000000..f52b94138a48 --- /dev/null +++ b/pkgs/misc/themes/gnome-themes-standard/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl, intltool, gtk3, librsvg, pkgconfig, pango, atk, gtk2, gdk_pixbuf }: +stdenv.mkDerivation { + name = "gnome-themes-standard"; + src = fetchurl { + url = "http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-standard/3.7/gnome-themes-standard-3.7.92.tar.xz"; + sha256 = "0a1ed83c07f57b5b45b8f3817ca0ca14feecb56de505243c086fb306c88da8de"; + }; + + buildInputs = [ intltool gtk3 librsvg pkgconfig pango atk gtk2 gdk_pixbuf ]; + + preConfigure = '' + cat ${gdk_pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache ${librsvg}/lib/gdk-pixbuf/loaders.cache > loaders.cache + export GDK_PIXBUF_MODULE_FILE=`readlink -e loaders.cache` + ''; +} \ No newline at end of file diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix new file mode 100644 index 000000000000..da06eaec35cd --- /dev/null +++ b/pkgs/misc/vim-plugins/default.nix @@ -0,0 +1,170 @@ +{fetchurl, stdenv, python, cmake, vim}: + +/* +About Vim and plugins +===================== +Let me tell you how Vim plugins work, so that you can decide on how to orginize +your setup. + +typical plugin files: + + plugin/P1.vim + autoload/P1.vim + ftplugin/xyz.vim + doc/plugin-documentation.txt + README(.md) (nowadays thanks to github) + +Traditionally plugins were installed into ~/.vim/* so it was your task to keep track +of which files belong to what plugin. Now this problem is "fixed" by nix which +assembles your profile for you. + + +Vim offers the :h rtp setting which works for most plugins. Thus adding adding +this to your .vimrc should make most plugins work: + + set rtp+=~/.nix-profile/vim-plugins/YouCompleteMe + " or for p in ["YouCompleteMe"] | exec 'set rtp+=~/.nix-profile/vim-plugins/'.p | endfor + +Its what +pathogen, vundle, vim-addon-manager (VAM) use. + +VAM's benefits: +- works around after/* directories if they are used in non ~/.vim locations +- allows activating plugins at runtime, eg when you need them. (works around + some au command hooks, eg required for TheNerdTree plugin) +- VAM checkous out all sources (vim.sf.net, git, mercurial, ...) +- runs :helptags on update/installation only. Obviously it cannot do that on + store paths. + +VAM is made up of +- the code loading plugins +- an optional pool (github.com/MarcWeber/vim-addon-manager-known-repositories) + +That pool probably is the best source to automatically derive plugin +information from or to lookup about how to get data from www.vim.org. + +I'm not sure we should package them all. Most of them are not used much. +You need your .vimrc anyway, and then VAM gets the job done ? + +How to install VAM? eg provide such a bash function: + + vim-install-vam () { + mkdir -p ~/.vim/vim-addons && git clone --depth=1 git://github.com/MarcWeber/vim-addon-manager.git ~/.vim/vim-addons/vim-addon-manager && cat >> ~/.vimrc <