diff options
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/admin/ansible/2.4.nix | 40 | ||||
-rw-r--r-- | pkgs/tools/admin/fastlane/Gemfile.lock | 6 | ||||
-rw-r--r-- | pkgs/tools/admin/fastlane/gemset.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/misc/kt/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/networking/axel/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/networking/bgpdump/default.nix | 21 | ||||
-rw-r--r-- | pkgs/tools/networking/strongswan/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/nix/info/default.nix | 44 | ||||
-rwxr-xr-x | pkgs/tools/nix/info/info.sh | 169 | ||||
-rw-r--r-- | pkgs/tools/nix/info/multiuser.nix | 12 | ||||
-rw-r--r-- | pkgs/tools/nix/info/relaxedsandbox.nix | 12 | ||||
-rw-r--r-- | pkgs/tools/nix/info/sandbox.nix | 10 | ||||
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/system/smartmontools/default.nix | 8 |
14 files changed, 328 insertions, 19 deletions
diff --git a/pkgs/tools/admin/ansible/2.4.nix b/pkgs/tools/admin/ansible/2.4.nix new file mode 100644 index 000000000000..dd9c12c831c9 --- /dev/null +++ b/pkgs/tools/admin/ansible/2.4.nix @@ -0,0 +1,40 @@ +{ stdenv +, fetchurl +, pythonPackages +, windowsSupport ? false +}: + +pythonPackages.buildPythonPackage rec { + pname = "ansible"; + version = "2.4.0.0"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://releases.ansible.com/ansible/${name}.tar.gz"; + sha256 = "0xkwnx817rygb1922gncv9ivgvb7hjg8g53r39hfdm3jgzp6y9qs"; + }; + + prePatch = '' + sed -i "s,/usr/,$out," lib/ansible/constants.py + ''; + + doCheck = false; + dontStrip = true; + dontPatchELF = true; + dontPatchShebangs = false; + + propagatedBuildInputs = with pythonPackages; [ + pycrypto paramiko jinja2 pyyaml httplib2 boto six netaddr dns + ] ++ stdenv.lib.optional windowsSupport pywinrm; + + meta = with stdenv.lib; { + homepage = http://www.ansible.com; + description = "A simple automation tool"; + license = with licenses; [ gpl3 ]; + maintainers = with maintainers; [ + jgeerds + joamaki + ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/tools/admin/fastlane/Gemfile.lock b/pkgs/tools/admin/fastlane/Gemfile.lock index 5f15a9d0455c..8f10ee22ddcf 100644 --- a/pkgs/tools/admin/fastlane/Gemfile.lock +++ b/pkgs/tools/admin/fastlane/Gemfile.lock @@ -24,7 +24,7 @@ GEM faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) fastimage (2.1.0) - fastlane (2.60.1) + fastlane (2.61.0) CFPropertyList (>= 2.3, < 3.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -103,10 +103,10 @@ GEM rouge (2.0.7) rubyzip (1.2.1) security (0.1.3) - signet (0.7.3) + signet (0.8.1) addressable (~> 2.3) faraday (~> 0.9) - jwt (~> 1.5) + jwt (>= 1.5, < 3.0) multi_json (~> 1.10) slack-notifier (1.5.1) terminal-notifier (1.8.0) diff --git a/pkgs/tools/admin/fastlane/gemset.nix b/pkgs/tools/admin/fastlane/gemset.nix index 0d9c1f55835d..c1285e434963 100644 --- a/pkgs/tools/admin/fastlane/gemset.nix +++ b/pkgs/tools/admin/fastlane/gemset.nix @@ -137,10 +137,10 @@ dependencies = ["CFPropertyList" "addressable" "babosa" "colored" "commander-fastlane" "dotenv" "excon" "faraday" "faraday-cookie_jar" "faraday_middleware" "fastimage" "gh_inspector" "google-api-client" "highline" "json" "mini_magick" "multi_json" "multi_xml" "multipart-post" "plist" "public_suffix" "rubyzip" "security" "slack-notifier" "terminal-notifier" "terminal-table" "tty-screen" "word_wrap" "xcodeproj" "xcpretty" "xcpretty-travis-formatter"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1sg8xh1rjigiq438knkpdq685kyw34ki3h7baj65qh9mkkc8drxy"; + sha256 = "0n73748vw7y29ycx0rjdg9zvn8xhncq07zq1l4a16n5s82rb14iy"; type = "gem"; }; - version = "2.60.1"; + version = "2.61.0"; }; gh_inspector = { source = { @@ -360,10 +360,10 @@ dependencies = ["addressable" "faraday" "jwt" "multi_json"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "149668991xqibvm8kvl10kzy891yd6f994b4gwlx6c3vl24v5jq6"; + sha256 = "0js81lxqirdza8gf2f6avh11fny49ygmxfi1qx7jp8l9wrhznbkv"; type = "gem"; }; - version = "0.7.3"; + version = "0.8.1"; }; slack-notifier = { source = { diff --git a/pkgs/tools/misc/kt/default.nix b/pkgs/tools/misc/kt/default.nix index 738eceb20a0e..eb0f78e787ab 100644 --- a/pkgs/tools/misc/kt/default.nix +++ b/pkgs/tools/misc/kt/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { name = "kt-${version}"; - version = "11.1.0"; + version = "12.1.0"; src = fetchFromGitHub { owner = "fgeller"; repo = "kt"; rev = "v${version}"; - sha256 = "1ymygd3l5pfbnjmdjcrspj520v29hnv3bdgxpim38dpv3qj518vq"; + sha256 = "014q39bg88vg1xdq1bz6wj982zb148sip3a42hbrinh8qj41y4yg"; }; goPackagePath = "github.com/fgeller/kt"; diff --git a/pkgs/tools/networking/axel/default.nix b/pkgs/tools/networking/axel/default.nix index 99c225ec259f..b19d4cca315d 100644 --- a/pkgs/tools/networking/axel/default.nix +++ b/pkgs/tools/networking/axel/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "axel-${version}"; - version = "2.14.1"; + version = "2.15"; src = fetchurl { url = "mirror://debian/pool/main/a/axel/axel_${version}.orig.tar.gz"; - sha256 = "0fayfpyc9cs6yp474400nyjbix6aywicz6pw17rzm4m7k06q5xmc"; + sha256 = "0wm16s129615i7rw48422q3x3ixr4v2p9942p0s6qk2fjlc3y8hf"; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/tools/networking/bgpdump/default.nix b/pkgs/tools/networking/bgpdump/default.nix new file mode 100644 index 000000000000..55b168a21aec --- /dev/null +++ b/pkgs/tools/networking/bgpdump/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchzip, autoreconfHook, zlib, bzip2 }: + +stdenv.mkDerivation rec { + name = "bgpdump-2017-09-29"; + + src = fetchzip { + url = "https://bitbucket.org/ripencc/bgpdump/get/94a0e724b335.zip"; + sha256 = "09g9vz2zc4nyzl669w1j7fxw21ifja6dxbp0xbqh6n7w3gpx2g88"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ zlib bzip2 ]; + + meta = { + homepage = https://bitbucket.org/ripencc/bgpdump/wiki/Home; + description = ''Analyze dump files produced by Zebra/Quagga or MRT''; + license = stdenv.lib.licenses.hpnd; + maintainers = with stdenv.lib.maintainers; [ lewo ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index 0671b7d00899..641e12388728 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-swanctl" "--enable-cmd" "--enable-systemd" "--enable-farp" "--enable-dhcp" + "--enable-openssl" "--enable-eap-sim" "--enable-eap-sim-file" "--enable-eap-simaka-pseudonym" "--enable-eap-simaka-reauth" "--enable-eap-identity" "--enable-eap-md5" "--enable-eap-gtc" "--enable-eap-aka" "--enable-eap-aka-3gpp2" @@ -55,7 +56,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional (stdenv.system == "i686-linux") "--enable-padlock" ++ stdenv.lib.optionals enableTNC [ "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" - "--enable-curl" "--enable-openssl" + "--enable-curl" "--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20" "--enable-tnc-imc" "--enable-imc-os" "--enable-imc-attestation" "--enable-tnc-imv" "--enable-imv-attestation" diff --git a/pkgs/tools/nix/info/default.nix b/pkgs/tools/nix/info/default.nix new file mode 100644 index 000000000000..e60c4eecbaf6 --- /dev/null +++ b/pkgs/tools/nix/info/default.nix @@ -0,0 +1,44 @@ +{ stdenv, lib, coreutils, findutils, gnugrep, darwin, shellcheck +, doCheck ? false # Avoid having GHC in the build-time closure of all NixOS configuratinos +}: + +stdenv.mkDerivation { + name = "nix-info"; + src = ./info.sh; + + nativeBuildInputs = lib.optionals doCheck [ + shellcheck + ]; + + path = lib.makeBinPath ([ + coreutils findutils gnugrep + ] ++ (if stdenv.isDarwin then [ darwin.DarwinTools ] else [])); + is_darwin = if stdenv.isDarwin then "yes" else "no"; + + sandboxtest = ./sandbox.nix; + relaxedsandboxtest = ./relaxedsandbox.nix; + multiusertest = ./multiuser.nix; + + unpackCmd = '' + mkdir nix-info + cp $src ./nix-info/nix-info + ''; + + buildPhase = '' + substituteAllInPlace ./nix-info + ''; + + inherit doCheck; + checkPhase = '' + shellcheck ./nix-info + ''; + + installPhase = '' + mkdir -p $out/bin + cp ./nix-info $out/bin/nix-info + ''; + + meta = { + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/tools/nix/info/info.sh b/pkgs/tools/nix/info/info.sh new file mode 100755 index 000000000000..473e035b8e0a --- /dev/null +++ b/pkgs/tools/nix/info/info.sh @@ -0,0 +1,169 @@ +#!/bin/bash + +PATH="@path@:$PATH" +IS_DARWIN="@is_darwin@" + +set -eu +set -o pipefail + +DEBUG=0 +MARKDOWN=0 +HOST_OS=0 +SANDBOX=0 +while true; do + case "${1:-}" in + "") + break + ;; + -d | --debug) + set -x + DEBUG=1 + shift + ;; + -m | --markdown) + MARKDOWN=1 + HOST_OS=1 + SANDBOX=1 + shift + ;; + --host-os) + HOST_OS=1 + shift + ;; + --sandbox) + SANDBOX=1 + shift + ;; + + * ) + cat <<EOF +nix-info - get high level info to help with debugging + +Options: + + -m, --markdown formatting for a GitHub issue + implies: --host-os, --sandbox + + --sandbox include sandbox configuration + --host-os include host OS details + + -h, --help show this message + -d, --debug debug mode + +EOF + exit 1 + ;; + + esac +done + +debuglog() { + if [ $DEBUG -eq 1 ]; then + cat >&2 + else + cat > /dev/null + fi +} + +nixev() { + nix-instantiate --eval --strict -E "$1" +} + +desc_system() { + nixev '(import <nixpkgs> {}).system' +} + +desc_host_os() { + printf "%s" "$(uname -sr)" + + if [ "$IS_DARWIN" = "yes" ]; then + printf ", macOS %s" "$(sw_vers -productVersion)" + fi + + if [ -f /etc/os-release ]; then + ( + # shellcheck disable=SC1091 + . /etc/os-release + printf ", %s, %s" "${NAME:-$(uname -v)}" "${VERSION:-noversion}" + ) + fi +} + +desc_multi_user() { + if nix-build --no-out-link @multiusertest@ 2>&1 | debuglog; then + printf "yes" + else + printf "no" + fi +} + +desc_nixpkgs_path() { + nixev '<nixpkgs>' +} + +channel_facts() { + find /nix/var/nix/profiles/per-user \ + -mindepth 2 \ + -maxdepth 2 \ + -name channels \ + -print0 \ + |\ + while IFS= read -r -d '' userchannelset; do + manifest="$userchannelset/manifest.nix" + + if [ -e "$manifest" ]; then + userchannels=$(nixev \ + "builtins.concatStringsSep \", \" + (map (ch: ch.name) + (import \"$manifest\"))") + + fact "channels($(echo "$manifest" | cut -d/ -f7))" \ + "$userchannels" + fi + done +} + +desc_sandbox() { + if nix-build --no-out-link @sandboxtest@ 2>&1 | debuglog; then + printf "no" + elif nix-build --no-out-link @relaxedsandboxtest@ 2>&1 | debuglog; then + printf "relaxed" + else + printf "yes" + fi +} + +fact() { + name="${1:-0}" + value="${2:-0}" + last="${3:-1}" + if [ $MARKDOWN -eq 0 ]; then + printf "%s: %s" "$name" "$value" + if [ "$last" -eq 1 ]; then + printf ", " + fi + else + printf " - %s: \`%s\`\n" "$name" "$value" + fi + + if [ "$last" -eq 0 ]; then + echo "" + fi +} + +last_fact() { + fact "$1" "$2" 0 +} + +fact "system" "$(desc_system)" +if [ $HOST_OS -eq 1 ]; then + fact "host os" "$(desc_host_os)" +fi +fact "multi-user?" "$(desc_multi_user)" +if [ $SANDBOX -eq 1 ]; then + fact "sandbox" "$(desc_sandbox)" +fi + +fact "version" "$(nix-env --version)" +channel_facts +last_fact "nixpkgs" "$(desc_nixpkgs_path)" diff --git a/pkgs/tools/nix/info/multiuser.nix b/pkgs/tools/nix/info/multiuser.nix new file mode 100644 index 000000000000..827d52987673 --- /dev/null +++ b/pkgs/tools/nix/info/multiuser.nix @@ -0,0 +1,12 @@ +let + pkgs = import <nixpkgs> {}; +in pkgs.runCommand "diagnostics-multiuser" + { } + '' + set -x + # no cache: ${toString builtins.currentTime} + # For reproducibility, nix always uses nixbld group: + # https://github.com/NixOS/nix/blob/1dd29d7aebae706f3e90a18bbfae727f2ed03c70/src/libstore/build.cc#L1896-L1908 + test "$(groups)" == "nixbld" + touch $out + '' diff --git a/pkgs/tools/nix/info/relaxedsandbox.nix b/pkgs/tools/nix/info/relaxedsandbox.nix new file mode 100644 index 000000000000..625a6ecc39e0 --- /dev/null +++ b/pkgs/tools/nix/info/relaxedsandbox.nix @@ -0,0 +1,12 @@ +let + pkgs = import <nixpkgs> {}; +in pkgs.runCommand "diagnostics-sandbox" + { + __noChroot = true; + } + '' + set -x + # no cache: ${toString builtins.currentTime} + test -d "$(dirname "$out")/../var/nix" + touch $out + '' diff --git a/pkgs/tools/nix/info/sandbox.nix b/pkgs/tools/nix/info/sandbox.nix new file mode 100644 index 000000000000..fa4288c2f944 --- /dev/null +++ b/pkgs/tools/nix/info/sandbox.nix @@ -0,0 +1,10 @@ +let + pkgs = import <nixpkgs> {}; +in pkgs.runCommand "diagnostics-sandbox" + { } + '' + set -x + # no cache: ${toString builtins.currentTime} + test -d "$(dirname "$out")/../var/nix" + touch $out + '' diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index ac697be555ac..de6c1178221b 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -161,12 +161,12 @@ in rec { nixUnstable = (lib.lowPrio (common rec { name = "nix-1.12${suffix}"; - suffix = "pre5650_1dd29d7a"; + suffix = "pre5655_cbc21691"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "1dd29d7aebae706f3e90a18bbfae727f2ed03c70"; - sha256 = "182v2rczm8al1ggbaca8qapvrjyp21li1fd3fiwr5nqgazgr5308"; + rev = "cbc216911dbda23c3bc050c969bc725fe60760ef"; + sha256 = "0ynnk2m2n5pjmhy5gry90dy5k2wwy29v2wnq6zz32ak9zwz36x8r"; }; fromGit = true; })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; }; diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 26d84ae0320e..6ef1f54c23b7 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -4,12 +4,12 @@ let version = "6.5"; - dbrev = "4394"; + dbrev = "4548"; drivedbBranch = "RELEASE_${builtins.replaceStrings ["."] ["_"] version}_DRIVEDB"; driverdb = fetchurl { - url = "http://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw"; - sha256 = "1kdpgbl1az0xhqn7j613cx366n7amra8xz3391jpzzrd3vlga393"; - name = "smartmontools-drivedb.h"; + url = "http://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw"; + sha256 = "0nwk4ir0c40b01frqm7a0lvljh5k9yhslc3j4485zjsx3v5w269f"; + name = "smartmontools-drivedb.h"; }; in stdenv.mkDerivation rec { |