···10101111stdenv.mkDerivation rec {1212 name = "vlc-${version}";1313- version = "2.0.4";1313+ version = "2.0.5";14141515 src = fetchurl {1616 url = "http://download.videolan.org/pub/videolan/vlc/${version}/${name}.tar.xz";1717- sha256 = "1dixankckfxf8xixfc32rc9mfsv6mx2lk5h13ym8bp4dsk86w1jf";1717+ sha256 = "0vkbv477a7z0v55sigz6c3abxljz7jyysp7z8s29zk8vhq0fpyfz";1818 };19192020 buildInputs =
-2
pkgs/build-support/fetchurl/mirrors.nix
···2020 http://kent.dl.sourceforge.net/sourceforge/2121 ];22222323- sf = sourceforge;2424-2523 # GNU (http://www.gnu.org/prep/ftp.html).2624 gnu = [2725 # This one redirects to a (supposedly) nearby and (supposedly) up-to-date
+1-1
pkgs/build-support/release/source-tarball.nix
···99, versionSuffix ? 1010 if officialRelease1111 then ""1212- else if src ? rev then "pre${toString src.rev}" else ""1212+ else "pre${toString (src.rev or src.revCount or "")}"1313, src, stdenv, autoconf, automake, libtool1414, ... } @ args:1515
+79
pkgs/build-support/replace-dependency.nix
···11+{ runCommand, nix, lib }:22+33+# Replace a single dependency in the requisites tree of drv, propagating44+# the change all the way up the tree, without a full rebuild. This can be55+# useful, for example, to patch a security hole in libc and still use your66+# system safely without rebuilding the world. This should be a short term77+# solution, as soon as a rebuild can be done the properly rebuild derivation88+# should be used. The old dependency and new dependency MUST have the same-length99+# name, and ideally should have close-to-identical directory layout.1010+#1111+# Example: safeFirefox = replaceDependency {1212+# drv = firefox;1313+# oldDependency = glibc;1414+# newDependency = overrideDerivation glibc (attrs: {1515+# patches = attrs.patches ++ [ ./fix-glibc-hole.patch ];1616+# });1717+# };1818+# This will rebuild glibc with your security patch, then copy over firefox1919+# (and all of its dependencies) without rebuilding further.2020+{ drv, oldDependency, newDependency }:2121+2222+with lib;2323+2424+let2525+ references = import (runCommand "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''2626+ (echo {2727+ while read path2828+ do2929+ echo " \"$path\" = ["3030+ read count3131+ read count3232+ while [ "0" != "$count" ]3333+ do3434+ read ref_path3535+ if [ "$ref_path" != "$path" ]3636+ then3737+ echo " (builtins.storePath $ref_path)"3838+ fi3939+ count=$(($count - 1))4040+ done4141+ echo " ];"4242+ done < graph4343+ echo }) > $out4444+ '').outPath;4545+4646+ discard = builtins.unsafeDiscardStringContext;4747+4848+ oldStorepath = builtins.storePath (discard (toString oldDependency));4949+5050+ referencesOf = drv: getAttr (discard (toString drv)) references;5151+5252+ dependsOnOld = drv: elem oldStorepath (referencesOf drv) ||5353+ any dependsOnOld (referencesOf drv);5454+5555+ drvName = drv:5656+ discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv));5757+5858+ rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix}/bin/nix-store"; } ''5959+ $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${6060+ concatStringsSep " -e " (mapAttrsToList (name: value:6161+ "'s|${baseNameOf name}|${baseNameOf value}|g'"6262+ ) hashes)6363+ } | $nixStore --restore $out6464+ '';6565+6666+ rewrittenDeps = listToAttrs [ {name = discard (toString oldDependency); value = newDependency;} ];6767+6868+ rewrittenDerivations = drv:6969+ if dependsOnOld drv7070+ then listToAttrs [ {7171+ name = discard (toString drv);7272+7373+ value = rewriteHashes drv (rewrittenDeps // (fold (drv: acc:7474+ (rewrittenDerivations drv) // acc7575+ ) {} (referencesOf drv)));7676+ } ]7777+ else {};7878+in assert (stringLength (drvName (toString oldDependency)) == stringLength (drvName (toString newDependency)));7979+getAttr (discard (toString drv)) (rewrittenDerivations drv)
···33 (http://pypi.python.org/pypi/setuptools/), which represents a large44 number of Python packages nowadays. */5566-{ python, setuptools, wrapPython, lib, offlineDistutils, setuptoolsSite }:66+{ python, setuptools, wrapPython, lib, offlineDistutils, recursivePthLoader }:7788{ name, namePrefix ? "python-"99···2323 ''2424 easy_install --always-unzip --prefix="$out" .2525 ''2626-2626+2727, preConfigure ? "true"28282929, buildPhase ? "true"···48484949 name = namePrefix + name;50505151+ # checkPhase after installPhase to run tests on installed packages5152 phases = "unpackPhase patchPhase configurePhase buildPhase installPhase checkPhase fixupPhase distPhase";52535354 buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath;54555555- # setuptoolsSite is responsible for loading pth files5656- propagatedBuildInputs = propagatedBuildInputs ++ [ setuptoolsSite ];5656+ propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader ];57575858- buildInputStrings = map toString buildInputs;5959-6060- pythonPath = [ setuptools] ++ pythonPath;5858+ pythonPath = [ setuptools ] ++ pythonPath;61596260 preConfigure = ''6361 PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH"···8183 # Remove any site.py files generated by easy_install as these8284 # cause collisions. If pth files are to be processed a8385 # corresponding site.py needs to be included in the PYTHONPATH.8484- #8585- # leave them until we have a better solution: see #2098686- #rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*8686+ rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*87878888 ${postInstall}8989 '';
+3
pkgs/development/python-modules/generic/wrap.sh
···5151 local inputs="$2"5252 if [ foo"$inputs" != foo ]; then5353 for x in $inputs; do5454+ if $(echo -n $x |grep -q python-recursive-pth-loader); then5555+ continue5656+ fi5457 if test -d "$x"/lib/@libPrefix@/site-packages; then5558 echo $x/lib/@libPrefix@/site-packages \5659 >> "$out"/lib/@libPrefix@/site-packages/${name}-nix-python-$category.pth
···12121313 buildInputs = [ python pkgconfig glib ];14141515+ # in a "normal" setup, pygobject and pygtk are installed into the1616+ # same site-packages: we need a pth file for both. pygtk.py would be1717+ # used to select a specific version, in our setup it should have no1818+ # effect, but we leave it in case somebody expects and calls it.1519 postInstall = ''1616- # All python code is installed into a "gtk-2.0" sub-directory. That1717- # sub-directory may be useful on systems which share several library1818- # versions in the same prefix, i.e. /usr/local, but on Nix that directory1919- # is useless. Furthermore, its existence makes it very hard to guess a2020- # proper $PYTHONPATH that allows "import gtk" to succeed.2121- cd $(toPythonPath $out)/gtk-2.02222- for n in *; do2323- ln -s "gtk-2.0/$n" "../$n"2424- done2020+ mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${name}.pth}2521 '';26222723 meta = {
+26-17
pkgs/development/python-modules/pygtk/default.nix
···11-{ stdenv, fetchurl, makeWrapper, python, pkgconfig, glib, gtk, pygobject, pycairo22-, libglade ? null }:11+{ stdenv, fetchurl, python, pkgconfig, glib, gtk, pygobject, pycairo22+, buildPythonPackage, libglade ? null }:3344-stdenv.mkDerivation rec {44+buildPythonPackage rec {55 name = "pygtk-2.22.0";6677 src = fetchurl {···1010 };11111212 buildInputs =1313- [ makeWrapper python pkgconfig glib gtk ]1313+ [ pkgconfig glib gtk ]1414 ++ stdenv.lib.optional (libglade != null) libglade;15151616 propagatedBuildInputs = [ pygobject pycairo ];17171818+ installCommand = "make install";1919+ checkPhase = stdenv.lib.optionalString (libglade == null)2020+ ''2121+ sed -i -e "s/glade = importModule('gtk.glade', buildDir)//" \2222+ tests/common.py2323+ sed -i -e "s/, glade$//" \2424+ -e "s/.*testGlade.*//" \2525+ -e "s/.*(glade.*//" \2626+ tests/test_api.py2727+ '' + ''2828+ sed -i -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \2929+ -e "s/sys.path.insert(0, buildDir)//" \3030+ tests/common.py3131+ make check3232+ '';3333+ # XXX: TypeError: Unsupported type: <class 'gtk._gtk.WindowType'>3434+ # The check phase was not executed in the previous3535+ # non-buildPythonPackage setup - not sure why not.3636+ doCheck = false;3737+1838 postInstall = ''1939 rm $out/bin/pygtk-codegen-2.02040 ln -s ${pygobject}/bin/pygobject-codegen-2.0 $out/bin/pygtk-codegen-2.02121-2222- # All python code is installed into a "gtk-2.0" sub-directory. That2323- # sub-directory may be useful on systems which share several library2424- # versions in the same prefix, i.e. /usr/local, but on Nix that directory2525- # is useless. Furthermore, its existence makes it very hard to guess a2626- # proper $PYTHONPATH that allows "import gtk" to succeed.2727- cd $(toPythonPath $out)/gtk-2.02828- for n in *; do2929- ln -s "gtk-2.0/$n" "../$n"3030- done3131-3232- wrapProgram $out/bin/pygtk-demo --prefix PYTHONPATH ":" \3333- $(toPythonPath "${pygobject} ${pycairo} $out")4141+ ln -s ${pygobject}/lib/${python.libPrefix}/site-packages/${pygobject.name}.pth \4242+ $out/lib/${python.libPrefix}/site-packages/${name}.pth3443 '';3544}
···11Without this patch `virtualenv --python=python2.7 .` fails with an error because it notices that the python readline.so is not in the same path as python2.7. I assume this is to avoid copying the wrong file on systems where it is possible to find incompatible libraries by accident. Adding "/nix/store" to the prefix fixes this problem. Unfortunately readline is still not available if you just run `virtualenv .`.2233-44---- virtualenv-1.6.4/virtualenv.py 2012-05-20 00:40:38.070649647 +020055-+++ virtualenv-1.6.4/virtualenv.py 2012-05-20 00:45:10.596242604 +020066-@@ -951,13 +951,7 @@33+--- virtualenv-1.8.4/virtualenv.py 2013-01-16 23:43:37.583615220 +010044++++ virtualenv-1.8.4/virtualenv.py 2013-01-16 23:44:47.885973431 +010055+@@ -1135,17 +1135,7 @@768798 def change_prefix(filename, dst_prefix):109- prefixes = [sys.prefix]1110-1212-- if sys.platform == "darwin":1111+- if is_darwin:1312- prefixes.extend((1413- os.path.join("/Library/Python", sys.version[:3], "site-packages"),1514- os.path.join(sys.prefix, "Extras", "lib", "python"),1616-- os.path.join("~", "Library", "Python", sys.version[:3], "site-packages")))1515+- os.path.join("~", "Library", "Python", sys.version[:3], "site-packages"),1616+- # Python 2.6 no-frameworks1717+- os.path.join("~", ".local", "lib","python", sys.version[:3], "site-packages"),1818+- # System Python 2.7 on OSX Mountain Lion1919+- os.path.join("~", "Library", "Python", sys.version[:3], "lib", "python", "site-packages")))1720+ prefixes = ["/nix/store", sys.prefix]18211922 if hasattr(sys, 'real_prefix'):2023 prefixes.append(sys.real_prefix)2121-@@ -968,6 +962,8 @@2222- _, relpath = filename.split(src_prefix, 1)2323- assert relpath[0] == os.sep2424- relpath = relpath[1:]2525-+ if src_prefix == "/nix/store":2626-+ relpath = "/".join(relpath.split("/")[1:])2424+@@ -1162,6 +1152,8 @@2525+ if src_prefix != os.sep: # sys.prefix == "/"2626+ assert relpath[0] == os.sep2727+ relpath = relpath[1:]2828++ if src_prefix == "/nix/store":2929++ relpath = "/".join(relpath.split("/")[1:])2730 return join(dst_prefix, relpath)2831 assert False, "Filename %s does not start with any of these prefixes: %s" % \2932 (filename, prefixes)
···11-{ stdenv, fetchgit, xlibs, flex, bison, mesa, alsaLib22-, ncurses, libpng, libjpeg, lcms, freetype, fontconfig, fontforge33-, libxml2, libxslt, openssl, gnutls44-}:55-66-assert stdenv.isLinux;77-assert stdenv.gcc.gcc != null;88-99-stdenv.mkDerivation rec {1010- name = "wine-warcraft-${version}";1111- version = "1.1.19";1212-1313- src = fetchgit {1414- url = git://repo.or.cz/wine/warcraft3.git;1515- rev = "38faaffd99331b71284d8da5f76f38625107ed6d";1616- };1717-1818- buildInputs = [1919- xlibs.xlibs flex bison xlibs.libXi mesa2020- xlibs.libXcursor xlibs.libXinerama xlibs.libXrandr2121- xlibs.libXrender xlibs.libXxf86vm xlibs.libXcomposite2222- xlibs.xf86vidmodeproto2323- alsaLib ncurses libpng libjpeg lcms fontforge2424- libxml2 libxslt openssl gnutls2525- ];2626-2727- # Wine locates a lot of libraries dynamically through dlopen(). Add2828- # them to the RPATH so that the user doesn't have to set them in2929- # LD_LIBRARY_PATH.3030- NIX_LDFLAGS = map (path: "-rpath ${path}/lib ") [3131- freetype fontconfig stdenv.gcc.gcc mesa mesa.libdrm3232- xlibs.libXinerama xlibs.libXrender xlibs.libXrandr3333- xlibs.libXcursor xlibs.libXcomposite xlibs.libXxf86vm3434- xlibs.xf86vidmodeproto3535- openssl gnutls3636- ];3737-3838- # Don't shrink the ELF RPATHs in order to keep the extra RPATH3939- # elements specified above.4040- dontPatchELF = true;4141-4242- meta = with stdenv.lib; {4343- homepage = "http://www.winehq.org/";4444- license = "LGPL";4545- description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix with patches for Warcraft 3";4646- maintainers = [ maintainers.phreedom ];4747- platforms = [ "i686-linux" ];4848- };4949-}
+6-5
pkgs/os-specific/linux/acpi/default.nix
···11{ stdenv, fetchurl }:2233stdenv.mkDerivation rec {44- name = "acpi-1.5";55-44+ name = "acpi-${version}";55+ version = "1.6";66+67 src = fetchurl {77- url = "http://ftp.de.debian.org/debian/pool/main/a/acpi/acpi_1.5.orig.tar.gz";88- sha256 = "1pb020j627ldjm1askqfzp6cjxrs79ail8svihanv7pgbg5r3zsp";88+ url = "mirror://sourceforge/acpiclient/${version}/${name}.tar.gz";99+ sha256 = "0cawznhkzb51yxa599d1xkw05nklmjrrmd79vmjkkzf4002d4qgd";910 };10111112 meta = {···1615 the "old" `apm' command on ACPI systems. It includes1716 battery and thermal information.1817 '';1919- homepage = http://grahame.angrygoats.net/acpi.shtml;1818+ homepage = http://sourceforge.net/projects/acpiclient/;2019 license = "GPLv2+";2120 };2221}
···11+{stdenv, fetchurl, pciutils, python}:22+33+stdenv.mkDerivation rec {44+ version = "1.30";55+ name = "x86info-${version}";66+77+ src = fetchurl {88+ url = "http://codemonkey.org.uk/projects/x86info/${name}.tgz";99+ sha256 = "0a4lzka46nabpsrg3n7akwr46q38f96zfszd73xcback1s2hjc7y";1010+ };1111+1212+ buildInputs = [ pciutils python ];1313+1414+ installPhase = ''1515+ ensureDir $out/bin1616+ cp x86info lsmsr $out/bin1717+ '';1818+1919+ meta = {2020+ description = "An identification utility for the x86 series of processors.";2121+ longDescription = 2222+ ''2323+ x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages2424+ the cpuid kernel module where possible. it supports parsing model specific2525+ registers (MSRs) via the msr kernel module. it will approximate processor2626+ frequency, and identify the cache sizes and layout. 2727+ '';2828+ platforms = stdenv.lib.platforms.linux;2929+ license = stdenv.lib.licenses.gpl2;3030+ homepage = http://codemonkey.org.uk/projects/x86info/;3131+ maintainers = with stdenv.lib.maintainers; [jcumming];3232+ };3333+}
···11+{stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: stdenv.mkDerivation {22+ name = "jbig2enc-0.28";33+44+ src = fetchurl {55+ url = http://github.com/agl/jbig2enc/archive/0.28-dist.tar.gz;66+ sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3";77+ };88+99+ propagatedBuildInputs = [ leptonica zlib libwebp giflib libjpeg libpng libtiff ];1010+1111+ # This is necessary, because the resulting library has1212+ # /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib1313+ # in its rpath, which means that patchelf --shrink-rpath removes1414+ # the /nix/store one. By cleaning up before fixup, we ensure that1515+ # the /tmp/nix-build-jbig2enc/src/.libs directory is gone.1616+ preFixup = ''1717+ make clean1818+ '';1919+}
+3-3
pkgs/tools/graphics/mscgen/default.nix
···77 name = "mscgen-${version}";8899 src = fetchurl {1010- url = "www.mcternan.me.uk/mscgen/software/mscgen-src-${version}.tar.gz";1010+ url = "http://www.mcternan.me.uk/mscgen/software/mscgen-src-${version}.tar.gz";1111 sha256 = "3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23";1212 };1313···1919 '';20202121 meta = {2222- homepage = "http://www.mcternan.me.uk/mscgen/";2323- description = "convert Message Sequence Chart descriptions into PNG, SVG, or EPS images";2222+ homepage = http://www.mcternan.me.uk/mscgen/;2323+ description = "Convert Message Sequence Chart descriptions into PNG, SVG, or EPS images";2424 license = "GPLv2";25252626 longDescription = ''