diff options
Diffstat (limited to 'nixpkgs/pkgs/tools')
26 files changed, 643 insertions, 95 deletions
diff --git a/nixpkgs/pkgs/tools/X11/jumpapp/default.nix b/nixpkgs/pkgs/tools/X11/jumpapp/default.nix new file mode 100644 index 000000000000..5d3810c7d64d --- /dev/null +++ b/nixpkgs/pkgs/tools/X11/jumpapp/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, perl, pandoc, fetchFromGitHub, xdotool, wmctrl, xprop, nettools }: + +stdenv.mkDerivation rec { + name = "jumpapp-${version}"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "mkropat"; + repo = "jumpapp"; + rev = "v${version}"; + sha256 = "11ibh51q4vcjkz9fqyw5dy9qrkqxm42hpdccas1s6h2dk9z62kfb"; + }; + + makeFlags = [ "PREFIX=$(out)" ]; + nativeBuildInputs = [ pandoc perl ]; + buildInputs = [ xdotool wmctrl xprop nettools perl ]; + postFixup = let + runtimePath = lib.makeBinPath buildInputs; + in + '' + sed -i "2 i export PATH=${runtimePath}:\$PATH" $out/bin/jumpapp + sed -i "2 i export PATH=${perl}/bin:\$PATH" $out/bin/jumpappify-desktop-entry + ''; + + meta = { + homepage = https://github.com/mkropat/jumpapp; + description = "A run-or-raise application switcher for any X11 desktop"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.matklad ]; + }; +} diff --git a/nixpkgs/pkgs/tools/admin/lxd/default.nix b/nixpkgs/pkgs/tools/admin/lxd/default.nix index e037541557c7..a94cf1d37ec5 100644 --- a/nixpkgs/pkgs/tools/admin/lxd/default.nix +++ b/nixpkgs/pkgs/tools/admin/lxd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, pkgconfig, lxc, buildGoPackage, fetchurl +{ stdenv, pkgconfig, lxc, buildGoPackage, fetchurl, fetchpatch , makeWrapper, acl, rsync, gnutar, xz, btrfs-progs, gzip, dnsmasq , squashfsTools, iproute, iptables, ebtables, libcap, dqlite , sqlite-replication @@ -7,15 +7,25 @@ }: buildGoPackage rec { - name = "lxd-3.10"; + pname = "lxd"; + version = "3.11"; goPackagePath = "github.com/lxc/lxd"; src = fetchurl { - url = "https://github.com/lxc/lxd/releases/download/${name}/${name}.tar.gz"; - sha256 = "0vd0p3xf54s7f9vcjfiin29py6hxyyxnisvp6am67l5nwhg7rnnc"; + url = "https://github.com/lxc/lxd/releases/download/${pname}-${version}/${pname}-${version}.tar.gz"; + sha256 = "0xxzrwhyzzp23arj57vjs1yh91gy3r4wpd5qy9ksifzd390clf2x"; }; + patches = [ + (fetchpatch { + url = https://github.com/CanonicalLtd/go-dqlite/commit/88a96df66e3e3bdc290fd4a0d41615d284d2c92c.patch; + sha256 = "0z6r4shh1rlf0in9xk1gi6ms2kcvplc3878106d2zzzfz7ad83a4"; + extraPrefix = "dist/src/github.com/CanonicalLtd/go-dqlite/"; + stripLen = 1; + }) + ]; + preBuild = '' # unpack vendor pushd go/src/github.com/lxc/lxd diff --git a/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix index 4473056514ff..584a2dc46f74 100644 --- a/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix +++ b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "abcm2ps-${version}"; - version = "8.14.3"; + version = "8.14.4"; src = fetchFromGitHub { owner = "leesavide"; repo = "abcm2ps"; rev = "v${version}"; - sha256 = "0sml21ip8ilkx8g5x608r6gzp1fxp9vmizgi0vcqclzaw9pjyiqg"; + sha256 = "0k53yf8plkkwsgg2vk468fkhvvwxnz5jk77n1159l0g362k36p0n"; }; configureFlags = [ diff --git a/nixpkgs/pkgs/tools/misc/bonfire/default.nix b/nixpkgs/pkgs/tools/misc/bonfire/default.nix index b8e5e3de6506..2bde876c68c1 100644 --- a/nixpkgs/pkgs/tools/misc/bonfire/default.nix +++ b/nixpkgs/pkgs/tools/misc/bonfire/default.nix @@ -30,7 +30,7 @@ buildPythonApplication rec { --replace "data_files = *.rst, *.txt" "" ''; - buildInputs = [ httpretty pytest pytestcov ]; + buildInputs = [ httpretty pytest_3 pytestcov ]; propagatedBuildInputs = [ arrow click keyring parsedatetime requests six termcolor ]; diff --git a/nixpkgs/pkgs/tools/misc/broadlink-cli/default.nix b/nixpkgs/pkgs/tools/misc/broadlink-cli/default.nix new file mode 100644 index 000000000000..2ba5499d7f77 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/broadlink-cli/default.nix @@ -0,0 +1,37 @@ +{ stdenv, python2Packages, fetchFromGitHub }: + +python2Packages.buildPythonApplication rec { + pname = "broadlink-cli"; + inherit (python2Packages.broadlink) version; + + # the tools are available as part of the source distribution from GH but + # not pypi, so we have to fetch them here. + src = fetchFromGitHub { + owner = "mjg59"; + repo = "python-broadlink"; + # this rev is version 0.9 + rev = "766b7b00fb1cec868e3d5fca66f1aada208959ce"; + sha256 = "0j0idzxmpwkb1lbgvi9df2hbxafm5hxjc6mgg5481lq7z4z1r4nb"; + }; + + format = "other"; + + propagatedBuildInputs = with python2Packages; [ + broadlink + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 -t $out/bin cli/broadlink_{cli,discovery} + install -Dm644 -t $out/share/doc/broadlink cli/README.md + + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "Tools for interfacing with Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs"; + maintainers = with maintainers; [ peterhoeg ]; + inherit (python2Packages.broadlink.meta) homepage license; + }; +} diff --git a/nixpkgs/pkgs/tools/misc/colord/default.nix b/nixpkgs/pkgs/tools/misc/colord/default.nix index 8edcf6e6629b..e89f93a4a821 100644 --- a/nixpkgs/pkgs/tools/misc/colord/default.nix +++ b/nixpkgs/pkgs/tools/misc/colord/default.nix @@ -1,29 +1,92 @@ -{ stdenv, fetchurl, bash-completion -, glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus -, gobject-introspection, argyllcms, meson, ninja, libxml2, vala_0_40 -, libgudev, sane-backends, gnome3, makeWrapper }: +{ stdenv +, fetchurl +, bash-completion +, glib +, polkit +, pkgconfig +, gettext +, gusb +, lcms2 +, sqlite +, systemd +, dbus +, gobject-introspection +, argyllcms +, meson +, ninja +, libxml2 +, vala +, libgudev +, wrapGAppsHook +, shared-mime-info +, sane-backends +, docbook_xsl +, docbook_xsl_ns +, docbook_xml_dtd_412 +, gtk-doc +, libxslt +, substituteAll +}: stdenv.mkDerivation rec { - name = "colord-1.4.2"; + pname = "colord"; + version = "1.4.4"; + + outputs = [ "out" "dev" "devdoc" "man" "installedTests" ]; src = fetchurl { - url = "https://www.freedesktop.org/software/colord/releases/${name}.tar.xz"; - sha256 = "19zc9gldz469jshl16av7na459kwr5nhvs2pz98xm5lw582xaw2c"; + url = "https://www.freedesktop.org/software/colord/releases/${pname}-${version}.tar.xz"; + sha256 = "19f0938fr7nvvm3jr263dlknaq7md40zrac2npfyz25zc00yh3ws"; }; + patches = [ + # Put installed tests into its own output + ./installed-tests-path.patch + ]; + + postPatch = '' + for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do + substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests" + done + ''; + mesonFlags = [ - "-Denable-sane=true" - "-Denable-vala=true" "--localstatedir=/var" - "-Denable-bash-completion=true" - # TODO: man page cannot be build with docbook2x - "-Denable-man=false" - "-Denable-docs=false" + "-Dinstalled_tests=true" + "-Dlibcolordcompat=true" + "-Dsane=true" + "-Dvapi=true" ]; - nativeBuildInputs = [ meson pkgconfig vala_0_40 ninja gettext libxml2 gobject-introspection makeWrapper ]; + nativeBuildInputs = [ + docbook_xml_dtd_412 + docbook_xsl + docbook_xsl_ns + gettext + gobject-introspection + gtk-doc + libxslt + meson + ninja + pkgconfig + shared-mime-info + vala + wrapGAppsHook + ]; - buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus bash-completion argyllcms libgudev sane-backends ]; + buildInputs = [ + argyllcms + bash-completion + dbus + glib + gusb + lcms2 + libgudev + polkit + sane-backends + sqlite + systemd + ]; postInstall = '' glib-compile-schemas $out/share/glib-2.0/schemas @@ -35,17 +98,11 @@ stdenv.mkDerivation rec { PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions"; PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; - postFixup = '' - wrapProgram "$out/libexec/colord-session" \ - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \ - --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib gnome3.dconf}/lib/gio/modules" - ''; - - meta = { + meta = with stdenv.lib; { description = "System service to manage, install and generate color profiles to accurately color manage input and output devices"; homepage = https://www.freedesktop.org/software/colord/; - license = stdenv.lib.licenses.lgpl2Plus; - maintainers = [stdenv.lib.maintainers.marcweber]; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl2Plus; + maintainers = [ maintainers.marcweber ]; + platforms = platforms.linux; }; } diff --git a/nixpkgs/pkgs/tools/misc/colord/installed-tests-path.patch b/nixpkgs/pkgs/tools/misc/colord/installed-tests-path.patch new file mode 100644 index 000000000000..6d91cbbcb022 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/colord/installed-tests-path.patch @@ -0,0 +1,72 @@ +diff --git a/data/tests/meson.build b/data/tests/meson.build +index 8b38f10..250582c 100644 +--- a/data/tests/meson.build ++++ b/data/tests/meson.build +@@ -17,6 +17,6 @@ if get_option('installed_tests') + 'test.ccss', + 'test.sp', + ], +- install_dir: join_paths(libexecdir, 'installed-tests', 'colord') ++ install_dir: join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord') + ) + endif +diff --git a/lib/colord/cd-test-shared.c b/lib/colord/cd-test-shared.c +index c3b9d23..7577e13 100644 +--- a/lib/colord/cd-test-shared.c ++++ b/lib/colord/cd-test-shared.c +@@ -45,7 +45,8 @@ cd_test_get_filename (const gchar *filename) + + /* running in the installed system */ + if (g_getenv ("INSTALLED_TESTS") != NULL) { +- return g_build_filename (LIBEXECDIR, ++ return g_build_filename ("@installed_tests_dir@", ++ "libexec", + "installed-tests", + PACKAGE_NAME, + filename, +diff --git a/lib/colord/meson.build b/lib/colord/meson.build +index 61f0518..df71358 100644 +--- a/lib/colord/meson.build ++++ b/lib/colord/meson.build +@@ -214,20 +214,20 @@ endif + if get_option('installed_tests') + con2 = configuration_data() + con2.set('installedtestsdir', +- join_paths(libexecdir, 'installed-tests', 'colord')) ++ join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord')) + configure_file( + input : 'colord-daemon.test.in', + output : 'colord-daemon.test', + configuration : con2, + install: true, +- install_dir: join_paths('share', 'installed-tests', 'colord'), ++ install_dir: join_paths('@installed_tests_dir@', 'share', 'installed-tests', 'colord'), + ) + configure_file( + input : 'colord-private.test.in', + output : 'colord-private.test', + configuration : con2, + install: true, +- install_dir: join_paths('share', 'installed-tests', 'colord'), ++ install_dir: join_paths('@installed_tests_dir@', 'share', 'installed-tests', 'colord'), + ) + endif + +@@ -254,7 +254,7 @@ if get_option('tests') + '-DTESTDATADIR="' + testdatadir + '"', + ], + install : get_option('installed_tests'), +- install_dir : join_paths(libexecdir, 'installed-tests', 'colord'), ++ install_dir : join_paths('@installed_tests_dir@','libexec', 'installed-tests', 'colord'), + ) + test('colord-test-private', e) + e = executable( +@@ -278,7 +278,7 @@ if get_option('tests') + '-DTESTDATADIR="' + testdatadir + '"', + ], + install : get_option('installed_tests'), +- install_dir : join_paths(libexecdir, 'installed-tests', 'colord'), ++ install_dir : join_paths('@installed_tests_dir@', 'libexec', 'installed-tests', 'colord'), + ) + test('colord-test-daemon', e) + endif diff --git a/nixpkgs/pkgs/tools/misc/ffsend/default.nix b/nixpkgs/pkgs/tools/misc/ffsend/default.nix new file mode 100644 index 000000000000..dba608f41af9 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/ffsend/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl +, darwin +}: + +with rustPlatform; + +buildRustPackage rec { + name = "ffsend-${version}"; + version = "0.2.36"; + + src = fetchFromGitLab { + owner = "timvisee"; + repo = "ffsend"; + rev = "v${version}"; + sha256 = "0k2sl1f5isxj8qajmhf36xh6k9j9qq7nkqm27wfm3gvc6b4flk0r"; + }; + + cargoSha256 = "1l4060kawba56gxsngba2yjshhaygrs17k1msjbj38vrg07zrnbp"; + + # Note: On Linux, the clipboard feature requires `xclip` to be in the `PATH`. Ideally we'd + # depend on `xclip` and patch the source to run `xclip` from the Nix store instead of from `PATH`. + # However, as I use macOS and not Linux, I'm not inclined to maintain a patch like that, nor do I + # have a means to test it. To that end, we'll just leave the clipboard feature enabled and + # trust that users that want to copy links to their clipboard will install `xclip` into their + # profile. + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ openssl ] + ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ]) + ; + + postInstall = '' + mkdir -p $out/share/zsh/site-functions + cp contrib/completions/zsh/_ffsend $out/share/zsh/site-functions/_ffsend + ''; + + meta = with stdenv.lib; { + description = "Easily and securely share files from the command line. A fully featured Firefox Send client"; + longDescription = '' + Easily and securely share files and directories from the command line through a safe, private + and encrypted link using a single simple command. Files are shared using the Send service and + may be up to 2GB. Others are able to download these files with this tool, or through their + web browser. + ''; + homepage = https://gitlab.com/timvisee/ffsend; + license = licenses.gpl3; + maintainers = [ maintainers.lilyball ]; + platforms = platforms.darwin ++ platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/tools/misc/kanshi/default.nix b/nixpkgs/pkgs/tools/misc/kanshi/default.nix new file mode 100644 index 000000000000..8909a0c0eb5a --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/kanshi/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, udev }: +rustPlatform.buildRustPackage +{ + pname = "kanshi-unstable"; + version = "2019-02-02"; + + src = fetchFromGitHub { + owner = "emersion"; + repo = "kanshi"; + rev = "970267e400c21a6bb51a1c80a0aadfd1e6660a7b"; + sha256 = "10lfdan86bmwazpma6ixnv46z9cnf879gxln8gx87v7a1x3ss0bh"; + }; + + buildInputs = [ pkgconfig udev ]; + + cargoSha256 = "sha256:0lf1zfmq9ypxk86ma0n4nczbklmjs631wdzfx4wd3cvhghyr8nkq"; + + meta = { + description = "Dynamic display configuration tool"; + longDescription = + '' + Kanshi uses a configuration file and a list of available displays to choose + the right settings for each display. It's useful if your window manager + doesn't support multiple display configurations (e.g. i3/Sway). + + For now, it only supports: + - sysfs as backend + - udev as notifier (optional) + - Configuration file + - GNOME (~/.config/monitors.xml) + - Kanshi (see below) + - Sway as frontend + ''; + homepage = "https://github.com/emersion/kanshi"; + downloadPage = "https://github.com/emersion/kanshi"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.balsoft ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/tools/misc/lsd/default.nix b/nixpkgs/pkgs/tools/misc/lsd/default.nix index 6ecca1631fe5..78dba7e3a6f0 100644 --- a/nixpkgs/pkgs/tools/misc/lsd/default.nix +++ b/nixpkgs/pkgs/tools/misc/lsd/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, rustPlatform }: rustPlatform.buildRustPackage rec { - name = "lsd-${version}"; - version = "0.13.0"; + pname = "lsd"; + version = "0.14.0"; src = fetchFromGitHub { owner = "Peltoche"; repo = "lsd"; rev = version; - sha256 = "0s0pgnhzhkjm78cp12jscpld0m2mslin5yb273wzdvx4wax2s17z"; + sha256 = "1k054c4mz0z9knfn7kvvs3305z2g2w44l0cjg4k3cax06ic1grlr"; }; cargoSha256 = "0pg4wsk2qaljrqklnl5p3iv83314wmybyxsn1prvsjsl4b64mil9"; @@ -19,6 +19,9 @@ rustPlatform.buildRustPackage rec { install -Dm644 -t $out/share/bash-completion/completions/ target/release/build/lsd-*/out/lsd.bash ''; + # Some tests fail, but Travis ensures a proper build + doCheck = false; + meta = with stdenv.lib; { homepage = https://github.com/Peltoche/lsd; description = "The next gen ls command"; diff --git a/nixpkgs/pkgs/tools/misc/megacli/default.nix b/nixpkgs/pkgs/tools/misc/megacli/default.nix index b91c7d2378bb..36c09d2b1c9f 100644 --- a/nixpkgs/pkgs/tools/misc/megacli/default.nix +++ b/nixpkgs/pkgs/tools/misc/megacli/default.nix @@ -1,27 +1,34 @@ { stdenv, rpmextract, ncurses5, patchelf, makeWrapper, requireFile, unzip }: stdenv.mkDerivation rec { - name = "megacli-8.07.07"; + name = "megacli-${version}"; + version = "8.07.14"; src = requireFile { - name = "8.07.07_MegaCLI.zip"; - url = http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.07.07_MegaCLI.zip; - sha256 = "11jzvh25mlygflazd37gi05xv67im4rgq7sbs5nwgw3gxdh4xfjj"; + name = "${builtins.replaceStrings ["."] ["-"] version}_MegaCLI.zip"; + url = https://docs.broadcom.com/docs/12351587; + sha256 = "1sdn58fbmd3fj4nzbajq3gcyw71ilgdh45r5p4sa6xmb7np55cfr"; }; - buildInputs = [rpmextract ncurses5 unzip makeWrapper]; + buildInputs = [rpmextract ncurses5 unzip]; libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ncurses5 ]; buildCommand = '' - mkdir -p $out/bin - cd $out unzip ${src} - rpmextract linux/MegaCli-8.07.07-1.noarch.rpm - ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib opt/MegaRAID/MegaCli/MegaCli64 - wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64 + rpmextract Linux/MegaCli-${version}-1.noarch.rpm + + mkdir -p $out/{bin,share/MegaRAID/MegaCli} + cp -r opt $out + cp ${version}_MegaCLI.txt $out/share/MegaRAID/MegaCli + + ${patchelf}/bin/patchelf \ + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib \ + $out/opt/MegaRAID/MegaCli/MegaCli64 + ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64 eval fixupPhase ''; diff --git a/nixpkgs/pkgs/tools/misc/odyssey/default.nix b/nixpkgs/pkgs/tools/misc/odyssey/default.nix new file mode 100644 index 000000000000..13958332138d --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/odyssey/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, cmake, openssl }: + +stdenv.mkDerivation rec { + pname = "odyssey"; + version = "unstable-2019-03-12"; + + src = fetchFromGitHub { + owner = "yandex"; + repo = pname; + rev = "af015839b03f30260c75d8f565521910c0694ed6"; + sha256 = "1cnnypvk78wp1qmqfriky40ls0grkp4v46mypyaq5kl8ppknvnvs"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ openssl ]; + + installPhase = '' + install -Dm755 -t $out/bin sources/odyssey + ''; + + meta = with stdenv.lib; { + description = "Scalable PostgreSQL connection pooler"; + homepage = https://github.com/yandex/odyssey; + license = licenses.bsd3; + maintainers = [ maintainers.marsam ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/tools/networking/davix/default.nix b/nixpkgs/pkgs/tools/networking/davix/default.nix index 3be2b0401bc4..74aa30bb95e0 100644 --- a/nixpkgs/pkgs/tools/networking/davix/default.nix +++ b/nixpkgs/pkgs/tools/networking/davix/default.nix @@ -1,22 +1,24 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, openssl, libxml2, boost }: +{ stdenv, fetchurl, cmake, pkgconfig, openssl, libxml2, boost, python3, libuuid }: stdenv.mkDerivation rec { - name = "davix-0.6.4"; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ stdenv cmake openssl libxml2 boost ]; + version = "0.7.2"; + name = "davix-${version}"; + nativeBuildInputs = [ cmake pkgconfig python3 ]; + buildInputs = [ openssl libxml2 boost libuuid ]; - src = fetchFromGitHub { - owner = "cern-it-sdc-id"; - repo = "davix"; - rev = "R_0_6_4"; - sha256 = "10hg7rs6aams96d4ghldgkrrnikskdpmn8vy6hj5j0s17a2yms6q"; + # using the url below since the 0.7.2 release did carry a broken CMake file, + # supposedly fixed in the next release + # https://github.com/cern-fts/davix/issues/40 + src = fetchurl { + url = "http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/${version}/davix-${version}.tar.gz"; + sha256 = "1w1q7r6r5j5f23ra4qhx3x29w9z9xal23c2azazpfmcz88hkkmhz"; }; meta = with stdenv.lib; { description = "Toolkit for Http-based file management"; - longDescription = "Davix is a toolkit designed for file + longDescription = "Davix is a toolkit designed for file operations with Http based protocols (WebDav, Amazon S3, ...). Davix provides an API and a set of command line tools"; @@ -24,6 +26,6 @@ stdenv.mkDerivation rec { homepage = http://dmc.web.cern.ch/projects/davix/home; maintainers = [ maintainers.adev ]; platforms = platforms.all; - }; + }; } diff --git a/nixpkgs/pkgs/tools/networking/mitmproxy/default.nix b/nixpkgs/pkgs/tools/networking/mitmproxy/default.nix index d06399169707..ee331648e75f 100644 --- a/nixpkgs/pkgs/tools/networking/mitmproxy/default.nix +++ b/nixpkgs/pkgs/tools/networking/mitmproxy/default.nix @@ -22,6 +22,26 @@ buildPythonPackage rec { url = "https://github.com/mitmproxy/mitmproxy/commit/1b6a8d6acd3d70f9b9627ad4ae9def08103f8250.patch"; sha256 = "03y79c25yir7d8xj79czdc81y3irqq1i3ks9ca0mv1az8b7xsvfv"; }) + (fetchpatch { + # 0.13 <= wsproto < 0.14 patch + # https://github.com/mitmproxy/mitmproxy/issues/3459 + # TODO: remove on next update + name = "wsproto-0.13.patch"; + url = https://github.com/mitmproxy/mitmproxy/commit/70777a1b6ed64af9cafcdef223a8a260ecc96864.patch; + sha256 = "1ddxdr7js510kzyq3gyks4k5k1n8zb1i9amxw7wzmi1dcg8kqw9a"; + # We strip these bounds anyway + excludes = [ "setup.py" ]; + }) + (fetchpatch { + # Fix for newer pytest disallowing calling fixtures + # https://github.com/mitmproxy/mitmproxy/issues/3403 + # TODO: remove on next update + name = "dont-call-fixtures.patch"; + url = https://github.com/mitmproxy/mitmproxy/commit/ce28721458c8cc71de86513a5110676e9763041b.patch; + sha256 = "05pljr28lx7l1xgswqr9sz8dnhvc7npzh8xg2p9hignf159kd54d"; + # Irrelevant in nixpkgs + excludes = [ "setup.py" "setup.cfg" "release/docker/*" ]; + }) ]; postPatch = '' diff --git a/nixpkgs/pkgs/tools/networking/ngrok-2/default.nix b/nixpkgs/pkgs/tools/networking/ngrok-2/default.nix index fdf9067dfee9..da598c6fbd5e 100644 --- a/nixpkgs/pkgs/tools/networking/ngrok-2/default.nix +++ b/nixpkgs/pkgs/tools/networking/ngrok-2/default.nix @@ -1,25 +1,32 @@ -{ stdenv, fetchurl, unzip }: +{ stdenv, fetchurl }: with stdenv.lib; -stdenv.mkDerivation rec { +let versions = builtins.fromJSON (builtins.readFile ./versions.json); + arch = if stdenv.isi686 then "386" + else if stdenv.isx86_64 then "amd64" + else if stdenv.isAarch64 then "arm64" + else if stdenv.isArm then "arm" + else throw "Unsupported architecture"; + os = if stdenv.isLinux then "linux" + else if stdenv.isDarwin then "darwin" + else throw "Unsupported os"; + versionInfo = versions."${os}-${arch}"; + inherit (versionInfo) version sha256 url; + +in +stdenv.mkDerivation { name = "ngrok-${version}"; - version = "2.2.8"; - - src = if stdenv.isLinux && stdenv.isi686 then fetchurl { - url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-i386.tgz"; - sha256 = "0s5ymlaxrvm13q3mlvfirh74sx60qh56c5sgdma2r7q5qlsq41xg"; - } else if stdenv.isLinux && stdenv.isx86_64 then fetchurl { - url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz"; - sha256 = "1mn9iwgy6xzrjihikwc2k2j59igqmph0cwx17qp0ziap9lp5xxad"; - } else if stdenv.isDarwin then fetchurl { - url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip"; - sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh"; - } else throw "platform ${stdenv.hostPlatform.system} not supported!"; + version = "${version}"; + + # run ./update + src = fetchurl { inherit sha256 url; }; sourceRoot = "."; - nativeBuildInputs = optional stdenv.isDarwin unzip; + unpackPhase = "cp $src ngrok"; + + buildPhase = "chmod a+x ngrok"; installPhase = '' install -D ngrok $out/bin/ngrok @@ -32,7 +39,7 @@ stdenv.mkDerivation rec { ''; homepage = https://ngrok.com/; license = licenses.unfree; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; + platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; maintainers = [ maintainers.bobvanderlinden ]; }; } diff --git a/nixpkgs/pkgs/tools/networking/ngrok-2/update b/nixpkgs/pkgs/tools/networking/ngrok-2/update new file mode 100755 index 000000000000..62b0c7e545e9 --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/ngrok-2/update @@ -0,0 +1,40 @@ +#!/usr/bin/env nix-shell +#!nix-shell -p httpie +#!nix-shell -p jq +#!nix-shell -i bash + +set -eu -o pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" + +get_download_info() { + echo '{ "sys": "'"$1-$2"'", "response": ' + http --body \ + https://update.equinox.io/check \ + 'Accept:application/json; q=1; version=1; charset=utf-8' \ + 'Content-Type:application/json; charset=utf-8' \ + app_id=app_goVRodbMVm \ + channel=stable \ + os=$1 \ + goarm= \ + arch=$2 + +# target_version=2.2.8 \ + + echo "}" +} + +( + echo "[" + get_download_info linux 386 + echo "," + get_download_info linux amd64 + echo "," + get_download_info linux arm + echo "," + get_download_info linux arm64 + # echo "," + # get_download_info darwin 386 + echo "," + get_download_info darwin amd64 + echo "]" +) | jq 'map ({ (.sys): { "sys": .sys, "url": .response.download_url, "sha256": .response.checksum, "version": .response.release.version } }) | add' >versions.json diff --git a/nixpkgs/pkgs/tools/networking/ngrok-2/versions.json b/nixpkgs/pkgs/tools/networking/ngrok-2/versions.json new file mode 100644 index 000000000000..3d7aa8a56b6c --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/ngrok-2/versions.json @@ -0,0 +1,32 @@ +{ + "linux-386": { + "sys": "linux-386", + "url": "https://bin.equinox.io/a/jqJ2Vvh67gW/ngrok-2.3.18-linux-386", + "sha256": "2bebb8f39a3c19ca03eaf786b97c92876216d2297046e85271478edef2cd6404", + "version": "2.3.18" + }, + "linux-amd64": { + "sys": "linux-amd64", + "url": "https://bin.equinox.io/a/ik4d9aurG9/ngrok-2.3.18-linux-amd64", + "sha256": "75e19c343a208bf0e2d3b613d2fa3ce67abbf25c04a1d6be670598a4c25c1694", + "version": "2.3.18" + }, + "linux-arm": { + "sys": "linux-arm", + "url": "https://bin.equinox.io/a/c2KRZoJ5cb6/ngrok-2.3.18-linux-arm", + "sha256": "af4cdb9f116104921d7fbeeac9124e545a45495b3623b2b46da996400c305d9c", + "version": "2.3.18" + }, + "linux-arm64": { + "sys": "linux-arm64", + "url": "https://bin.equinox.io/a/b2NBP9tpq2E/ngrok-2.3.18-linux-arm64", + "sha256": "9e5fa5b83dc65803291b59867c664085de248a4adb3d415c4dbba1dae90a0aaf", + "version": "2.3.18" + }, + "darwin-amd64": { + "sys": "darwin-amd64", + "url": "https://bin.equinox.io/a/879TXbRQQRV/ngrok-2.3.18-darwin-amd64", + "sha256": "abb643bdba7ade5dabd60488b866804d814a41d4d7144fa09e01c9260e93659d", + "version": "2.3.18" + } +} diff --git a/nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix b/nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix new file mode 100644 index 000000000000..6a024b72f73e --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/shadowsocks-rust/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, libsodium, Security }: + +rustPlatform.buildRustPackage rec { + pname = "shadowsocks-rust"; + version = "1.7.0"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "shadowsocks"; + repo = pname; + sha256 = "0mqjm54mp6c9mfdl3gf01v9vm2rjll8fw63n6j4qgv01y4hrsm4f"; + }; + + cargoSha256 = "1m0p40z6qx6s0r1x6apz56n2s4ppn8b2cff476xrfhp6s1j046q7"; + + buildInputs = [ openssl libsodium ] + ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkgconfig ]; + + # tries to read /etc/resolv.conf, hence fails in sandbox + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/shadowsocks/shadowsocks-rust; + description = "A Rust port of shadowsocks"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nixpkgs/pkgs/tools/networking/tayga/default.nix b/nixpkgs/pkgs/tools/networking/tayga/default.nix new file mode 100644 index 000000000000..97bcbdc999eb --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/tayga/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "0.9.2"; + pname = "tayga"; + + src = fetchurl { + url= "http://www.litech.org/${pname}/${pname}-${version}.tar.bz2"; + sha256 = "1700y121lhvpna49bjpssb7jq1abj9qw5wxgjn8gzp6jm4kpj7rb"; + }; + + meta = with stdenv.lib; { + description = "Userland stateless NAT64 daemon"; + longDescription = '' + TAYGA is an out-of-kernel stateless NAT64 implementation + for Linux that uses the TUN driver to exchange IPv4 and + IPv6 packets with the kernel. + It is intended to provide production-quality NAT64 service + for networks where dedicated NAT64 hardware would be overkill. + ''; + homepage = http://www.litech.org/tayga; + license = licenses.gpl2; + maintainers = [ maintainers."0x4A6F" ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/tools/security/mpw/default.nix b/nixpkgs/pkgs/tools/security/mpw/default.nix index 0994c649c83e..4cff17ef8495 100644 --- a/nixpkgs/pkgs/tools/security/mpw/default.nix +++ b/nixpkgs/pkgs/tools/security/mpw/default.nix @@ -1,38 +1,61 @@ -{ stdenv, cmake, fetchFromGitHub, ncurses, libsodium, json_c }: +{ stdenv, cmake, fetchFromGitLab +, json_c, libsodium, libxml2, ncurses }: -stdenv.mkDerivation rec { - name = "mpw-2.6-f8043ae"; +let + rev = "22796663dcad81684ab24308d9db570f6781ba2c"; - src = fetchFromGitHub { - owner = "Lyndir"; - repo = "MasterPassword"; - rev = "f8043ae16d73ddfb205aadd25c35cd9c5e95b228"; - sha256 = "0hy02ri7y3sca85z3ff5i68crwav5cjd7rrdqj7jrnpp1bw4yapi"; +in stdenv.mkDerivation rec { + name = "mpw-${version}-${builtins.substring 0 8 rev}"; + version = "2.6"; + + src = fetchFromGitLab { + owner = "MasterPassword"; + repo = "MasterPassword"; + sha256 = "1f2vqacgbyam1mazawrfim8zwp38gnwf5v3xkkficsfnv789g6fw"; + inherit rev; }; - postUnpack = '' - sourceRoot+=/platform-independent/cli-c - ''; + sourceRoot = "./source/platform-independent/c/cli"; - preConfigure = '' - substituteInPlace CMakeLists.txt --replace curses ncurses - echo ${name} > VERSION + postPatch = '' + rm build + substituteInPlace mpw-cli-tests \ + --replace '/usr/bin/env bash' ${stdenv.shell} \ + --replace ./mpw ./build/mpw ''; - dontUseCmakeBuildDir = true; + cmakeFlags = [ + "-Dmpw_version=${version}" + "-DBUILD_MPW_TESTS=ON" + ]; nativeBuildInputs = [ cmake ]; - buildInputs = [ ncurses libsodium json_c ]; + buildInputs = [ json_c libxml2 libsodium ncurses ]; installPhase = '' - mkdir -p $out/bin - mv mpw $out/bin/mpw + runHook preInstall + + install -Dm755 mpw $out/bin/mpw + install -Dm644 ../mpw.completion.bash $out/share/bash-completion/completions/_mpw + install -Dm644 ../../../../README.md $out/share/doc/mpw/README.md + + runHook postInstall + ''; + + doCheck = true; + + checkPhase = '' + runHook preCheck + + ../mpw-cli-tests + + runHook postCheck ''; meta = with stdenv.lib; { - homepage = https://masterpasswordapp.com/; description = "A stateless password management solution"; + homepage = https://masterpasswordapp.com/; license = licenses.gpl3; platforms = platforms.unix; }; diff --git a/nixpkgs/pkgs/tools/security/nmap/default.nix b/nixpkgs/pkgs/tools/security/nmap/default.nix index 09423a96ef96..bd5930909659 100644 --- a/nixpkgs/pkgs/tools/security/nmap/default.nix +++ b/nixpkgs/pkgs/tools/security/nmap/default.nix @@ -5,6 +5,7 @@ , withPython ? false # required for the `ndiff` binary , python2Packages ? null , makeWrapper ? null +, withLua ? true }: assert withPython -> python2Packages != null; @@ -35,7 +36,9 @@ in stdenv.mkDerivation rec { --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"' ''; - configureFlags = [ "--with-liblua=${lua5_3}" ] + configureFlags = [ + (if withLua then "--with-liblua=${lua5_3}" else "--without-liblua") + ] ++ optional (!pythonSupport) "--without-ndiff" ++ optional (!graphicalSupport) "--without-zenmap" ; diff --git a/nixpkgs/pkgs/tools/system/hardinfo/default.nix b/nixpkgs/pkgs/tools/system/hardinfo/default.nix index 0c6f812cb3e7..63a72aac79f2 100644 --- a/nixpkgs/pkgs/tools/system/hardinfo/default.nix +++ b/nixpkgs/pkgs/tools/system/hardinfo/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo + substituteInPlace ./arch/linux/common/os.h --replace /lib/libc.so.6 ${stdenv.glibc.out}/lib/libc.so.6 ''; # Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/). diff --git a/nixpkgs/pkgs/tools/text/csvkit/default.nix b/nixpkgs/pkgs/tools/text/csvkit/default.nix new file mode 100644 index 000000000000..1ff9cee241c6 --- /dev/null +++ b/nixpkgs/pkgs/tools/text/csvkit/default.nix @@ -0,0 +1,30 @@ +{ lib, python3, glibcLocales }: + +python3.pkgs.buildPythonApplication rec { + pname = "csvkit"; + version = "1.0.3"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + agate agate-excel agate-dbf agate-sql six + ]; + + checkInputs = with python3.pkgs; [ + glibcLocales nose + ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests -e test_csvsql + ''; + + meta = with lib; { + description = "A suite of command-line tools for converting to and working with CSV"; + maintainers = with maintainers; [ vrthra ]; + license = licenses.mit; + homepage = https://github.com/wireservice/csvkit; + }; +} diff --git a/nixpkgs/pkgs/tools/text/highlight/default.nix b/nixpkgs/pkgs/tools/text/highlight/default.nix index c2fe3fcd5761..26e09dd7efa3 100644 --- a/nixpkgs/pkgs/tools/text/highlight/default.nix +++ b/nixpkgs/pkgs/tools/text/highlight/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; preConfigure = '' - makeFlags="PREFIX=$out conf_dir=$out/etc/highlight/" + makeFlags="PREFIX=$out conf_dir=$out/etc/highlight/ CXX=$CXX AR=$AR" ''; meta = with stdenv.lib; { diff --git a/nixpkgs/pkgs/tools/typesetting/tex/texlive/bin.nix b/nixpkgs/pkgs/tools/typesetting/tex/texlive/bin.nix index 4845c3703dc3..04461a825ee1 100644 --- a/nixpkgs/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/nixpkgs/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -175,7 +175,7 @@ core = stdenv.mkDerivation rec { description = "Basic binaries for TeX Live"; homepage = http://www.tug.org/texlive; license = stdenv.lib.licenses.gpl2; - maintainers = with maintainers; [ vcunat lovek323 raskin jwiegley ]; + maintainers = with maintainers; [ vcunat veprbl lovek323 raskin jwiegley ]; platforms = platforms.all; }; }; diff --git a/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix b/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix index 870c1953e987..23aca98ec81c 100644 --- a/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/nixpkgs/pkgs/tools/typesetting/tex/texlive/default.nix @@ -170,7 +170,7 @@ in platforms = lib.platforms.all; hydraPlatforms = lib.optionals (lib.elem pname ["scheme-small" "scheme-basic"]) platforms; - maintainers = [ lib.maintainers.vcunat ]; + maintainers = with lib.maintainers; [ vcunat veprbl ]; } (combine { ${pname} = attrs; |