diff options
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/megacli/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/parted/default.nix | 14 | ||||
-rw-r--r-- | pkgs/tools/misc/parted/gpt-unicode-test-fix.patch | 38 | ||||
-rw-r--r-- | pkgs/tools/misc/pipelight/default.nix | 97 | ||||
-rw-r--r-- | pkgs/tools/misc/pipelight/pipelight.patch | 149 | ||||
-rw-r--r-- | pkgs/tools/misc/tmux/default.nix | 7 | ||||
-rw-r--r-- | pkgs/tools/misc/youtube-dl/default.nix | 1 |
7 files changed, 301 insertions, 11 deletions
diff --git a/pkgs/tools/misc/megacli/default.nix b/pkgs/tools/misc/megacli/default.nix index 7fd6ce966d6d..2d45bee49076 100644 --- a/pkgs/tools/misc/megacli/default.nix +++ b/pkgs/tools/misc/megacli/default.nix @@ -1,4 +1,4 @@ -{ stdenv, rpm, cpio, ncurses, patchelf, makeWrapper, requireFile, unzip }: +{ stdenv, rpmextract, ncurses, patchelf, makeWrapper, requireFile, unzip }: assert stdenv.system == "x86_64-linux"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "11jzvh25mlygflazd37gi05xv67im4rgq7sbs5nwgw3gxdh4xfjj"; }; - buildInputs = [rpm cpio ncurses unzip makeWrapper]; + buildInputs = [rpmextract ncurses unzip makeWrapper]; libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc stdenv.gcc.libc ncurses ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cd $out unzip ${src} - rpm2cpio linux/MegaCli-8.07.07-1.noarch.rpm | cpio -idmv + rpmextract linux/MegaCli-8.07.07-1.noarch.rpm ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib opt/MegaRAID/MegaCli/MegaCli64 wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64 ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64 diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index 01b9f391a443..0763532260a9 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -1,20 +1,26 @@ -{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline +{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline, perl, python , utillinux, check, enableStatic ? false, hurd ? null }: stdenv.mkDerivation rec { - name = "parted-3.1"; + name = "parted-3.2"; src = fetchurl { url = "mirror://gnu/parted/${name}.tar.xz"; - sha256 = "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y"; + sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"; }; + patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch; + + postPatch = stdenv.lib.optionalString doCheck '' + patchShebangs tests + ''; + buildInputs = [ libuuid ] ++ stdenv.lib.optional (readline != null) readline ++ stdenv.lib.optional (gettext != null) gettext ++ stdenv.lib.optional (devicemapper != null) devicemapper ++ stdenv.lib.optional (hurd != null) hurd - ++ stdenv.lib.optional doCheck check; + ++ stdenv.lib.optionals doCheck [ check perl python ]; configureFlags = (if (readline != null) diff --git a/pkgs/tools/misc/parted/gpt-unicode-test-fix.patch b/pkgs/tools/misc/parted/gpt-unicode-test-fix.patch new file mode 100644 index 000000000000..470188bf55e5 --- /dev/null +++ b/pkgs/tools/misc/parted/gpt-unicode-test-fix.patch @@ -0,0 +1,38 @@ +From Ludo's suggestion at: + + http://debbugs.gnu.org/cgi/bugreport.cgi?msg=8;bug=18258 + +diff --git a/tests/.t0251-gpt-unicode.sh.swp b/tests/.t0251-gpt-unicode.sh.swp +deleted file mode 100644 +index b41c337..0000000 +Binary files a/tests/.t0251-gpt-unicode.sh.swp and /dev/null differ +diff --git a/tests/t0251-gpt-unicode.sh b/tests/t0251-gpt-unicode.sh +index c845950..fa63a72 100755 +--- a/tests/t0251-gpt-unicode.sh ++++ b/tests/t0251-gpt-unicode.sh +@@ -22,7 +22,24 @@ dev=loop-file + # create zeroed device + truncate -s 10m $dev || fail=1 + +-export LC_ALL=C.UTF-8 ++found_locale=no ++for locale in en_US de_DE fr_FR es_ES ++do ++ LC_ALL="$locale.UTF-8" ++ export LC_ALL ++ ++ # In a UTF-8 locale, the string below prints as 4 characters. ++ if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then ++ found_locale=yes ++ break ++ fi ++done ++ ++if [ "$found_locale" != "yes" ]; then ++ echo "no valid UTF-8 locale found; skipping" >&2 ++ exit 77 ++fi ++ + # create gpt label with named partition + part_name=$(printf 'foo\341\264\244') + parted -s $dev mklabel gpt mkpart primary ext2 1MiB 2MiB name 1 $part_name > empty 2>&1 || fail=1 diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix new file mode 100644 index 000000000000..c2ae62ff688d --- /dev/null +++ b/pkgs/tools/misc/pipelight/default.nix @@ -0,0 +1,97 @@ +{ stdenv, fetchurl, fetchgit, autoconf, automake, wineUnstable, perl, xlibs + , gnupg, gcc48_multi, mesa, curl, bash, cacert, cabextract, utillinux, attr + }: + +let + wine_patches_version = "1.7.28"; + wine_hash = "04r3zk3dz2vzly2a4nqbcvppjs5iy3lq5ibx3wfrf877p5bz3hv7"; + + wine_patches = fetchgit { + url = "git://github.com/compholio/wine-compholio.git"; + rev = "refs/tags/v${wine_patches_version}"; + sha256 = "17f1wmxbx6ly1ws4p528ijf9b4yvmnmap5k7npw9icvkyaky5xi9"; + }; + + wine_custom = + stdenv.lib.overrideDerivation wineUnstable (args: rec { + name = "wine-${wine_patches_version}"; + version = "${wine_patches_version}"; + src = null; + srcs = [ + (fetchurl { + url = "mirror://sourceforge/wine/${name}.tar.bz2"; + sha256 = wine_hash; + }) + wine_patches ]; + sourceRoot = "./${name}"; + buildInputs = args.buildInputs ++ [ + autoconf perl utillinux automake attr + ]; + nativeBuildInputs = args.nativeBuildInputs ++ [ + autoconf perl utillinux automake attr + ]; + postPatch = '' + export wineDir=$(pwd) + patchShebangs $wineDir/tools/ + chmod u+w $wineDir/../git-export/debian/tools/ + patchShebangs $wineDir/../git-export/debian/tools/ + chmod -R +rwx ../git-export/ + make -C ../git-export/patches DESTDIR=$wineDir install + ''; + }); + + mozillaPluginPath = "/lib/mozilla/plugins"; + + +in stdenv.mkDerivation rec { + + version = "0.2.7.2"; + + name = "pipelight-${version}"; + + src = fetchurl { + url = "https://bitbucket.org/mmueller2012/pipelight/get/v${version}.tar.gz"; + sha256 = "02132151091f1f62d7409a537649efc86deb0eb4a323fd66907fc22947e2cfbd"; + }; + + buildInputs = [ wine_custom xlibs.libX11 gcc48_multi mesa curl ]; + propagatedbuildInputs = [ curl cabextract ]; + + patches = [ ./pipelight.patch ]; + + configurePhase = '' + patchShebangs . + ./configure \ + --prefix=$out \ + --moz-plugin-path=$out/${mozillaPluginPath} \ + --wine-path=${wine_custom} \ + --gpg-exec=${gnupg}/bin/gpg2 \ + --bash-interp=${bash}/bin/bash \ + --downloader=${curl}/bin/curl + $configureFlags + ''; + + passthru = { + mozillaPlugin = mozillaPluginPath; + wine = wine_custom; + }; + + postInstall = '' + $out/bin/pipelight-plugin --create-mozilla-plugins + ''; + + preFixup = '' + substituteInPlace $out/share/pipelight/install-dependency \ + --replace cabextract ${cabextract}/bin/cabextract + ''; + + enableParallelBuilding = true; + + meta = { + homepage = "http://pipelight.net/"; + licenses = 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/pipelight/pipelight.patch b/pkgs/tools/misc/pipelight/pipelight.patch new file mode 100644 index 000000000000..84f1b137b72b --- /dev/null +++ b/pkgs/tools/misc/pipelight/pipelight.patch @@ -0,0 +1,149 @@ +diff -urN pipelight.old/bin/pipelight-plugin.in pipelight.new/bin/pipelight-plugin.in +--- pipelight.old/bin/pipelight-plugin.in 2014-07-19 22:53:02.000000000 +0200 ++++ pipelight.new/bin/pipelight-plugin.in 2014-07-27 00:02:39.275834030 +0200 +@@ -92,7 +92,7 @@ + PLUGIN_PATH=$(realpath "$PLUGIN_PATH") + + # Global installation +- if [ $(/usr/bin/id -u) -eq 0 ]; then ++ if [ $(id -u) -eq 0 ]; then + INSTALLDIR="$PLUGIN_PATH" + + # Use environment variable (only if it doesn't point to the global directory) +@@ -594,7 +594,7 @@ + fi + + # Ensure the signature is valid, extract the content +- if ! @@GPG@@ --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then ++ if ! @@GPG@@ --homedir /tmp --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then + rm "$tmpfile" + rm "$decfile" + echo "" +@@ -630,24 +630,10 @@ + return 0 + } + +-# Use fetch on FreeBSD if wget is not available +-if command -v wget >/dev/null 2>&1; then +- download_file() +- { +- wget -O "$1" "$2" +- } +-elif command -v fetch >/dev/null 2>&1; then +- download_file() +- { +- fetch -o "$1" "$2" +- } +-else +- download_file() +- { +- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2 +- return 1 +- } +-fi ++download_file() ++{ ++ curl --cacert /etc/ssl/certs/ca-bundle.crt -o "$1" "$2" ++} + + # Use shasum instead of sha256sum on MacOS / *BSD + if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then +diff -urN pipelight.old/configure pipelight.new/configure +--- pipelight.old/configure 2014-07-19 22:53:02.000000000 +0200 ++++ pipelight.new/configure 2014-07-26 23:52:13.690881447 +0200 +@@ -66,12 +66,8 @@ + datadir="" + libdir="" + mandir="" +-bash_interp="$(which bash)" +-if which gpg &> /dev/null; then +- gpg_exec="$(which gpg)" +-else +- gpg_exec="/usr/bin/gpg" +-fi ++bash_interp=bash ++gpg_exec=gpg2 + moz_plugin_path="" + gcc_runtime_dlls="" + so_mode="0644" +diff -urN pipelight.old/Makefile pipelight.new/Makefile +--- pipelight.old/Makefile 2014-07-19 22:53:02.000000000 +0200 ++++ pipelight.new/Makefile 2014-07-26 23:25:22.020707765 +0200 +@@ -29,7 +29,7 @@ + -e 's|@@BINDIR@@|$(bindir)|g' \ + -e 's|@@DATADIR@@|$(datadir)|g' \ + -e 's|@@GCC_RUNTIME_DLLS@@|$(gcc_runtime_dlls)|g' \ +- -e 's|@@GPG@@|$(gpgexec)|g' \ ++ -e 's|@@GPG@@|$(gpg_exec)|g' \ + -e 's|@@LIBDIR@@|$(libdir)|g' \ + -e 's|@@MANDIR@@|$(mandir)|g' \ + -e 's|@@MOZ_PLUGIN_PATH@@|$(moz_plugin_path)|g' \ +@@ -69,12 +69,12 @@ + + .PHONY: prebuilt32 + prebuilt32: config.make pluginloader-$(git_commit).tar.gz pluginloader-$(git_commit).tar.gz.sig +- $(gpgexec) --batch --no-default-keyring --keyring "share/sig-pluginloader.gpg" --verify "pluginloader-$(git_commit).tar.gz.sig" ++ $(gpg_exec) --batch --no-default-keyring --keyring "share/sig-pluginloader.gpg" --verify "pluginloader-$(git_commit).tar.gz.sig" + tar -xvf "pluginloader-$(git_commit).tar.gz" src/windows/pluginloader.exe src/winecheck/winecheck.exe + + .PHONY: prebuilt64 + prebuilt64: config.make pluginloader-$(git_commit).tar.gz pluginloader-$(git_commit).tar.gz.sig +- $(gpgexec) --batch --no-default-keyring --keyring "share/sig-pluginloader.gpg" --verify "pluginloader-$(git_commit).tar.gz.sig" ++ $(gpg_exec) --batch --no-default-keyring --keyring "share/sig-pluginloader.gpg" --verify "pluginloader-$(git_commit).tar.gz.sig" + tar -xvf "pluginloader-$(git_commit).tar.gz" src/windows/pluginloader64.exe src/winecheck/winecheck64.exe + + .PHONY: pluginloader32 +diff -urN pipelight.old/share/install-dependency pipelight.new/share/install-dependency +--- pipelight.old/share/install-dependency 2014-07-19 22:53:02.000000000 +0200 ++++ pipelight.new/share/install-dependency 2014-07-26 23:26:18.431938546 +0200 +@@ -734,42 +734,14 @@ + return 0 + } + +-# Use fetch on FreeBSD if wget is not available +-if command -v wget >/dev/null 2>&1; then +- download_file() +- { +- wget -O "$1" "$2" +- } +- get_download_size() +- { +- local filesize="$(wget -O- "$1" --spider --server-response 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}')" +- local re='^[0-9]+$' +- if [[ "$filesize" -ne "0" ]] && [[ "$filesize" =~ $re ]]; then +- echo "$(($filesize/(1024*1024)))" +- else +- echo "N/A" +- fi +- } +-elif command -v fetch >/dev/null 2>&1; then +- download_file() +- { +- fetch -o "$1" "$2" +- } +- get_download_size() +- { +- echo "N/A" +- } +-else +- download_file() +- { +- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2 +- return 1 +- } +- get_download_size() +- { +- echo "N/A" +- } +-fi ++download_file() ++{ ++ curl --cacert /etc/ssl/certs/ca-bundle.crt -o "$1" "$2" ++} ++get_download_size() ++{ ++ echo "N/A" ++} + + # Use shasum instead of sha256sum on MacOS / *BSD + if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index 823374771696..7180665bd3d5 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ncurses, libevent, pkgconfig, makeWrapper}: +{stdenv, fetchurl, ncurses, libevent, pkgconfig}: stdenv.mkDerivation rec { pname = "tmux"; @@ -12,13 +12,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ncurses libevent makeWrapper ]; + buildInputs = [ ncurses libevent ]; postInstall = '' mkdir -p $out/etc/bash_completion.d cp -v examples/bash_completion_tmux.sh $out/etc/bash_completion.d/tmux - wrapProgram $out/bin/tmux --prefix TERMINFO : $out/share/terminfo ''; meta = { @@ -36,7 +35,7 @@ stdenv.mkDerivation rec { * Interactive menus to select windows, sessions or clients. * Change the current window by searching for text in the target. * Terminal locking, manually or after a timeout. - * A clean, easily extended, BSD-licensed codebase, under active development. + * A clean, easily extended, BSD-licensed codebase, under active development. ''; license = stdenv.lib.licenses.bsd3; diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index bf23fbcf2cf1..bff266a25e78 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { homepage = "http://rg3.github.com/youtube-dl/"; repositories.git = https://github.com/rg3/youtube-dl.git; description = "Command-line tool to download videos from YouTube.com and other sites"; + license = stdenv.lib.licenses.unlicense; platforms = with stdenv.lib.platforms; linux ++ darwin; maintainers = with stdenv.lib.maintainers; [ bluescreen303 simons phreedom ]; |