diff options
Diffstat (limited to 'pkgs/tools')
72 files changed, 832 insertions, 709 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix index 8434e651dbe..53b3531b685 100644 --- a/pkgs/tools/X11/xdg-utils/default.nix +++ b/pkgs/tools/X11/xdg-utils/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "xdg-utils-1.1.0-rc3p7"; src = fetchgit { - url = "git://anongit.freedesktop.org/xdg/xdg-utils"; + url = "http://anongit.freedesktop.org/git/xdg/xdg-utils.git"; rev = "e8ee3b18d16e41b95148111b920a0c8beed3ac6c"; sha256 = "0qy9h7vh6sw7wmadjvasw4sdhb9fvv7bn32ifgasdx7ag3r3939w"; }; diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index cf58ab7890c..dc859b49736 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,34 +1,33 @@ -{ stdenv, fetchFromGitHub, writeScript +{ stdenv, fetchFromGitHub, writeScript, glibcLocales , buildPythonPackage, pythonPackages, python , enableAcoustid ? true -, enableBeatport ? true , enableDiscogs ? true , enableEchonest ? true , enableFetchart ? true , enableLastfm ? true , enableMpd ? true , enableReplaygain ? true +, enableThumbnails ? true , enableWeb ? true , bashInteractive, bashCompletion }: assert enableAcoustid -> pythonPackages.pyacoustid != null; -assert enableBeatport -> pythonPackages.responses != null; assert enableDiscogs -> pythonPackages.discogs_client != null; assert enableEchonest -> pythonPackages.pyechonest != null; assert enableFetchart -> pythonPackages.responses != null; assert enableLastfm -> pythonPackages.pylast != null; assert enableMpd -> pythonPackages.mpd != null; assert enableReplaygain -> pythonPackages.audiotools != null; +assert enableThumbnails -> pythonPackages.pyxdg != null; assert enableWeb -> pythonPackages.flask != null; with stdenv.lib; let optionalPlugins = { - beatport = enableBeatport; chroma = enableAcoustid; discogs = enableDiscogs; echonest = enableEchonest; @@ -38,15 +37,16 @@ let mpdstats = enableMpd; mpdupdate = enableMpd; replaygain = enableReplaygain; + thumbnails = enableThumbnails; web = enableWeb; }; pluginsWithoutDeps = [ - "bench" "bpd" "bpm" "bucket" "convert" "duplicates" "embedart" "freedesktop" - "fromfilename" "ftintitle" "fuzzy" "ihate" "importadded" "importfeeds" - "info" "inline" "keyfinder" "lyrics" "mbcollection" "mbsync" "missing" - "permissions" "play" "plexupdate" "random" "rewrite" "scrub" "smartplaylist" - "spotify" "the" "types" "zero" + "bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates" "embedart" + "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy" "ihate" + "importadded" "importfeeds" "info" "inline" "keyfinder" "lyrics" + "mbcollection" "mbsync" "missing" "permissions" "play" "plexupdate" "random" + "rewrite" "scrub" "smartplaylist" "spotify" "the" "types" "zero" ]; enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins); @@ -59,14 +59,14 @@ let in buildPythonPackage rec { name = "beets-${version}"; - version = "1.3.10"; + version = "1.3.11"; namePrefix = ""; src = fetchFromGitHub { owner = "sampsyo"; repo = "beets"; rev = "v${version}"; - sha256 = "136rvzpygjym6hxq19qwiri5jxx718bbmi471mvc3vibrb7xj1sr"; + sha256 = "16jb1frds9vl40n9hy18x9xipxfzln3ym823vx8jymhv3by8p62m"; }; propagatedBuildInputs = [ @@ -74,18 +74,20 @@ in buildPythonPackage rec { pythonPackages.munkres pythonPackages.musicbrainzngs pythonPackages.mutagen + pythonPackages.pathlib pythonPackages.pyyaml pythonPackages.unidecode python.modules.sqlite3 python.modules.readline - ] ++ optional enableAcoustid pythonPackages.pyacoustid - ++ optional (enableBeatport || enableFetchart) pythonPackages.requests2 - ++ optional enableDiscogs pythonPackages.discogs_client - ++ optional enableEchonest pythonPackages.pyechonest - ++ optional enableLastfm pythonPackages.pylast - ++ optional enableMpd pythonPackages.mpd - ++ optional enableReplaygain pythonPackages.audiotools - ++ optional enableWeb pythonPackages.flask; + ] ++ optional enableAcoustid pythonPackages.pyacoustid + ++ optional enableFetchart pythonPackages.requests2 + ++ optional enableDiscogs pythonPackages.discogs_client + ++ optional enableEchonest pythonPackages.pyechonest + ++ optional enableLastfm pythonPackages.pylast + ++ optional enableMpd pythonPackages.mpd + ++ optional enableReplaygain pythonPackages.audiotools + ++ optional enableThumbnails pythonPackages.pyxdg + ++ optional enableWeb pythonPackages.flask; buildInputs = with pythonPackages; [ beautifulsoup4 @@ -134,6 +136,8 @@ in buildPythonPackage rec { checkPhase = '' runHook preCheck + LANG=en_US.UTF-8 \ + LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive \ BEETS_TEST_SHELL="${testShell}" \ BASH_COMPLETION_SCRIPT="${completion}" \ HOME="$(mktemp -d)" \ @@ -164,6 +168,6 @@ in buildPythonPackage rec { homepage = http://beets.radbox.org; description = "Music tagger and library organizer"; license = stdenv.lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ iElectric aszlig ]; + maintainers = with stdenv.lib.maintainers; [ iElectric aszlig pjones ]; }; } diff --git a/pkgs/tools/backup/attic/default.nix b/pkgs/tools/backup/attic/default.nix index 9512a917d85..b7bcadd73c5 100644 --- a/pkgs/tools/backup/attic/default.nix +++ b/pkgs/tools/backup/attic/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchzip, python3Packages, openssl, acl }: python3Packages.buildPythonPackage rec { - name = "attic-0.14"; + name = "attic-0.15"; namePrefix = ""; src = fetchzip { name = "${name}-src"; - url = "https://github.com/jborg/attic/archive/0.14.tar.gz"; - sha256 = "1ij99dmd571rvk3kz97vs7wbjj2pbbd54l310lydnwywxhqs8hrv"; + url = "https://github.com/jborg/attic/archive/0.15.tar.gz"; + sha256 = "0bing5zg82mwvdi27jl77ardw65zaq4996k4677gz2lq7p7b4gd7"; }; propagatedBuildInputs = with python3Packages; diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix index 55c84a1015f..57ca79a00a2 100644 --- a/pkgs/tools/backup/bareos/default.nix +++ b/pkgs/tools/backup/bareos/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool , readline ? null, openssl ? null, python ? null, ncurses ? null -, sqlite ? null, postgresql ? null, mysql ? null, zlib ? null, lzo ? null -, acl ? null, glusterfs ? null, ceph ? null, libcap ? null +, sqlite ? null, postgresql ? null, libmysql ? null, zlib ? null, lzo ? null +, acl ? null, glusterfs ? null, libceph ? null, libcap ? null }: -assert sqlite != null || postgresql != null || mysql != null; +assert sqlite != null || postgresql != null || libmysql != null; with stdenv.lib; let @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig nettools gettext readline openssl python - ncurses sqlite postgresql mysql.lib zlib lzo acl glusterfs ceph libcap + ncurses sqlite postgresql libmysql zlib lzo acl glusterfs libceph libcap ]; postPatch = '' @@ -54,12 +54,12 @@ stdenv.mkDerivation rec { ++ optional (openssl != null) "--with-openssl=${openssl}" ++ optional (sqlite != null) "--with-sqlite3=${sqlite}" ++ optional (postgresql != null) "--with-postgresql=${postgresql}" - ++ optional (mysql != null) "--with-mysql=${mysql.lib}" + ++ optional (libmysql != null) "--with-mysql=${libmysql}" ++ optional (zlib != null) "--with-zlib=${zlib}" ++ optional (lzo != null) "--with-lzo=${lzo}" ++ optional (acl != null) "--enable-acl" ++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}" - ++ optional (ceph != null) "--with-cephfs=${ceph}"; + ++ optional (libceph != null) "--with-cephfs=${libceph}"; installFlags = [ "sysconfdir=\${out}/etc" diff --git a/pkgs/tools/cd-dvd/cuetools/default.nix b/pkgs/tools/cd-dvd/cuetools/default.nix index 7de503adc07..bf876d52d45 100644 --- a/pkgs/tools/cd-dvd/cuetools/default.nix +++ b/pkgs/tools/cd-dvd/cuetools/default.nix @@ -1,22 +1,25 @@ -{stdenv, fetchurl, automake, autoconf, flex, bison }: +{ stdenv, fetchurl, autoreconfHook +, bison, flac, flex, id3v2, vorbisTools +}: -stdenv.mkDerivation { - name = "cuetools-1.3.1"; +stdenv.mkDerivation rec { + name = "cuetools-${version}"; + version = "1.4.1"; src = fetchurl { - url = https://github.com/svend/cuetools/archive/cuetools-1.3.1.tar.gz; - sha256 = "1cap3wl0mlcqrjywpz46003w8jws05rr3r87pzqkz1g89v9459dg"; + url = "https://github.com/svend/cuetools/archive/${version}.tar.gz"; + sha256 = "01xi3rvdmil9nawsha04iagjylqr1l9v9vlzk99scs8c207l58i4"; }; - preConfigure = "autoreconf -fiv"; + nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ automake autoconf flex bison ]; + buildInputs = [ bison flac flex id3v2 vorbisTools ]; - meta = { - description = "cd/dvd cue and toc file parsers and utilities"; + meta = with stdenv.lib; { + description = "A set of utilities for working with cue files and toc files"; homepage = https://github.com/svend/cuetools; - platforms = stdenv.lib.platforms.all; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ jcumming ]; + license = licenses.gpl2; + maintainers = with maintainers; [ codyopel jcumming ]; + platforms = platforms.all; }; } diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 26e82886b6f..d27ada615c7 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -11,8 +11,7 @@ stdenv.mkDerivation rec { owner = "Cyan4973"; }; - # valgrind is required only by `make test` - buildInputs = [ valgrind ]; + buildInputs = stdenv.lib.optional doCheck valgrind; enableParallelBuilding = true; diff --git a/pkgs/tools/compression/xdelta/default.nix b/pkgs/tools/compression/xdelta/default.nix index c85c7366cda..fcc3b373fd1 100644 --- a/pkgs/tools/compression/xdelta/default.nix +++ b/pkgs/tools/compression/xdelta/default.nix @@ -1,24 +1,44 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchFromGitHub, autoreconfHook }: -stdenv.mkDerivation { - name = "xdelta-3.0z"; +let version = "3.0.9"; in +stdenv.mkDerivation rec { + name = "xdelta-${version}"; - src = fetchurl { - url = http://xdelta.googlecode.com/files/xdelta3.0z.tar.gz; - sha256 = "1rpk4n3yz8x81vakzn3n75h79a2ycm06p5v72djklx0wn9gb412m"; + src = fetchFromGitHub { + sha256 = "1pd7dyq44dbggmwkrr8251anqsf2an67zbvrk4vfnc92jkmjp17i"; + rev = "v${version}"; + repo = "xdelta-devel"; + owner = "jmacd"; }; - installPhase = - '' - mkdir -p $out/bin - cp xdelta3 $out/bin/ + buildInputs = [ autoreconfHook ]; - mkdir -p $out/share/man/man1 - cp xdelta3.1 $out/share/man/man1/ - ''; + postPatch = '' + cd xdelta3 + '' + stdenv.lib.optionalString doCheck '' + mkdir tmp + substituteInPlace testing/file.h --replace /tmp tmp + substituteInPlace xdelta3-test.h --replace /tmp $PWD/tmp + ''; - meta = { + enableParallelBuilding = true; + + doCheck = true; + checkPhase = '' + ./xdelta3regtest + ''; + + installPhase = '' + install -D -m755 xdelta3 $out/bin/xdelta3 + install -D -m644 xdelta3.1 $out/share/man/man1/xdelta3.1 + ''; + + meta = with stdenv.lib; { + inherit version; + description = "Binary differential compression in VCDIFF (RFC 3284) format"; homepage = http://xdelta.org/; - description = "A binary diff tool that uses the VCDIFF (RFC 3284) format and compression"; + license = with licenses; gpl2Plus; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; }; } diff --git a/pkgs/tools/filesystems/ceph/0.80.nix b/pkgs/tools/filesystems/ceph/0.80.nix new file mode 100644 index 00000000000..2faf30f570c --- /dev/null +++ b/pkgs/tools/filesystems/ceph/0.80.nix @@ -0,0 +1,16 @@ +{ callPackage, fetchgit, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "0.80.9"; + + src = fetchgit { + url = "git://github.com/ceph/ceph.git"; + rev = "refs/tags/v${version}"; + sha256 = "0c1hwl2jzghvbrnddwbp748b02jqznvigwriqx447iz2xyrz2w8q"; + }; + + patches = [ + ./0001-Cleanup-boost-optionals.patch + ./fix-pgrefdebugging.patch + ]; +}) diff --git a/pkgs/tools/filesystems/ceph/0.94.nix b/pkgs/tools/filesystems/ceph/0.94.nix new file mode 100644 index 00000000000..0fc2b60748a --- /dev/null +++ b/pkgs/tools/filesystems/ceph/0.94.nix @@ -0,0 +1,13 @@ +{ callPackage, fetchgit, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "0.94.1"; + + src = fetchgit { + url = "git://github.com/ceph/ceph.git"; + rev = "refs/tags/v${version}"; + sha256 = "0rrl10vda4xv22al2c5ccd8v8drs26186dvkrxndvqz8p9999cjx"; + }; + + patches = [ ./fix-pgrefdebugging.patch ]; +}) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 7fd547099a2..31d5e95359c 100644..120000 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -1,61 +1 @@ -{ stdenv, fetchgit, autoconf, automake, makeWrapper, pkgconfig, libtool, which -, boost, btrfsProgs, cryptopp, curl, expat, fcgi, fuse, gperftools, keyutils -, leveldb, libaio, libatomic_ops, libedit, libuuid, linuxHeaders, openssl -, python, snappy, udev, xfsprogs, xz -, zfs ? null -}: - -with stdenv.lib; -let - wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $out)\"" - + " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\"" - + " --prefix PATH : \"$out/bin\"" - + " --prefix LD_LIBRARY_PATH : \"$out/lib\""; -in -stdenv.mkDerivation rec { - name="ceph-${version}"; - version="0.94"; - - src = fetchgit { - url = "git://github.com/ceph/ceph.git"; - rev = "refs/tags/v${version}"; - sha256 = "0xqfmfg34w8yngv2qg4kwbpv9xhc8rn9hzsrgpw68f5hrs3dfimz"; - }; - - patches = [ - ./0001-Makefile-env-Don-t-force-sbin.patch - ]; - - nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]; - buildInputs = [ - boost btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils - libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python - snappy udev xfsprogs.lib xz zfs - ]; - - preConfigure = '' - ./autogen.sh - ''; - - configureFlags = [ - "--exec_prefix=$(out)" - ] ++ optional (zfs != null) "--with-zfs=${zfs}"; - - postInstall = '' - wrapProgram $out/bin/ceph ${wrapArgs} - wrapProgram $out/bin/ceph-brag ${wrapArgs} - wrapProgram $out/bin/ceph-rest-api ${wrapArgs} - wrapProgram $out/sbin/ceph-create-keys ${wrapArgs} - wrapProgram $out/sbin/ceph-disk ${wrapArgs} - ''; - - enableParallelBuilding = true; - - meta = { - homepage = http://ceph.com/; - description = "Distributed storage system"; - license = licenses.lgpl21; - maintainers = with maintainers; [ ak wkennington ]; - platforms = with platforms; linux; - }; -} +0.94.nix \ No newline at end of file diff --git a/pkgs/tools/filesystems/ceph/dev.nix b/pkgs/tools/filesystems/ceph/dev.nix new file mode 120000 index 00000000000..31d5e95359c --- /dev/null +++ b/pkgs/tools/filesystems/ceph/dev.nix @@ -0,0 +1 @@ +0.94.nix \ No newline at end of file diff --git a/pkgs/tools/filesystems/ceph/fix-pgrefdebugging.patch b/pkgs/tools/filesystems/ceph/fix-pgrefdebugging.patch new file mode 100644 index 00000000000..4d13a0572d8 --- /dev/null +++ b/pkgs/tools/filesystems/ceph/fix-pgrefdebugging.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 38ab682..febb58e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -541,8 +541,10 @@ fi + #set pg ref debugging? + AC_ARG_ENABLE([pgrefdebugging], + [AS_HELP_STRING([--enable-pgrefdebugging], [enable pg ref debugging])], +- [AC_DEFINE([PG_DEBUG_REFS], [1], [Defined if you want pg ref debugging])], +- []) ++ [], [enable_pgrefdebugging=no]) ++AS_IF([test "x$enable_pgrefdebugging" = "xyes"], ++ [AC_DEFINE([PG_DEBUG_REFS], [1], [Defined if you want pg ref debugging])], ++ []) + + # + # Java is painful diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix new file mode 100644 index 00000000000..825d14c9fb1 --- /dev/null +++ b/pkgs/tools/filesystems/ceph/generic.nix @@ -0,0 +1,207 @@ +{ stdenv, autoconf, automake, makeWrapper, pkgconfig, libtool, which +, boost, python, pythonPackages, libxml2, git + +# Optional Dependencies +, snappy ? null, leveldb ? null, yasm ? null, fcgi ? null, expat ? null +, curl ? null, fuse ? null, accelio ? null, libibverbs ? null, librdmacm ? null +, libedit ? null, libatomic_ops ? null, kinetic-cpp-client ? null +, rocksdb ? null, libs3 ? null + +# Mallocs +, jemalloc ? null, gperftools ? null + +# Crypto Dependencies +, cryptopp ? null +, nss ? null, nspr ? null + +# Linux Only Dependencies +, linuxHeaders, libuuid, udev, keyutils, libaio ? null, libxfs ? null +, zfs ? null + +# Version specific arguments +, version, src, patches ? [], buildInputs ? [] +, ... +}: + +# We must have one crypto library +assert cryptopp != null || (nss != null && nspr != null); + +with stdenv.lib; +let + mkFlag = trueStr: falseStr: cond: name: val: + if cond == null then null else + "--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}"; + mkEnable = mkFlag "enable-" "disable-"; + mkWith = mkFlag "with-" "without-"; + mkOther = mkFlag "" "" true; + + hasServer = snappy != null && leveldb != null; + hasMon = hasServer; + hasMds = hasServer; + hasOsd = hasServer; + hasRadosgw = fcgi != null && expat != null && curl != null && libedit != null; + + hasXio = (stdenv.isLinux || stdenv.isFreeBSD) && + versionAtLeast version "0.95" && + accelio != null && libibverbs != null && librdmacm != null; + + hasRocksdb = versionAtLeast version "0.95" && rocksdb != null; + + # TODO: Reenable when kinetic support is fixed + hasKinetic = versionAtLeast version "0.95" && kinetic-cpp-client != null && false; + + # Malloc implementation (can be jemalloc, tcmalloc or null) + malloc = if jemalloc != null then jemalloc else gperftools; + + # We prefer nss over cryptopp + cryptoStr = if nss != null && nspr != null then "nss" else + if cryptopp != null then "cryptopp" else "none"; + cryptoLibsMap = { + nss = [ nss nspr ]; + cryptopp = [ cryptopp ]; + none = [ ]; + }; + + wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $lib)\"" + + " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\"" + + " --prefix PYTHONPATH : \"$(toPythonPath ${pythonPackages.flask})\"" + + " --prefix PATH : \"$out/bin\""; +in +stdenv.mkDerivation { + name="ceph-${version}"; + + inherit src; + + patches = patches ++ [ + ./0001-Makefile-env-Don-t-force-sbin.patch + ]; + + nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]; + buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [ + boost python libxml2 yasm libatomic_ops libs3 malloc pythonPackages.flask + ] ++ optional (versionAtLeast version "0.95") [ + git # Used for the gitversion string + pythonPackages.sphinx # Used for docs + ] ++ optional stdenv.isLinux [ + linuxHeaders libuuid udev keyutils libaio libxfs zfs + ] ++ optional hasServer [ + snappy leveldb + ] ++ optional hasRadosgw [ + fcgi expat curl fuse libedit + ] ++ optional hasXio [ + accelio libibverbs librdmacm + ] ++ optional hasRocksdb [ + rocksdb + ] ++ optional hasKinetic [ + kinetic-cpp-client + ]; + + postPatch = '' + # Fix zfs pkgconfig detection + sed -i 's,\[zfs\],\[libzfs\],g' configure.ac + + # Fix seagate kinetic linking + sed -i 's,libcrypto.a,-lcrypto,g' src/os/Makefile.am + ''; + + preConfigure = '' + # Ceph expects the arch command to be usable during configure + # for detecting the assembly type + mkdir mybin + echo "#${stdenv.shell} -e" >> mybin/arch + echo "uname -m" >> mybin/arch + chmod +x mybin/arch + PATH="$PATH:$(pwd)/mybin" + + ./autogen.sh + + # Fix the python site-packages install directory + sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure + ''; + + configureFlags = [ + "--exec_prefix=\${out}" + "--sysconfdir=/etc" + "--localstatedir=/var" + "--libdir=\${lib}/lib" + "--includedir=\${lib}/include" + + (mkWith true "rbd" null) + (mkWith true "cephfs" null) + (mkWith hasRadosgw "radosgw" null) + (mkWith true "radosstriper" null) + (mkWith hasServer "mon" null) + (mkWith hasServer "osd" null) + (mkWith hasServer "mds" null) + (mkEnable true "client" null) + (mkEnable hasServer "server" null) + (mkWith (cryptoStr == "cryptopp") "cryptopp" null) + (mkWith (cryptoStr == "nss") "nss" null) + (mkEnable false "root-make-check" null) + (mkWith false "profiler" null) + (mkWith false "debug" null) + (mkEnable false "coverage" null) + (mkWith (fuse != null) "fuse" null) + (mkWith (malloc == jemalloc) "jemalloc" null) + (mkWith (malloc == gperftools) "tcmalloc" null) + (mkEnable false "pgrefdebugging" null) + (mkEnable false "cephfs-java" null) + (mkEnable hasXio "xio" null) + (mkWith (libatomic_ops != null) "libatomic-ops" null) + (mkWith true "ocf" null) + (mkWith hasKinetic "kinetic" null) + (mkWith hasRocksdb "librocksdb" null) + (mkWith false "librocksdb-static" null) + (mkWith (libs3 != null) "system-libs3" null) + (mkWith true "rest-bench" null) + ] ++ optional stdenv.isLinux [ + (mkWith (libaio != null) "libaio" null) + (mkWith (libxfs != null) "libxfs" null) + (mkWith (zfs != null) "libzfs" null) + ]; + + installFlags = [ "sysconfdir=\${out}/etc" ]; + + outputs = [ "out" "lib" ]; + + postInstall = '' + # Wrap all of the python scripts + wrapProgram $out/bin/ceph ${wrapArgs} + wrapProgram $out/bin/ceph-brag ${wrapArgs} + wrapProgram $out/bin/ceph-rest-api ${wrapArgs} + wrapProgram $out/sbin/ceph-create-keys ${wrapArgs} + wrapProgram $out/sbin/ceph-disk ${wrapArgs} + + # Bring in lib as a native build input + mkdir -p $out/nix-support + echo "$lib" > $out/nix-support/propagated-native-build-inputs + + # Fix the python library loading + find $lib/lib -name \*.pyc -or -name \*.pyd -exec rm {} \; + for PY in $(find $lib/lib -name \*.py); do + LIBS="$(sed -n "s/.*find_library('\([^)]*\)').*/\1/p" "$PY")" + + # Fix each find_library call + for LIB in $LIBS; do + REALLIB="$lib/lib/lib$LIB.so" + sed -i "s,find_library('$LIB'),'$REALLIB',g" "$PY" + done + + # Reapply compilation optimizations + NAME=$(basename -s .py "$PY") + (cd "$(dirname $PY)"; python -c "import $NAME"; python -O -c "import $NAME") + done + ''; + + enableParallelBuilding = true; + + meta = { + homepage = http://ceph.com/; + description = "Distributed storage system"; + license = licenses.lgpl21; + maintainers = with maintainers; [ ak wkennington ]; + platforms = with platforms; unix; + }; + + passthru.version = version; +} diff --git a/pkgs/tools/filesystems/ceph/git.nix b/pkgs/tools/filesystems/ceph/git.nix new file mode 100644 index 00000000000..8aa4bbd34bb --- /dev/null +++ b/pkgs/tools/filesystems/ceph/git.nix @@ -0,0 +1,11 @@ +{ callPackage, fetchgit, git, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "2015-04-22"; + + src = fetchgit { + url = "git://github.com/ceph/ceph.git"; + rev = "89262abc53e324f3ef4d504473a4f1d6eb337c20"; + sha256 = "0d6hlk1nwgx9cdhvppggz6sbjc1jl8j26l9739qspw1sviac5lcb"; + }; +}) diff --git a/pkgs/tools/filesystems/mp3fs/default.nix b/pkgs/tools/filesystems/mp3fs/default.nix index 253f335ae4a..50242bb6388 100644 --- a/pkgs/tools/filesystems/mp3fs/default.nix +++ b/pkgs/tools/filesystems/mp3fs/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "14ngiqg24p3a0s6hp33zjl4i46d8qn4v9id36psycq3n3csmwyx4"; }; + patches = [ ./fix-statfs-operation.patch ]; + buildInputs = [ flac fuse lame libid3tag pkgconfig ]; enableParallelBuilding = true; @@ -22,7 +24,7 @@ stdenv.mkDerivation rec { which only understands the MP3 format, or transcode files through simple drag-and-drop in a file browser. ''; - homepage = http://khenriks.github.com/mp3fs/; + homepage = http://khenriks.github.io/mp3fs/; license = with licenses; gpl3Plus; platforms = with platforms; linux; maintainers = with maintainers; [ nckx ]; diff --git a/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch b/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch new file mode 100644 index 00000000000..9b3094e6005 --- /dev/null +++ b/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch @@ -0,0 +1,39 @@ +From fea072084ff9d7c4d2c688059a2462bb0e59a2ec Mon Sep 17 00:00:00 2001 +From: K Henriksson <kthenriksson@gmail.com> +Date: Wed, 27 Aug 2014 21:55:18 -0700 +Subject: [PATCH] Fix statfs operation + +The statfs implementation does not properly translate names back to the +original, since the major encoding rewrite. This corrects that, and +should fix issue #27. +--- + src/fuseops.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/fuseops.c b/src/fuseops.c +index e7b4e7e..c333cbd 100644 +--- a/src/fuseops.c ++++ b/src/fuseops.c +@@ -337,9 +337,20 @@ static int mp3fs_statfs(const char *path, struct statvfs *stbuf) { + if (!origpath) { + goto translate_fail; + } +- ++ ++ /* pass-through for regular files */ ++ if (statvfs(origpath, stbuf) == 0) { ++ goto passthrough; ++ } else { ++ /* Not really an error. */ ++ errno = 0; ++ } ++ ++ find_original(origpath); ++ + statvfs(origpath, stbuf); +- ++ ++passthrough: + free(origpath); + translate_fail: + return -errno; diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix index 718e941ec64..f10e05ac486 100644 --- a/pkgs/tools/filesystems/ntfs-3g/default.nix +++ b/pkgs/tools/filesystems/ntfs-3g/default.nix @@ -3,15 +3,15 @@ stdenv.mkDerivation rec { pname = "ntfs-3g"; - version = "2014.2.15"; + version = "2015.3.14"; name = "${pname}-${version}"; - buildInputs = [libuuid] ++ stdenv.lib.optionals crypto [gnutls libgcrypt]; + buildInputs = [ libuuid ] ++ stdenv.lib.optionals crypto [ gnutls libgcrypt ]; nativeBuildInputs = stdenv.lib.optional crypto pkgconfig; src = fetchurl { url = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${version}.tgz"; - sha256 = "0mjv98m2j0kdzkjiqd2ra1akhb8milx8nwcx7hd26jxi1i09jc2c"; + sha256 = "1wiqcmy07y02k3iqq56cscnhg5syisbjj9mxfaid85l3bl0rdycp"; }; patchPhase = '' @@ -22,11 +22,14 @@ stdenv.mkDerivation rec { --replace /bin/umount ${utillinux}/bin/umount ''; - configureFlags = - '' - --disable-ldconfig --exec-prefix=''${prefix} --enable-mount-helper - --enable-posix-acls --enable-xattr-mappings --${if crypto then "enable" else "disable"}-crypto - ''; + configureFlags = [ + "--disable-ldconfig" + "--exec-prefix=\${prefix}" + "--enable-mount-helper" + "--enable-posix-acls" + "--enable-xattr-mappings" + "--${if crypto then "enable" else "disable"}-crypto" + ]; postInstall = '' diff --git a/pkgs/tools/filesystems/reiser4progs/default.nix b/pkgs/tools/filesystems/reiser4progs/default.nix index 235b2b8381b..7dfbbf66c0a 100644 --- a/pkgs/tools/filesystems/reiser4progs/default.nix +++ b/pkgs/tools/filesystems/reiser4progs/default.nix @@ -1,20 +1,26 @@ {stdenv, fetchurl, libaal}: -stdenv.mkDerivation { - name = "reiser4progs-1.0.6"; +let version = "1.0.9"; in +stdenv.mkDerivation rec { + name = "reiser4progs-${version}"; src = fetchurl { - url = http://chichkin_i.zelnet.ru/namesys/reiser4progs-1.0.6.tar.gz; - sha256 = "0x6m6px19hz54r8q4wwpf437qmqh44c5ddw9846isr64zs2rpld0"; + url = "mirror://sourceforge/reiser4/reiser4-utils/${name}.tar.gz"; + sha256 = "0d6djyd7wjvzbqj738b2z4jr5c2s30g8q8xygipyi0007g42gc7z"; }; buildInputs = [libaal]; + preConfigure = '' + substituteInPlace configure --replace " -static" "" + ''; + preInstall = '' substituteInPlace Makefile --replace ./run-ldconfig true ''; meta = { + inherit version; homepage = http://www.namesys.com/; description = "Reiser4 utilities"; }; diff --git a/pkgs/tools/filesystems/reiserfsprogs/default.nix b/pkgs/tools/filesystems/reiserfsprogs/default.nix index 0c5ec063b1a..899f9463951 100644 --- a/pkgs/tools/filesystems/reiserfsprogs/default.nix +++ b/pkgs/tools/filesystems/reiserfsprogs/default.nix @@ -1,22 +1,18 @@ { stdenv, fetchurl, libuuid }: +let version = "3.6.24"; in stdenv.mkDerivation rec { - name = "reiserfsprogs-3.6.21"; + name = "reiserfsprogs-${version}"; src = fetchurl { - url = "http://ftp.be.debian.org/pub/linux/utils/fs/reiserfs/${name}.tar.bz2"; - sha256 = "19mqzhh6jsf2gh8zr5scqi9pyk1fwivrxncd11rqnp2148c58jam"; + url = "https://www.kernel.org/pub/linux/kernel/people/jeffm/reiserfsprogs/v${version}/${name}.tar.xz"; + sha256 = "0q07df9wxxih8714a3mdp61h5n347l7j2a0l351acs3xapzgwi3y"; }; buildInputs = [ libuuid ]; - postInstall = - '' - ln -s reiserfsck $out/sbin/fsck.reiserfs - ln -s mkreiserfs $out/sbin/mkfs.reiserfs - ''; - meta = { + inherit version; homepage = http://www.namesys.com/; description = "ReiserFS utilities"; license = stdenv.lib.licenses.gpl2; diff --git a/pkgs/tools/filesystems/unionfs-fuse/default.nix b/pkgs/tools/filesystems/unionfs-fuse/default.nix index 23340f88376..1d39108afb1 100644 --- a/pkgs/tools/filesystems/unionfs-fuse/default.nix +++ b/pkgs/tools/filesystems/unionfs-fuse/default.nix @@ -1,11 +1,12 @@ { stdenv, fetchurl, cmake, fuse }: stdenv.mkDerivation rec { - name = "unionfs-fuse-0.26"; + name = "unionfs-fuse-${version}"; + version = "1.0"; src = fetchurl { - url = "http://podgorny.cz/unionfs-fuse/releases/${name}.tar.xz"; - sha256 = "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"; + url = "https://github.com/rpodgorny/unionfs-fuse/archive/v${version}.tar.gz"; + sha256 = "02fcrjb06lxkxpk4l8arsqmai807sray24lj2nrasqaacg80ps1f"; }; patches = diff --git a/pkgs/tools/filesystems/zfstools/default.nix b/pkgs/tools/filesystems/zfstools/default.nix index 1c1be59f515..16df5331476 100644 --- a/pkgs/tools/filesystems/zfstools/default.nix +++ b/pkgs/tools/filesystems/zfstools/default.nix @@ -1,14 +1,15 @@ -{ stdenv, fetchgit, ruby, zfs }: +{ stdenv, fetchFromGitHub, ruby, zfs }: stdenv.mkDerivation rec { name = "zfstools-${version}"; - version = "0.3.1"; + version = "0.3.2"; - src = fetchgit { - url = https://github.com/bdrewery/zfstools.git; - rev = "refs/tags/v${version}"; - sha256 = "0bhs0gn1f4z1jm631vp26sbysy4crq489q56rxqfd8ns1xsp1f5j"; + src = fetchFromGitHub { + sha256 = "1dzfir9413qrmx9kqpndi3l2m09f6l1wspnwn84lm3n1g9cr46nd"; + rev = "v${version}"; + repo = "zfstools"; + owner = "bdrewery"; }; buildInputs = [ ruby ]; @@ -27,6 +28,7 @@ stdenv.mkDerivation rec { ''; meta = { + inherit version; homepage = https://github.com/bdrewery/zfstools; description = "OpenSolaris-like and compatible auto snapshotting script for ZFS"; longDescription = '' diff --git a/pkgs/tools/graphics/pdf2svg/default.nix b/pkgs/tools/graphics/pdf2svg/default.nix index 826f1a56055..10309d208d8 100644 --- a/pkgs/tools/graphics/pdf2svg/default.nix +++ b/pkgs/tools/graphics/pdf2svg/default.nix @@ -15,6 +15,6 @@ stdenv.mkDerivation { homepage = http://www.cityinthesky.co.uk/opensource/pdf2svg; license = stdenv.lib.licenses.gpl2; maintainers = [ stdenv.lib.maintainers.ianwookim ]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/tools/misc/bandwidth/default.nix b/pkgs/tools/misc/bandwidth/default.nix new file mode 100644 index 00000000000..35b13448b59 --- /dev/null +++ b/pkgs/tools/misc/bandwidth/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, nasm }: + +let + arch = + if stdenv.system == "x86_64-linux" then "bandwidth64" + else if stdenv.system == "i686-linux" then "bandwidth32" + else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64" + else if stdenv.system == "i686-darwin" then "bandwidth-mac32" + else if stdenv.system == "i686-cygwin" then "bandwidth-win32" + else null; +in +stdenv.mkDerivation rec { + name = "bandwidth-1.1b"; + + src = fetchurl { + url = "http://zsmith.co/archives/${name}.tar.gz"; + sha256 = "01c3ca0x3rh65j1s2g6cg5xr9fvm0lp2wpmv71vhz55xwqqqmiz8"; + }; + + buildInputs = [ nasm ]; + + buildFlags = [ arch ]; + + installPhase = '' + mkdir -p $out/bin + cp ${arch} $out/bin + ln -s ${arch} $out/bin/bandwidth + ''; + + meta = with stdenv.lib; { + homepage = https://zsmith.co/bandwidth.html; + description = "and artificial benchmark for identifying weaknesses in the memory subsystem"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ wkennington ]; + }; +} diff --git a/pkgs/tools/misc/debian-devscripts/default.nix b/pkgs/tools/misc/debian-devscripts/default.nix index 49e158ea2d0..a6e383df91a 100644 --- a/pkgs/tools/misc/debian-devscripts/default.nix +++ b/pkgs/tools/misc/debian-devscripts/default.nix @@ -1,20 +1,22 @@ {stdenv, fetchurl, perl, CryptSSLeay, LWP, unzip, xz, dpkg, TimeDate, DBFile - , FileDesktopEntry, libxslt, docbook_xsl, python, setuptools, makeWrapper +, FileDesktopEntry, libxslt, docbook_xsl, python3, setuptools, makeWrapper +, perlPackages }: stdenv.mkDerivation rec { - version = "2.12.4"; + version = "2.15.3"; name = "debian-devscripts-${version}"; src = fetchurl { - url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.gz"; - sha256 = "34bcbec78bd4fe34d9f1326b9d1477ff2410e20e2dca6b7bfbf2bf92dbb83904"; + url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz"; + sha256 = "f589e2e02c5e9a46a77b2516155631ac3ddfd8a39bcfc16c920862583850bc7d"; }; buildInputs = [ perl CryptSSLeay LWP unzip xz dpkg TimeDate DBFile - FileDesktopEntry libxslt python setuptools makeWrapper ]; + FileDesktopEntry libxslt python3 setuptools makeWrapper + perlPackages.ParseDebControl ]; preConfigure = '' export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${dpkg}"; sed -e "s@/usr/share/sgml/[^ ]*/manpages/docbook.xsl@${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl@" -i scripts/Makefile sed -e 's/ translated_manpages//; s/--install-layout=deb//; s@--root="[^ ]*"@--prefix="'"$out"'"@' -i Makefile */Makefile - tgtpy="$out/lib/${python.libPrefix}/site-packages" + tgtpy="$out/lib/${python3.libPrefix}/site-packages" mkdir -p "$tgtpy" export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$tgtpy" sed -re "s@/usr( |$|/)@$out\\1@" -i Makefile* */Makefile* @@ -25,7 +27,8 @@ stdenv.mkDerivation rec { for i in "$out/bin"/*; do wrapProgram "$i" \ --prefix PERL5LIB : "$PERL5LIB" \ - --prefix PERL5LIB : "$out/share/devscripts" + --prefix PERL5LIB : "$out/share/devscripts" \ + --prefix PYTHONPATH : "$out/lib/python3.4/site-packages" done ''; meta = { diff --git a/pkgs/tools/misc/fluentd/Gemfile b/pkgs/tools/misc/fluentd/Gemfile index 41c5bde1acc..8c9dd3aa0a0 100644 --- a/pkgs/tools/misc/fluentd/Gemfile +++ b/pkgs/tools/misc/fluentd/Gemfile @@ -2,3 +2,4 @@ source "https://rubygems.org" gem 'fluentd' gem 'fluent-plugin-elasticsearch' +gem 'fluent-plugin-record-reformer' diff --git a/pkgs/tools/misc/fluentd/Gemfile.lock b/pkgs/tools/misc/fluentd/Gemfile.lock index ba4cc4bb4a8..4f51d365513 100644 --- a/pkgs/tools/misc/fluentd/Gemfile.lock +++ b/pkgs/tools/misc/fluentd/Gemfile.lock @@ -16,6 +16,8 @@ GEM elasticsearch fluentd (>= 0.10.43) patron (~> 0) + fluent-plugin-record-reformer (0.6.0) + fluentd fluentd (0.12.6) cool.io (>= 1.2.2, < 2.0.0) http_parser.rb (>= 0.5.1, < 0.7.0) @@ -46,4 +48,5 @@ PLATFORMS DEPENDENCIES fluent-plugin-elasticsearch + fluent-plugin-record-reformer fluentd diff --git a/pkgs/tools/misc/fluentd/gemset.nix b/pkgs/tools/misc/fluentd/gemset.nix index 4d0072c6afe..84577c03587 100644 --- a/pkgs/tools/misc/fluentd/gemset.nix +++ b/pkgs/tools/misc/fluentd/gemset.nix @@ -60,6 +60,16 @@ "patron" ]; }; + "fluent-plugin-record-reformer" = { + version = "0.6.0"; + source = { + type = "gem"; + sha256 = "1h43xx7dypbrhdw22c28jsp3054g4imic2wd12rl5nf1k85phfkk"; + }; + dependencies = [ + "fluentd" + ]; + }; "fluentd" = { version = "0.12.6"; source = { diff --git a/pkgs/tools/misc/less/default.nix b/pkgs/tools/misc/less/default.nix index f7790fd3468..7924615201e 100644 --- a/pkgs/tools/misc/less/default.nix +++ b/pkgs/tools/misc/less/default.nix @@ -1,16 +1,18 @@ { stdenv, fetchurl, ncurses }: stdenv.mkDerivation rec { - name = "less-471"; + name = "less-475"; src = fetchurl { url = "http://www.greenwoodsoftware.com/less/${name}.tar.gz"; - sha256 = "1y17zfrn91fs71jry5gp9ibj7darglhr42krimw7hqsjkbx17xip"; + sha256 = "1w7d10h6hzgz5zww8g4aja2fbl7xwx30vd07hcg1fcy7hm8yc1q2"; }; # Look for ‘sysless’ in /etc. configureFlags = "--sysconfdir=/etc"; + preConfigure = "chmod +x ./configure"; + buildInputs = [ ncurses ]; meta = { diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index b8182cff862..aa0be62ed64 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -89,7 +89,7 @@ in stdenv.mkDerivation rec { meta = { homepage = "http://pipelight.net/"; - licenses = with stdenv.lib.licenses; [ mpl11 gpl2 lgpl21 ]; + license = with stdenv.lib.licenses; [ mpl11 gpl2 lgpl21 ]; description = "A wrapper for using Windows plugins in Linux browsers"; maintainers = with stdenv.lib.maintainers; [skeidel]; platforms = with stdenv.lib.platforms; linux; diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix index d85da36f7ee..a30f0277ec0 100644 --- a/pkgs/tools/misc/svtplay-dl/default.nix +++ b/pkgs/tools/misc/svtplay-dl/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "svtplay-dl-${version}"; - version = "0.10.2015.01.28"; + version = "0.10.2015.03.25"; src = fetchurl { url = "https://github.com/spaam/svtplay-dl/archive/${version}.tar.gz"; - sha256 = "0hjqhb4s0qpw2l7azcqmckbdc4mcvczp0w1dfk125n01z0w9c20c"; + sha256 = "0j0fg3qrldpaf880v488rr2snw6ghpdln4l9mbvmi70rjzzxv4ap"; }; pythonPaths = [ pycrypto ]; diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index e602ee5f412..569d84bd72e 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -2,7 +2,7 @@ let version = "16"; # see ${src}/util/version/Version.h - date = "20150308"; + date = "20150422"; in stdenv.mkDerivation { name = "cjdns-${version}-${date}"; @@ -10,8 +10,8 @@ stdenv.mkDerivation { src = fetchFromGitHub { owner = "cjdelisle"; repo = "cjdns"; - rev = "dc7eaf676cb83f13ba3e76a1bd0f2e093e6d6e1b"; - sha256 = "1llhv9kflh4rzv9b9qq9zhrckcc6a7xs0dp147adwmaxqjj8v601"; + rev = "78e13484b6639adacefc62eb7cf93ef7db4a936f"; + sha256 = "1l1c43r11mj4c8is24988yfycw74flgv7qvc2cfhlisz7fhgfkds"; }; buildInputs = [ which python27 nodejs ] ++ diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 4fd30cc1fa1..713fe40c189 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -16,11 +16,11 @@ assert scpSupport -> libssh2 != null; assert c-aresSupport -> c-ares != null; stdenv.mkDerivation rec { - name = "curl-7.41.0"; + name = "curl-7.42.0"; src = fetchurl { url = "http://curl.haxx.se/download/${name}.tar.bz2"; - sha256 = "1slbbxp2k8m34mdzrl5qhafr5zhhcv7fgjhs2mcxjmswvimm92wz"; + sha256 = "13yhcqfksy2vwc4sjv97nv3cbd2pb2a8lnvv8g46qp1gail7sm9j"; }; # Zlib and OpenSSL must be propagated because `libcurl.la' contains diff --git a/pkgs/tools/networking/dropbear/default.nix b/pkgs/tools/networking/dropbear/default.nix index 15422d81f41..0cbf41754c3 100644 --- a/pkgs/tools/networking/dropbear/default.nix +++ b/pkgs/tools/networking/dropbear/default.nix @@ -2,11 +2,11 @@ sftpPath ? "/var/run/current-system/sw/libexec/sftp-server" }: stdenv.mkDerivation rec { - name = "dropbear-2014.66"; + name = "dropbear-2015.67"; src = fetchurl { url = "http://matt.ucc.asn.au/dropbear/releases/${name}.tar.bz2"; - sha256 = "0xmbcjm2pbhih459667wy8acs4nax4amvzwqwfxw0z2i19ky4gxb"; + sha256 = "1rf8k3v0bklp04a6x85zpa4f45ad5rfqmiv5f1wfbzaxcja0asby"; }; dontDisableStatic = enableStatic; @@ -31,10 +31,6 @@ stdenv.mkDerivation rec { # Allow sessions to inherit the PATH from the parent dropbear. # Otherwise they only get the usual /bin:/usr/bin kind of PATH ./pass-path.patch - - # Bugfix - # http://article.gmane.org/gmane.network.ssh.dropbear/1361 - ./proxycrash.patch ]; buildInputs = [ zlib ]; diff --git a/pkgs/tools/networking/dropbear/proxycrash.patch b/pkgs/tools/networking/dropbear/proxycrash.patch deleted file mode 100644 index 1a17e7e3c62..00000000000 --- a/pkgs/tools/networking/dropbear/proxycrash.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -r 5ba19d00da08 cli-runopts.c ---- a/cli-runopts.c Sun May 26 18:43:00 2013 +0800 -+++ b/cli-runopts.c Mon Jun 17 19:51:08 2013 +0000 -@@ -383,6 +383,13 @@ - exit(EXIT_FAILURE); - } - -+#ifdef ENABLE_CLI_PROXYCMD -+ if (cli_opts.proxycmd) { -+ /* To match the common path of m_freeing it */ -+ cli_opts.proxycmd = m_strdup(cli_opts.proxycmd); -+ } -+#endif -+ - if (cli_opts.remoteport == NULL) { - cli_opts.remoteport = "22"; - } diff --git a/pkgs/tools/networking/hans/default.nix b/pkgs/tools/networking/hans/default.nix new file mode 100644 index 00000000000..fcb3e903753 --- /dev/null +++ b/pkgs/tools/networking/hans/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, nettools }: + +let version = "0.4.4"; in +stdenv.mkDerivation rec { + name = "hans-${version}"; + + src = fetchFromGitHub { + sha256 = "1xskffmmdmg1whlrl5wpkv9z29vh0igrbmsz0b45s9v0761a7kis"; + rev = "v${version}"; + repo = "hans"; + owner = "friedrich"; + }; + + meta = with stdenv.lib; { + inherit version; + description = "Tunnel IPv4 over ICMP"; + longDescription = '' + Hans makes it possible to tunnel IPv4 through ICMP echo packets, so you + could call it a ping tunnel. This can be useful when you find yourself in + the situation that your Internet access is firewalled, but pings are + allowed. + ''; + homepage = http://code.gerade.org/hans/; + license = with licenses; gpl3Plus; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; + }; + + buildInputs = [ nettools ]; + + postPatch = '' + substituteInPlace src/tun.cpp --replace "/sbin/" "/${nettools}/bin/" + ''; + + enableParallelBuilding = true; + + installPhase = '' + install -D -m0755 hans $out/bin/hans + ''; +} diff --git a/pkgs/tools/networking/hping/default.nix b/pkgs/tools/networking/hping/default.nix index aa2574fbc1d..23322d5b8f2 100644 --- a/pkgs/tools/networking/hping/default.nix +++ b/pkgs/tools/networking/hping/default.nix @@ -44,5 +44,6 @@ stdenv.mkDerivation rec { description = "A command-line oriented TCP/IP packet assembler/analyzer"; homepage = "http://www.hping.org/"; license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix index 088e8e8de7f..9a20e009e58 100644 --- a/pkgs/tools/networking/i2p/default.nix +++ b/pkgs/tools/networking/i2p/default.nix @@ -1,7 +1,4 @@ -{ stdenv, procps, coreutils, fetchurl, openjdk8, ant, gcj, gettext }: - -# TODO: support other systems, just copy appropriate lib/wrapper.. to $out -assert stdenv.system != "x86_64-linux"; +{ stdenv, procps, coreutils, fetchurl, openjdk8, openjre, ant, gcj, gettext }: stdenv.mkDerivation rec { name = "i2p-0.9.18"; @@ -9,7 +6,7 @@ stdenv.mkDerivation rec { url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz"; sha256 = "1hahdzvfh1zqb8qdc59xbjpqm8qq95k2xx22mpnhcdh90lb6xqnl"; }; - buildInputs = [ openjdk8 ant gcj gettext ]; + buildInputs = [ openjdk8 ant gettext ]; buildPhase = '' export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" ant preppkg-linux-only @@ -24,7 +21,8 @@ stdenv.mkDerivation rec { -e "s#/usr/ucb/ps#${procps}/bin/ps#" \ -e "s#/usr/bin/tr#${coreutils}/bin/tr#" \ -e 's#%USER_HOME#$HOME#' \ - -e "s#%SYSTEM_java_io_tmpdir#/tmp#" + -e "s#%SYSTEM_java_io_tmpdir#/tmp#" \ + -e 's#JAVA=java#JAVA=${openjre}/bin/java#' mv $out/runplain.sh $out/bin/i2prouter-plain mv $out/man $out/share/ chmod +x $out/bin/* $out/i2psvc @@ -35,7 +33,8 @@ stdenv.mkDerivation rec { homepage = "https://geti2p.net"; description = "Applications and router for I2P, anonymity over the Internet"; maintainers = [ stdenv.lib.maintainers.joelmo ]; - licenses = licenses.gpl2; - platforms = platforms.linux; + license = licenses.gpl2; + # TODO: support other systems, just copy appropriate lib/wrapper.. to $out + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/tools/networking/i2pd/default.nix b/pkgs/tools/networking/i2pd/default.nix index 984e91e255f..f1b32ddb7e7 100644 --- a/pkgs/tools/networking/i2pd/default.nix +++ b/pkgs/tools/networking/i2pd/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = "https://track.privacysolutions.no/projects/i2pd"; description = "Minimal I2P router written in C++"; - licenses = licenses.gpl2; + license = licenses.gpl2; maintainers = with maintainers; [ edwtjo ]; platforms = platforms.linux; }; diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index 9901a1e2a96..1e1f1bd8b76 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, gnutls, pkgconfig, readline, zlib }: stdenv.mkDerivation rec { - name = "lftp-4.6.0"; + name = "lftp-4.6.1"; src = fetchurl { urls = [ "http://lftp.yar.ru/ftp/${name}.tar.bz2" "http://lftp.yar.ru/ftp/old/${name}.tar.bz2" ]; - sha256 = "1liry2icaqyn9zlp7w6sykp3nyqsn172xnqglhvr6awz23r3b1fr"; + sha256 = "0w9nb24abqlnjzi30q8s0yv3h0zjxhynliyxwdgnrv0qag0k401s"; }; patches = [ ./no-gets.patch ]; diff --git a/pkgs/tools/networking/mu/default.nix b/pkgs/tools/networking/mu/default.nix index 924eb2f9f42..2104768e3b9 100644 --- a/pkgs/tools/networking/mu/default.nix +++ b/pkgs/tools/networking/mu/default.nix @@ -3,12 +3,12 @@ , gtk3, webkit, libsoup, icu, withMug ? false /* doesn't build with current gtk3 */ }: stdenv.mkDerivation rec { - version = "0.9.11"; + version = "0.9.12"; name = "mu-${version}"; src = fetchurl { url = "https://github.com/djcb/mu/archive/v${version}.tar.gz"; - sha256 = "01n1lzq4pfsm5pn932p948d1z55yqc7kkm1ifjxjchb3k8lr66fh"; + sha256 = "1bxryacmas2llj68m2dv8dr1vwx8f5k2i2azh69jajkpqx7i4wdq"; }; buildInputs = diff --git a/pkgs/tools/networking/netsniff-ng/default.nix b/pkgs/tools/networking/netsniff-ng/default.nix index 196c176018a..0830871c0cd 100644 --- a/pkgs/tools/networking/netsniff-ng/default.nix +++ b/pkgs/tools/networking/netsniff-ng/default.nix @@ -2,15 +2,16 @@ , libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl , pkgconfig, zlib }: -stdenv.mkDerivation rec { - version = "v0.5.9-rc4-53-gdd5d906"; +let version = "v0.5.9-rc5"; in +stdenv.mkDerivation { name = "netsniff-ng-${version}"; - src = fetchFromGitHub rec { # Upstream recommends and supports git + # Upstream recommends and supports git + src = fetchFromGitHub rec { repo = "netsniff-ng"; owner = repo; - rev = "dd5d906c40db5264d8d33c37565b39540f0258c8"; - sha256 = "0iwnfjbxiv10zk5mfpnvs2xb88f14hv1a156kn9mhasszknp0a57"; + rev = "76f4acca4bef1658543a97475f1c1d83accc395c"; + sha256 = "11k88lsdqy41j4xwyx3vq85zjj4n39hj828f1b6naq1ywyfcvmr5"; }; buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl @@ -40,6 +41,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { + inherit version; description = "Swiss army knife for daily Linux network plumbing"; longDescription = '' netsniff-ng is a free Linux networking toolkit. Its gain of performance diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix index 93dad85ce1e..9bd1e7f4853 100644 --- a/pkgs/tools/networking/ntp/default.nix +++ b/pkgs/tools/networking/ntp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoreconfHook, libcap ? null }: +{ stdenv, fetchurl, autoreconfHook, libcap ? null, openssl ? null }: assert stdenv.isLinux -> libcap != null; @@ -10,11 +10,18 @@ stdenv.mkDerivation rec { sha256 = "0ccv9kh5asxpk7bjn73vwrqimbkbfl743bgx0km47bfajl7bqs8d"; }; - configureFlags = stdenv.lib.optional (libcap != null) "--enable-linuxcaps"; + configureFlags = [ + "--sysconfdir=/etc" + "--localstatedir=/var" + "--enable-ignore-dns-errors" + ] ++ stdenv.lib.optional (libcap != null) "--enable-linuxcaps"; - buildInputs = [ autoreconfHook libcap ]; + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ libcap openssl ]; - postInstall = "rm -rf $out/share/doc"; + postInstall = '' + rm -rf $out/share/doc + ''; meta = { homepage = http://www.ntp.org/; diff --git a/pkgs/tools/networking/sproxy-web/default.nix b/pkgs/tools/networking/sproxy-web/default.nix deleted file mode 100644 index 67daab08359..00000000000 --- a/pkgs/tools/networking/sproxy-web/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ cabal, aeson, blazeHtml, blazeMarkup, configurator, hflags -, httpTypes, mtl, postgresqlSimple, resourcePool, scotty, text -, waiExtra, waiMiddlewareStatic, fetchurl -}: - -cabal.mkDerivation (self: { - pname = "sproxy-web"; - version = "0.1.0.2"; - src = fetchurl { - url = "https://github.com/zalora/sproxy-web/archive/0.1.0.2.tar.gz"; - sha256 = "1rdzglvsas0rdgq3j5c9ll411yk168x7v3l7w8zdjgafa947j4d4"; - }; - isLibrary = false; - isExecutable = true; - buildDepends = [ - aeson blazeHtml blazeMarkup configurator hflags httpTypes mtl - postgresqlSimple resourcePool scotty text waiExtra - waiMiddlewareStatic - ]; - meta = { - homepage = "http://bitbucket.org/zalorasea/sproxy-web"; - description = "Web interface to sproxy"; - license = self.stdenv.lib.licenses.bsd3; - platforms = self.ghc.meta.platforms; - broken = true; - }; -}) diff --git a/pkgs/tools/networking/sproxy/default.nix b/pkgs/tools/networking/sproxy/default.nix deleted file mode 100644 index 5ecd7d06e26..00000000000 --- a/pkgs/tools/networking/sproxy/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ cabal, aeson, attoparsec, caseInsensitive, certificate -, concurrentExtra, conduit, connection, cryptoRandom, curl -, dataDefault, hslogger, hspec, httpConduit, httpKit, httpTypes -, interpolatedstringPerl6, mtl, network, optparseApplicative -, postgresqlSimple, safe, SHA, split, stringConversions, time, tls -, unorderedContainers, utf8String, wai, warp, x509, yaml, fetchurl -}: - -cabal.mkDerivation (self: { - pname = "sproxy"; - version = "0.8.0"; - src = fetchurl { - url = "https://github.com/zalora/sproxy/archive/0.8.0.tar.gz"; - sha256 = "11xn4k509ck73pacyz2kh0924n2vy8rwakwd42dwbvhhysf47rdx"; - }; - isLibrary = false; - isExecutable = true; - patches = [ ./new-http-kit.patch ]; - doCheck = false; - buildDepends = [ - aeson attoparsec caseInsensitive certificate concurrentExtra - cryptoRandom curl dataDefault hslogger httpKit httpTypes - interpolatedstringPerl6 mtl network optparseApplicative - postgresqlSimple safe SHA split stringConversions time tls - unorderedContainers utf8String x509 yaml - ]; - testDepends = [ - aeson attoparsec caseInsensitive certificate concurrentExtra - conduit connection cryptoRandom curl dataDefault hslogger hspec - httpConduit httpKit httpTypes interpolatedstringPerl6 mtl network - optparseApplicative postgresqlSimple safe SHA split - stringConversions time tls unorderedContainers utf8String wai warp - x509 yaml - ]; - meta = { - license = self.stdenv.lib.licenses.mit; - platforms = self.ghc.meta.platforms; - broken = true; - }; -}) diff --git a/pkgs/tools/networking/sproxy/new-http-kit.patch b/pkgs/tools/networking/sproxy/new-http-kit.patch deleted file mode 100644 index c15c3f3989a..00000000000 --- a/pkgs/tools/networking/sproxy/new-http-kit.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 383d2cbe240600a86ab99fdefcea4e913d171ec6 Mon Sep 17 00:00:00 2001 -From: Simon Hengel <sol@typeful.net> -Date: Thu, 24 Apr 2014 22:51:02 +0800 -Subject: [PATCH] Depend on http-kit >= 0.2 - ---- - sproxy.cabal | 2 +- - src/Authenticate.hs | 17 ++++++++--------- - src/HTTP.hs | 47 +++++++++-------------------------------------- - src/Proxy.hs | 32 ++++++++++++++------------------ - 4 files changed, 32 insertions(+), 66 deletions(-) - -diff --git a/sproxy.cabal b/sproxy.cabal -index 08e1d61..91adf5d 100644 ---- a/sproxy.cabal -+++ b/sproxy.cabal -@@ -49,7 +49,7 @@ executable sproxy - unix, - utf8-string, - x509, -- http-kit, -+ http-kit >= 0.2, - yaml >= 0.8 - default-language: Haskell2010 - ghc-options: -Wall -threaded -O2 -diff --git a/src/Authenticate.hs b/src/Authenticate.hs -index 7d4c218..15a69a9 100644 ---- a/src/Authenticate.hs -+++ b/src/Authenticate.hs -@@ -30,8 +30,7 @@ import System.Posix.Types (EpochTime) - import System.Posix.Time (epochTime) - import Data.Digest.Pure.SHA (hmacSha1, showDigest) - --import Network.HTTP.Toolkit.Header --import Network.HTTP.Toolkit.Request -+import Network.HTTP.Toolkit - - import Type - import Cookies -@@ -90,19 +89,19 @@ instance FromJSON UserInfo where - - -- https://wiki.zalora.com/Main_Page -> https://wiki.zalora.com/ - -- Note that this always uses https: --rootURI :: RequestHeader -> URI.URI --rootURI (MessageHeader _ headers) = -+rootURI :: Request a -> URI.URI -+rootURI (Request _ _ headers _) = - let host = cs $ fromMaybe (error "Host header not found") $ lookup "Host" headers - in URI.URI "https:" (Just $ URI.URIAuth "" host "") "/" "" "" - --redirectForAuth :: AuthConfig -> RequestHeader -> SendData -> IO () --redirectForAuth c request@(MessageHeader (_, path_) _) send = do -+redirectForAuth :: AuthConfig -> Request a -> SendData -> IO () -+redirectForAuth c request@(Request _ path_ _ _) send = do - let redirectUri = rootURI request - path = urlEncode True path_ - authURL = "https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=" ++ cs path ++ "&redirect_uri=" ++ (cs $ show $ redirectUri) ++ "&response_type=code&client_id=" ++ authConfigClientID c ++ "&approval_prompt=force&access_type=offline" -- sendResponse send found302 [("Location", UTF8.fromString $ authURL)] "" -+ sendResponse_ send found302 [("Location", UTF8.fromString $ authURL)] "" - --authenticate :: AuthConfig -> SendData -> RequestHeader -> ByteString -> ByteString -> IO () -+authenticate :: AuthConfig -> SendData -> Request a -> ByteString -> ByteString -> IO () - authenticate config send request path code = do - tokenRes <- post "https://accounts.google.com/o/oauth2/token" ["code=" ++ UTF8.toString code, "client_id=" ++ clientID, "client_secret=" ++ clientSecret, "redirect_uri=" ++ (cs $ show $ rootURI request), "grant_type=authorization_code"] - case tokenRes of -@@ -121,7 +120,7 @@ authenticate config send request path code = do - Just userInfo -> do - clientToken <- authToken authTokenKey (userEmail userInfo) (userGivenName userInfo, userFamilyName userInfo) - let cookie = setCookie cookieDomain cookieName (show clientToken) authShelfLife -- sendResponse send found302 [("Location", cs $ (show $ (rootURI request) {URI.uriPath = ""}) ++ cs (urlDecode False path)), ("Set-Cookie", UTF8.fromString cookie)] "" -+ sendResponse_ send found302 [("Location", cs $ (show $ (rootURI request) {URI.uriPath = ""}) ++ cs (urlDecode False path)), ("Set-Cookie", UTF8.fromString cookie)] "" - where - cookieDomain = authConfigCookieDomain config - cookieName = authConfigCookieName config -diff --git a/src/HTTP.hs b/src/HTTP.hs -index 07038a0..dbcae71 100644 ---- a/src/HTTP.hs -+++ b/src/HTTP.hs -@@ -1,19 +1,14 @@ - {-# LANGUAGE OverloadedStrings #-} - module HTTP ( -- sendRequest --, sendResponse --, sendResponse_ -+ sendResponse_ - , internalServerError - ) where - --import Data.Foldable (forM_) - import Data.ByteString (ByteString) --import qualified Data.ByteString as B --import qualified Data.ByteString.Char8 as B8 --import qualified Data.ByteString.UTF8 as UTF8 --import qualified Data.CaseInsensitive as CI -+import qualified Data.ByteString.Char8 as B - import Network.HTTP.Types --import Network.HTTP.Toolkit.Body -+import Network.HTTP.Toolkit -+import qualified Network.HTTP.Toolkit.Body as Body - - import Type - import qualified Log -@@ -21,34 +16,10 @@ import qualified Log - internalServerError :: SendData -> String -> IO () - internalServerError send err = do - Log.debug $ show err -- sendResponse send internalServerError500 [] "Internal Server Error" -+ sendResponse_ send internalServerError500 [] "Internal Server Error" - --sendRequest :: SendData -> Method -> ByteString -> [Header] -> BodyReader -> IO () --sendRequest send method path headers body = do -- sendHeader send startLine headers -- sendBody send body -+sendResponse_ :: SendData -> Status -> [Header] -> ByteString -> IO () -+sendResponse_ send status headers_ body = do -+ Body.fromByteString body >>= sendResponse send . Response status headers - where -- startLine = B8.unwords [method, path, "HTTP/1.1"] -- --sendResponse :: SendData -> Status -> [Header] -> ByteString -> IO () --sendResponse send status headers_ body = do -- sendHeader send (statusLine status) headers -- send body -- where -- headers = ("Content-Length", UTF8.fromString $ show $ B.length body) : headers_ -- --sendResponse_ :: SendData -> Status -> [Header] -> BodyReader -> IO () --sendResponse_ send status headers body = do -- sendHeader send (statusLine status) headers -- sendBody send body -- --statusLine :: Status -> ByteString --statusLine status = B.concat ["HTTP/1.1 ", UTF8.fromString $ show (statusCode status), " ", statusMessage status] -- --sendHeader :: SendData -> ByteString -> [Header] -> IO () --sendHeader send startLine headers = do -- send startLine -- send "\r\n" -- forM_ headers $ \(k, v) -> do -- send $ B.concat [CI.original k, ": ", v, "\r\n"] -- send "\r\n" -+ headers = ("Content-Length", B.pack . show . B.length $ body) : headers_ -diff --git a/src/Proxy.hs b/src/Proxy.hs -index aa320af..88b95d9 100644 ---- a/src/Proxy.hs -+++ b/src/Proxy.hs -@@ -32,11 +32,7 @@ import qualified Network.URI as URI - import Options.Applicative hiding (action) - import System.IO - --import Network.HTTP.Toolkit.Body --import Network.HTTP.Toolkit.Header --import Network.HTTP.Toolkit.Connection --import Network.HTTP.Toolkit.Request --import Network.HTTP.Toolkit.Response -+import Network.HTTP.Toolkit - - import Type - import Util -@@ -142,10 +138,10 @@ runProxy port config authConfig authorize = (listen port (serve config authConfi - redirectToHttps :: SockAddr -> Socket -> IO () - redirectToHttps _ sock = do - conn <- makeConnection (Socket.recv sock 4096) -- (request, _) <- readRequest conn -- sendResponse (Socket.sendAll sock) seeOther303 [("Location", cs $ show $ requestURI request)] "" -+ request <- readRequest conn -+ sendResponse_ (Socket.sendAll sock) seeOther303 [("Location", cs $ show $ requestURI request)] "" - where -- requestURI (MessageHeader (_, path) headers) = -+ requestURI (Request _ path headers _) = - let host = fromMaybe (error "Host header not found") $ lookup "Host" headers - in fromJust $ URI.parseURI $ "https://" ++ cs host ++ cs path - -@@ -171,8 +167,8 @@ serve config authConfig withAuthorizeAction addr sock = do - serve_ send conn authorize = go - where - go :: IO () -- go = forever $ readRequest conn >>= \(request, body) -> case request of -- MessageHeader (_, url) headers -> do -+ go = forever $ readRequest conn >>= \request -> case request of -+ Request _ url headers _ -> do - -- TODO: Don't loop for more input on Connection: close header. - -- Check if this is an authorization response. - case URI.parseURIReference $ BU.toString url of -@@ -192,17 +188,17 @@ serve config authConfig withAuthorizeAction addr sock = do - case auth of - Nothing -> redirectForAuth authConfig request send - Just token -> do -- forwardRequest config send authorize cookies addr request body token -+ forwardRequest config send authorize cookies addr request token - - -- Check our access control list for this user's request and forward it to the backend if allowed. --forwardRequest :: Config -> SendData -> AuthorizeAction -> [(Name, Cookies.Value)] -> SockAddr -> RequestHeader -> BodyReader -> AuthToken -> IO () --forwardRequest config send authorize cookies addr (MessageHeader (method, path) headers) body token = do -+forwardRequest :: Config -> SendData -> AuthorizeAction -> [(Name, Cookies.Value)] -> SockAddr -> Request BodyReader -> AuthToken -> IO () -+forwardRequest config send authorize cookies addr request@(Request method path headers _) token = do - groups <- authorize (authEmail token) (maybe (error "No Host") cs $ lookup "Host" headers) path method - ip <- formatSockAddr addr - case groups of - [] -> do - -- TODO: Send back a page that allows the user to request authorization. -- sendResponse send forbidden403 [] "Access Denied" -+ sendResponse_ send forbidden403 [] "Access Denied" - _ -> do - -- TODO: Reuse connections to the backend server. - let downStreamHeaders = -@@ -216,10 +212,10 @@ forwardRequest config send authorize cookies addr (MessageHeader (method, path) - setCookies $ - fromList headers - bracket (connectTo host port) hClose $ \h -> do -- sendRequest (B.hPutStr h) method path downStreamHeaders body -- conn <- makeConnection (B.hGetSome h 4096) -- (MessageHeader status responseHeaders, responseBody) <- readResponse method conn -- sendResponse_ send status (removeConnectionHeader responseHeaders) responseBody -+ sendRequest (B.hPutStr h) request{requestHeaders = downStreamHeaders} -+ conn <- connectionFromHandle h -+ response <- readResponse method conn -+ sendResponse send response{responseHeaders = removeConnectionHeader (responseHeaders response)} - where - host = configBackendAddress config - port = PortNumber (configBackendPort config) --- -1.9.1 - diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix index 74788e6ff2a..ef9c56deacb 100644 --- a/pkgs/tools/networking/stunnel/default.nix +++ b/pkgs/tools/networking/stunnel/default.nix @@ -2,15 +2,24 @@ stdenv.mkDerivation rec { name = "stunnel-${version}"; - version = "5.14"; + version = "5.16"; src = fetchurl { url = "http://www.stunnel.org/downloads/${name}.tar.gz"; - sha256 = "0nk9cjrgpa54sphykizqx4kayrq71z1zmwdsr1lvlbmq3pyb95r1"; + sha256 = "13b0ad7smz4949hchdgsx3yjr5i3z8flwiy8w6xalvk2n8zykdxn"; }; buildInputs = [ openssl ]; - configureFlags = [ "--with-ssl=${openssl}" ]; + configureFlags = [ + "--with-ssl=${openssl}" + "--sysconfdir=/etc" + "--localstatedir=/var" + ]; + + installFlags = [ + "sysconfdir=\${out}/etc" + "localstatedir=\${TMPDIR}" + ]; meta = { description = "universal tls/ssl wrapper"; diff --git a/pkgs/tools/package-management/dpkg/cache-arch.patch b/pkgs/tools/package-management/dpkg/cache-arch.patch deleted file mode 100644 index 9677c8fdee3..00000000000 --- a/pkgs/tools/package-management/dpkg/cache-arch.patch +++ /dev/null @@ -1,15 +0,0 @@ -Don't invoke "dpkg --print-architecture" for every call to -Dpkg::Arch::get_raw_build_arch(). - -diff -ru -x '*~' dpkg-1.16.9/scripts/Dpkg/Arch.pm dpkg-1.16.9-new/scripts/Dpkg/Arch.pm ---- dpkg-1.16.9/scripts/Dpkg/Arch.pm 2012-10-20 06:34:17.000000000 +0200 -+++ dpkg-1.16.9-new/scripts/Dpkg/Arch.pm 2012-12-04 19:42:20.451002537 +0100 -@@ -59,7 +59,7 @@ - # dpkg-architecture itself, by avoiding computing the DEB_BUILD_ - # variables when they are not requested. - -- my $build_arch = `dpkg --print-architecture`; -+ $build_arch = `dpkg --print-architecture`; - syserr("dpkg --print-architecture failed") if $? >> 8; - - chomp $build_arch; diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix index 8ef32dab95a..624386f34f2 100644 --- a/pkgs/tools/package-management/dpkg/default.nix +++ b/pkgs/tools/package-management/dpkg/default.nix @@ -1,16 +1,21 @@ { stdenv, fetchurl, perl, zlib, bzip2, xz, makeWrapper }: -let version = "1.16.9"; in +let version = "1.17.25"; in stdenv.mkDerivation { name = "dpkg-${version}"; src = fetchurl { url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.xz"; - sha256 = "0ykby9x4x2zb7rfj30lfjcsrq2q32z2lnsrl8pbdvb2l9sx7zkbk"; + sha256 = "1akblsdfblih7879gi5qagqpgy6zz866kcyvg5y11ywqmqw9s087"; }; - patches = [ ./cache-arch.patch ]; + postPatch = '' + # dpkg tries to force some dependents like debian_devscripts to use + # -fstack-protector-strong - not (yet?) a good idea. Disable for now: + substituteInPlace scripts/Dpkg/Vendor/Debian.pm \ + --replace "stackprotectorstrong => 1" "stackprotectorstrong => 0" + ''; configureFlags = "--disable-dselect --with-admindir=/var/lib/dpkg PERL_LIBDIR=$(out)/${perl.libPrefix}"; @@ -36,13 +41,17 @@ stdenv.mkDerivation { if head -n 1 $i | grep -q perl; then wrapProgram $i --prefix PERL5LIB : $out/${perl.libPrefix} fi - done # */ + done + + mkdir -p $out/etc/dpkg + cp -r scripts/t/origins $out/etc/dpkg ''; meta = with stdenv.lib; { description = "The Debian package manager"; homepage = http://wiki.debian.org/Teams/Dpkg; + license = with licenses; gpl2Plus; platforms = platforms.linux; - maintainers = [ maintainers.mornfall ]; + maintainers = with maintainers; [ mornfall nckx ]; }; } diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 36d3d77c9f9..479915a9cee 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -5,11 +5,11 @@ }: stdenv.mkDerivation rec { - name = "nix-1.9pre4088_1711679"; + name = "nix-1.9pre4100_4bbcfaf"; src = fetchurl { - url = "http://hydra.nixos.org/build/21171422/download/4/${name}.tar.xz"; - sha256 = "37240acbb9ea9a3a0f141a85296787e1d4b7c2ab987c218be2f8007b28167b03"; + url = "http://hydra.nixos.org/build/21565942/download/4/${name}.tar.xz"; + sha256 = "1jcy0n8mi17k5vk89vammfh74lvsgnm4gjsk23cq1shspjnbbgxs"; }; nativeBuildInputs = [ perl pkgconfig ]; diff --git a/pkgs/tools/security/afl/README.md b/pkgs/tools/security/afl/README.md index 7d954461773..0b0d4e80fbc 100644 --- a/pkgs/tools/security/afl/README.md +++ b/pkgs/tools/security/afl/README.md @@ -11,9 +11,9 @@ right QEMU version and options in `qemu.nix`: https://github.com/mirrorer/afl/blob/master/qemu_mode/build_qemu_support.sh -`afl-config.h` and `afl-qemu-cpu-inl.h` are part of the afl source -code, and copied from `config.h` and `afl-qemu-cpu-inl.h` -appropriately. The QEMU patches need to be slightly adjusted to -`#include` these files (the patches try to otherwise include files -like `../../config.h` which causes the build to fail). See `qemu.nix` -for details. +`afl-config.h`, `afl-types.h`, and `afl-qemu-cpu-inl.h` are part of +the afl source code, and copied from `config.h`, `types.h` and +`afl-qemu-cpu-inl.h` appropriately. These files and the QEMU patches +need to be slightly adjusted to fix their `#include`s (the patches +try to otherwise include files like `../../config.h` which causes the +build to fail). diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index 93c5988b55d..ea495145d1a 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, bash, callPackage, makeWrapper }: +{ stdenv, fetchurl, bash, callPackage, makeWrapper +, clang, llvm, which, libcgroup }: let afl-qemu = callPackage ./qemu.nix {}; @@ -8,16 +9,21 @@ let in stdenv.mkDerivation rec { name = "afl-${version}"; - version = "1.58b"; + version = "1.67b"; src = fetchurl { url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz"; - sha256 = "1szggm4x9i9bsrcb99s5vbgncagp7jvhz8cg9amkx7p6mp2x4pld"; + sha256 = "11763zgwqg2b5hak006rp0jb3w252js067z9ibgl4nj3br2ncmd2"; }; - buildInputs = [ makeWrapper ]; + # Note: libcgroup isn't needed for building, just for the afl-cgroup + # script. + buildInputs = [ makeWrapper clang llvm which ]; - buildPhase = "make PREFIX=$out"; + buildPhase = '' + make PREFIX=$out + cd llvm_mode && make && cd .. + ''; installPhase = '' # Do the normal installation make install PREFIX=$out @@ -25,13 +31,34 @@ stdenv.mkDerivation rec { # Install the custom QEMU emulator for binary blob fuzzing. cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace + # Install the cgroups wrapper for asan-based fuzzing. + cp experimental/asan_cgroups/limit_memory.sh $out/bin/afl-cgroup + chmod +x $out/bin/afl-cgroup + substituteInPlace $out/bin/afl-cgroup \ + --replace "cgcreate" "${libcgroup}/bin/cgcreate" \ + --replace "cgexec" "${libcgroup}/bin/cgexec" \ + --replace "cgdelete" "${libcgroup}/bin/cgdelete" + + # Patch shebangs before wrapping + patchShebangs $out/bin + # Wrap every program with a custom $AFL_PATH; I believe there is a # bug in afl which causes it to fail to find `afl-qemu-trace` # relative to `afl-fuzz` or `afl-showmap`, so we instead set # $AFL_PATH as a workaround, which allows it to be found. - for x in `ls $out/bin/afl-*`; do + for x in `ls $out/bin/afl-* | grep -v afl-clang-fast`; do wrapProgram $x --prefix AFL_PATH : "$out/bin" done + # Wrap afl-clang-fast(++) with a *different* AFL_PATH, because it + # has totally different semantics in that case(?) - and also set a + # proper AFL_CC and AFL_CXX so we don't pick up the wrong one out + # of $PATH. + for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do + wrapProgram $x \ + --prefix AFL_PATH : "$out/lib/afl" \ + --prefix AFL_CC : "${clang}/bin/clang" \ + --prefix AFL_CXX : "${clang}/bin/clang++" + done ''; meta = { diff --git a/pkgs/tools/security/afl/qemu-patches/afl-config.h b/pkgs/tools/security/afl/qemu-patches/afl-config.h index 051b38ffbca..0017f9d83f4 100644 --- a/pkgs/tools/security/afl/qemu-patches/afl-config.h +++ b/pkgs/tools/security/afl/qemu-patches/afl-config.h @@ -138,6 +138,11 @@ #define TMIN_MAX_FILE (10 * 1024 * 1024) +/* Block normalization steps for afl-tmin: */ + +#define TMIN_SET_MIN_SIZE 4 +#define TMIN_SET_STEPS 128 + /* Maximum dictionary token size (-x), in bytes: */ #define MAX_DICT_FILE 128 diff --git a/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h b/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h index c6ebc873ae0..e4a470b5523 100644 --- a/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h +++ b/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h @@ -134,6 +134,12 @@ static void afl_setup(void) { if (afl_area_ptr == (void*)-1) exit(1); + /* With AFL_INST_RATIO set to a low value, we want to touch the bitmap + so that the parent doesn't give up on us. */ + + if (inst_r) afl_area_ptr[0] = 1; + + } if (getenv("AFL_INST_LIBS")) { diff --git a/pkgs/tools/security/afl/qemu.nix b/pkgs/tools/security/afl/qemu.nix index 441d64415cb..5b69811d08d 100644 --- a/pkgs/tools/security/afl/qemu.nix +++ b/pkgs/tools/security/afl/qemu.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = http://www.qemu.org/; - description = "Fork of QEMU with American Fuzzy Lop instrumentation support"; + description = "Fork of QEMU with AFL instrumentation support"; license = licenses.gpl2Plus; maintainers = with maintainers; [ thoughtpolice ]; platforms = platforms.linux; diff --git a/pkgs/tools/security/eid-mw/eid-nssdb.in b/pkgs/tools/security/eid-mw/eid-nssdb.in index a5f52167b36..934c0256da7 100644 --- a/pkgs/tools/security/eid-mw/eid-nssdb.in +++ b/pkgs/tools/security/eid-mw/eid-nssdb.in @@ -3,12 +3,13 @@ rootdb="/etc/pki/nssdb" userdb="$HOME/.pki/nssdb" dbentry="Belgium eID" -libfile="/run/current-system/sw/libbeidpkcs11.so" +libfile="/run/current-system/sw/lib/libbeidpkcs11.so" dbdir="$userdb" -case "$1" in ---help) cat << EOF +while true; do + case "$1" in + --help|"") cat << EOF (Un)register $dbentry with NSS-compatible browsers. Usage: `basename "$0"` [OPTION] ACTION [LIBRARY] @@ -27,14 +28,20 @@ Actions: Default arguments if unspecified: LIBRARY $libfile EOF - exit ;; ---db) dbdir="$2" - shift 2 ;; ---user) shift ;; ---system) - dbdir="$rootdb" - shift ;; -esac + exit ;; + --db) dbdir="$2" + shift 2 ;; + --user) dbdir="$userdb" + shift ;; + --system) + dbdir="$rootdb" + shift ;; + -*) echo "$0: unknown option: '$1'" >&2 + echo "Try --help for usage information." + exit 1 ;; + *) break ;; + esac +done if [ "$2" ]; then libfile="$2" @@ -50,9 +57,6 @@ if ! [ -d "$dbdir" ]; then exit 1 fi -echo "NSS database: $dbdir" -echo "BEID library: $libfile" - dbdir="sql:$dbdir" case "$1" in @@ -63,6 +67,7 @@ remove) echo "Removing $dbentry from database:" modutil -dbdir "$dbdir" -delete "$dbentry" ;; show) echo "Displaying $dbentry database entry, if any:" echo "Note: this may fail if you don't have the correct permissions." ;; +'') exec "$0" --help ;; *) echo "$0: unknown action: '$1'" >&2 echo "Try --help for usage information." exit 1 ;; @@ -70,6 +75,9 @@ esac ret=$? +echo "NSS database: $dbdir" +echo "BEID library: $libfile" + modutil -dbdir "$dbdir" -list "$dbentry" 2>/dev/null exit $ret diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix index fc5da48a1b9..71e5282e85b 100644 --- a/pkgs/tools/security/gnupg/21.nix +++ b/pkgs/tools/security/gnupg/21.nix @@ -13,11 +13,11 @@ with stdenv.lib; assert x11Support -> pinentry != null; stdenv.mkDerivation rec { - name = "gnupg-2.1.2"; + name = "gnupg-2.1.3"; src = fetchurl { url = "mirror://gnupg/gnupg/${name}.tar.bz2"; - sha256 = "14k7c5spai3yppz6izf1ggbnffskl54ln87v1wgy9pwism1mlks0"; + sha256 = "1vf8fmwcq81abzw2mypz5j7m4xy0vl4z6lri5lxfbd2bsyq7ygi1"; }; patches = [ ./socket-activate-2.1.1.patch ]; diff --git a/pkgs/tools/security/lastpass-cli/default.nix b/pkgs/tools/security/lastpass-cli/default.nix index a3652f62232..92c7a027d69 100644 --- a/pkgs/tools/security/lastpass-cli/default.nix +++ b/pkgs/tools/security/lastpass-cli/default.nix @@ -3,23 +3,19 @@ stdenv.mkDerivation rec { name = "lastpass-cli-${version}"; - version = "0.4.0"; + version = "0.5.1"; src = fetchFromGitHub { owner = "lastpass"; repo = "lastpass-cli"; rev = "v${version}"; - sha256 = "1r06lifjc28sm88d6x3xwn76l9fjwjmd1wbmvr9j8rna889q0wl9"; + sha256 = "0k2dbfizd6gwd4s8badm50qg2djrh22szd932l1a96mn79q8zb70"; }; buildInputs = [ openssl curl libxml2 pkgconfig asciidoc docbook_xsl libxslt ]; - prePatch = '' - substituteInPlace version.h --replace "0.3.0" "0.4.0" - ''; - makeFlags = "PREFIX=$(out)"; installTargets = "install install-doc"; diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 1aa5e0b51f1..c03029232ac 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl -, coreutils, gnused, getopt, pwgen, git, tree, gnupg +, coreutils, gnused, getopt, pwgen, git, tree, gnupg, which , makeWrapper , xclip ? null, xdotool ? null, dmenu ? null @@ -59,6 +59,16 @@ stdenv.mkDerivation rec { '' else ""} ''; + wrapperPath = with stdenv.lib; makeSearchPath "bin/" ([ + coreutils + gnused + getopt + git + gnupg + tree + which + ] ++ ifEnable x11Support [ dmenu xclip xdotool ]); + postFixup = '' # Fix program name in --help substituteInPlace $out/bin/pass \ @@ -66,11 +76,11 @@ stdenv.mkDerivation rec { # Ensure all dependencies are in PATH wrapProgram $out/bin/pass \ - --prefix PATH : "${coreutils}/bin:${gnused}/bin:${getopt}/bin:${gnupg}/bin:${git}/bin:${tree}/bin:${pwgen}/bin${if x11Support then ":${xclip}/bin" else ""}" - - ${if x11Support then '' - wrapProgram $out/bin/passmenu \ - --prefix PATH : "$out/bin:${xdotool}/bin:${dmenu}/bin" - '' else ""} + --prefix PATH : "${wrapperPath}" + '' + stdenv.lib.optionalString x11Support '' + # We just wrap passmenu with the same PATH as pass. It doesn't + # need all the tools in there but it doesn't hurt either. + wrapProgram $out/bin/passmenu \ + --prefix PATH : "$out/bin:${wrapperPath}" ''; } diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index 632edaedd2e..757959f5345 100644 --- a/pkgs/tools/security/pinentry/default.nix +++ b/pkgs/tools/security/pinentry/default.nix @@ -10,11 +10,11 @@ let in with stdenv.lib; stdenv.mkDerivation rec { - name = "pinentry-0.9.0"; + name = "pinentry-0.9.1"; src = fetchurl { url = "mirror://gnupg/pinentry/${name}.tar.bz2"; - sha256 = "1awhajq21hcjgqfxg9czaxg555gij4bba6axrwg8w6lfmc3ml14h"; + sha256 = "15cn7q6wg3k433l9ks48pz4dbikp7ysp0h8jqynz6p9rdf2qxl4w"; }; buildInputs = [ libcap gtk2 ncurses qt4 ]; diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix index b91dc65219b..b605f3eb330 100644 --- a/pkgs/tools/security/tor/torbrowser.nix +++ b/pkgs/tools/security/tor/torbrowser.nix @@ -20,13 +20,13 @@ let in stdenv.mkDerivation rec { name = "tor-browser-${version}"; - version = "4.0.6"; + version = "4.0.8"; src = fetchurl { url = "https://archive.torproject.org/tor-package-archive/torbrowser/${version}/tor-browser-linux${bits}-${version}_en-US.tar.xz"; sha256 = if bits == "64" then - "d954510bf812f624945bdba8e1c37e23573de89e2f159d7c89a3e3589a765559" else - "89ce71312f5d73fc2af637a93d7697587b2132fce0e9f6e815b25ddba66518d0"; + "d8e1ff1865542eb358834bd6f095a2bfa2a991a30ca5188a5752883636a31a36" else + "152186ff31425660675c082af1759ef6cc65f618b6e49e25385c7ccacfe70061"; }; patchPhase = '' diff --git a/pkgs/tools/system/collectd/default.nix b/pkgs/tools/system/collectd/default.nix index e0149078271..80d9d2d98ef 100644 --- a/pkgs/tools/system/collectd/default.nix +++ b/pkgs/tools/system/collectd/default.nix @@ -26,11 +26,11 @@ }: stdenv.mkDerivation rec { - name = "collectd-5.4.1"; + name = "collectd-5.4.2"; src = fetchurl { url = "http://collectd.org/files/${name}.tar.bz2"; - sha256 = "1q365zx6d1wyhv7n97bagfxqnqbhj2j14zz552nhmjviy8lj2ibm"; + sha256 = "14z3qkqbmfjvqvcb2v17480f7c8j7wa49myk0zlxpd9qq40fk2cp"; }; buildInputs = [ diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index c408c0f34ea..5d6e322facc 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -1,15 +1,25 @@ -{ stdenv, fetchgit, libaio }: +{ stdenv, fetchFromGitHub, libaio, zlib }: + +let version = "2.2.7"; in stdenv.mkDerivation rec { - name = "fio-2.0.8"; - - src = fetchgit { - url = git://git.kernel.dk/fio.git; - rev = "cf9a74c8bd63d9db5256f1362885c740e11a1fe5"; - sha256 = "b34de480bbbb9cde221d0c4557ead91790feb825a1e31c4013e222ee7f43e937"; + name = "fio-${version}"; + + src = fetchFromGitHub { + owner = "axboe"; + repo = "fio"; + rev = "fio-${version}"; + sha256 = "02k528n97xp1ly3d0mdn0lgwqlpn49b644696m75kcr0hn07382v"; }; - - buildInputs = [ libaio ]; + + buildInputs = [ libaio zlib ]; + + enableParallelBuilding = true; + + configurePhase = '' + substituteInPlace tools/plot/fio2gnuplot --replace /usr/share/fio $out/share/fio + ./configure + ''; installPhase = '' make install prefix=$out diff --git a/pkgs/tools/system/foremost/default.nix b/pkgs/tools/system/foremost/default.nix new file mode 100644 index 00000000000..baaa97b4b24 --- /dev/null +++ b/pkgs/tools/system/foremost/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl }: + +let version = "1.5.7"; in +stdenv.mkDerivation rec { + name = "foremost-${version}"; + + src = fetchurl { + sha256 = "0d2zxw0ijg8cd3ksgm8cf8jg128zr5x7z779jar90g9f47pm882h"; + url = "http://foremost.sourceforge.net/pkg/${name}.tar.gz"; + }; + + meta = with stdenv.lib; { + inherit version; + description = "Recover files based on their contents"; + longDescription = '' + Foremost is a console program to recover files based on their headers, + footers, and internal data structures. Foremost can work on image files, such + as those generated by dd, Safeback, Encase, etc, or directly on a drive. + The headers and footers can be specified by a configuration file or you can + use command line switches to specify built-in file types. These built-in types + look at the data structures of a given file format allowing for a more + reliable and faster recovery. + ''; + homepage = http://foremost.sourceforge.net/; + license = with licenses; publicDomain; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; + }; + + patches = [ ./makefile.patch ]; + + makeFlags = "PREFIX=$(out)"; + + enableParallelBuilding = true; + + preInstall = '' + mkdir -p $out/{bin,share/man/man8} + ''; +} diff --git a/pkgs/tools/system/foremost/makefile.patch b/pkgs/tools/system/foremost/makefile.patch new file mode 100644 index 00000000000..6626c9520ec --- /dev/null +++ b/pkgs/tools/system/foremost/makefile.patch @@ -0,0 +1,23 @@ +--- a/Makefile 2015-04-21 00:40:46.949266581 +0200 ++++ b/Makefile 2015-04-21 00:41:38.637165883 +0200 +@@ -24,9 +24,9 @@ + RAW_FLAGS += -DVERSION=\"$(VERSION)\" + + # Where we get installed +-BIN = /usr/local/bin +-MAN = /usr/share/man/man8 +-CONF= /usr/local/etc ++BIN = $(PREFIX)/bin ++MAN = $(PREFIX)/share/man/man8 ++CONF= $(PREFIX)/etc + # Setup for compiling and cross-compiling for Windows + # The CR_ prefix refers to cross compiling from OSX to Windows + CR_CC = $(CR_BASE)/gcc +@@ -120,7 +120,6 @@ + install: goals + install -m 755 $(NAME) $(BIN) + install -m 444 $(MAN_PAGES) $(MAN) +- install -m 444 foremost.conf $(CONF) + macinstall: BIN = /usr/local/bin/ + macinstall: MAN = /usr/share/man/man1/ + macinstall: CONF = /usr/local/etc/ diff --git a/pkgs/tools/system/honcho/default.nix b/pkgs/tools/system/honcho/default.nix index 1c231e90db4..6bf2a995a24 100644 --- a/pkgs/tools/system/honcho/default.nix +++ b/pkgs/tools/system/honcho/default.nix @@ -22,7 +22,7 @@ let honcho = buildPythonPackage rec { meta = with stdenv.lib; { description = "A Python clone of Foreman, a tool for managing Procfile-based applications."; license = licenses.mit; - homePage = https://github.com/nickstenning/honcho; + homepage = https://github.com/nickstenning/honcho; maintainers = with maintainers; [ benley ]; platforms = platforms.unix; }; diff --git a/pkgs/tools/system/ioping/default.nix b/pkgs/tools/system/ioping/default.nix index 932b68197ce..54721f7ce73 100644 --- a/pkgs/tools/system/ioping/default.nix +++ b/pkgs/tools/system/ioping/default.nix @@ -1,47 +1,20 @@ -x@{builderDefsPackage - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="ioping"; - version = "0.9"; - name="${baseName}-${version}"; - url="https://docs.google.com/uc?id=0B_PlDc2qaehFWWtLZ3Z3N1ltdm8&export=download"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - name = "${sourceInfo.name}.tar.gz"; +stdenv.mkDerivation rec { + name = "ioping-${version}"; + version = "0.9"; + src = fetchurl { + url = "https://github.com/koct9i/ioping/releases/download/v${version}/${name}.tar.gz"; sha256 = "0pbp7b3304y9yyv2w41l3898h5q8w77hnnnq1vz8qz4qfl4467lm"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + makeFlags = "PREFIX=$(out)"; - /* doConfigure should be removed if not needed */ - phaseNames = ["doMakeInstall"]; - makeFlags = [ - ''PREFIX="$out"'' - ]; - - meta = { - description = "Filesystem IO delay time measurer"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.gpl3Plus; - homepage = "http://code.google.com/p/ioping/"; - inherit version; + meta = with stdenv.lib; { + description = "Disk I/O latency measuring tool"; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; unix; + license = licenses.gpl3Plus; + homepage = https://github.com/koct9i/ioping; }; -}) x - +} diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix index 32f48eb7e14..a9fdcf6fa64 100644 --- a/pkgs/tools/system/rsyslog/default.nix +++ b/pkgs/tools/system/rsyslog/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libestr, json_c, zlib, pythonPackages -, krb5 ? null, systemd ? null, jemalloc ? null, mysql ? null, postgresql ? null +, krb5 ? null, systemd ? null, jemalloc ? null, libmysql ? null, postgresql ? null , libdbi ? null, net_snmp ? null, libuuid ? null, curl ? null, gnutls ? null , libgcrypt ? null, liblognorm ? null, openssl ? null, librelp ? null , libgt ? null, liblogging ? null, libnet ? null, hadoop ? null, rdkafka ? null @@ -11,19 +11,19 @@ let mkFlag = cond: name: if cond then "--enable-${name}" else "--disable-${name}"; in stdenv.mkDerivation rec { - name = "rsyslog-8.8.0"; + name = "rsyslog-8.9.0"; src = fetchurl { url = "http://www.rsyslog.com/files/download/rsyslog/${name}.tar.gz"; - sha256 = "1sx0j5icp172rzcpybjpfw53aj34w8j7k3f1ga0pmbv58r3pwyhl"; + sha256 = "1p3saxfs723479rbsdyvqwfrblcp0bw6mkz2ncrxvnccfn70xc7a"; }; buildInputs = [ pkgconfig libestr json_c zlib pythonPackages.docutils - krb5 jemalloc postgresql libdbi net_snmp libuuid curl gnutls + krb5 jemalloc libmysql postgresql libdbi net_snmp libuuid curl gnutls libgcrypt liblognorm openssl librelp libgt liblogging libnet hadoop rdkafka libmongo-client czmq rabbitmq-c hiredis - ] ++ stdenv.lib.optional stdenv.isLinux systemd ++ stdenv.lib.optional (mysql != null) mysql.lib; + ] ++ stdenv.lib.optional stdenv.isLinux systemd; configureFlags = [ "--sysconfdir=/etc" @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { (mkFlag (jemalloc != null) "jemalloc") (mkFlag true "unlimited-select") (mkFlag true "usertools") - (mkFlag (mysql != null) "mysql") + (mkFlag (libmysql != null) "mysql") (mkFlag (postgresql != null) "pgsql") (mkFlag (libdbi != null) "libdbi") (mkFlag (net_snmp != null) "snmp") diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix index 28a0fa52d27..28c68f52aaf 100644 --- a/pkgs/tools/system/runit/default.nix +++ b/pkgs/tools/system/runit/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "UNIX init scheme with service supervision"; license = licenses.bsd3; - homePage = "http://smarden.org/runit"; + homepage = "http://smarden.org/runit"; maintainers = with maintainers; [ rickynils ]; platforms = platforms.linux; }; diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix index 46cbde74a03..a65213839c8 100644 --- a/pkgs/tools/system/stress-ng/default.nix +++ b/pkgs/tools/system/stress-ng/default.nix @@ -1,14 +1,16 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, attr }: -let version = "0.03.20"; in +let version = "0.03.22"; in stdenv.mkDerivation rec { name = "stress-ng-${version}"; src = fetchurl { - sha256 = "0j1nppja56cgsd7vg3465y9kbxy3hl8mbyzc254qqm4z9ij1m3dg"; + sha256 = "0byhaqw332894vg4rkc8mwxyzh6ggx4l7qnzzk1m3b2j52m908mn"; url = "http://kernel.ubuntu.com/~cking/tarballs/stress-ng/${name}.tar.gz"; }; + buildInputs = [ attr ]; + patchPhase = '' substituteInPlace Makefile --replace "/usr" "" ''; @@ -18,6 +20,7 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" ]; meta = with stdenv.lib; { + inherit version; description = "Stress test a computer system"; longDescription = '' Stress test a system in various selectable ways, exercising both various diff --git a/pkgs/tools/system/suid-chroot/default.nix b/pkgs/tools/system/suid-chroot/default.nix index 3b19c711410..62f7280a54a 100644 --- a/pkgs/tools/system/suid-chroot/default.nix +++ b/pkgs/tools/system/suid-chroot/default.nix @@ -1,34 +1,22 @@ -a : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl }: + +let version = "1.0.2"; in +stdenv.mkDerivation rec { + name = "suid-chroot-${version}"; - version = a.lib.attrByPath ["version"] "1.0.1" a; - buildInputs = with a; [ - - ]; -in -rec { src = fetchurl { - url = "http://myweb.tiscali.co.uk/scottrix/linux/download/suid-chroot-${version}.tar.bz2"; - sha256 = "15gs09md4lyym47ipzffm1ws8jkg028x0cgwxxs9qkdqbl5zb777"; + sha256 = "1a9xqhck0ikn8kfjk338h9v1yjn113gd83q0c50k78xa68xrnxjx"; + url = "http://myweb.tiscali.co.uk/scottrix/linux/download/${name}.tar.bz2"; }; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["replacePaths" "doMakeInstall"]; - - installFlags = "PREFIX=$out"; + postPatch = '' + substituteInPlace Makefile --replace /usr $out + ''; - replacePaths = a.fullDepEntry ('' - sed -e "s@/usr/@$out/@g" -i Makefile - '') ["minInit" "doUnpack"]; - - name = "suid-chroot-" + version; - meta = { + meta = with stdenv.lib; { + inherit version; description = "Setuid-safe wrapper for chroot"; - maintainers = [ - ]; + license = with licenses; gpl2Plus; + maintainers = with maintainers; [ nckx ]; }; } diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 63850454b3d..c513e475e58 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { meta = { description = ""; license = stdenv.lib.licenses.gpl3; - homePage = "http://thinkfan.sourceforge.net/"; + homepage = "http://thinkfan.sourceforge.net/"; maintainers = with stdenv.lib.maintainers; [ iElectric ]; platforms = stdenv.lib.platforms.linux; }; diff --git a/pkgs/tools/typesetting/tex/texlive/pgf.nix b/pkgs/tools/typesetting/tex/texlive/pgf.nix deleted file mode 100644 index b46229e9828..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/pgf.nix +++ /dev/null @@ -1,41 +0,0 @@ -args: with args; - - -rec { - name = "texlive-pgf-2010"; - - src = fetchurl { - url = "mirror://debian/pool/main/p/pgf/pgf_2.10.orig.tar.gz"; - sha256 = "642092e6b49df9e33bd901ac7eb7024ff235a29f43d27e78e5827ca3bc03f120"; - }; - - propagatedBuildInputs = [texLiveLatexXColor texLive]; - - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/share/ - mkdir -p $out/texmf-dist/tex/generic/pgf - cp -r * $out/texmf-dist/tex/generic/pgf - ln -s $out/texmf* $out/share/ - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - - meta = { - description = "Extra components for TeXLive: graphics package"; - - longDescription = '' - PGF is a macro package for creating graphics. It is platform- - and format-independent and works together with the most - important TeX backend drivers, including pdftex and dvips. It - comes with a user-friedly syntax layer called TikZ. - - Its usage is similar to pstricks and the standard picture - environment. PGF works with plain (pdf-)TeX, (pdf-)LaTeX, and - ConTeXt. Unlike pstricks , it can produce either PostScript or - PDF output. - ''; - - license = [ "GPLv2" "LPPLv1.3c" ]; - - homepage = http://tug.ctan.org/tex-archive/graphics/pgf/; - }; -} |