diff options
Diffstat (limited to 'pkgs/development/tools/misc')
17 files changed, 350 insertions, 33 deletions
diff --git a/pkgs/development/tools/misc/aviator/default.nix b/pkgs/development/tools/misc/aviator/default.nix new file mode 100644 index 00000000000..66b2ae45035 --- /dev/null +++ b/pkgs/development/tools/misc/aviator/default.nix @@ -0,0 +1,23 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "aviator"; + version = "1.8.1"; + + src = fetchFromGitHub { + owner = "herrjulz"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Oa4z8n+q7LKWMnwk+xj9UunzOa3ChaPBCTo828yYJGQ="; + }; + + deleteVendor = true; + vendorSha256 = "sha256-rYOphvI1ZE8X5UExfgxHnWBn697SDkNnmxeY7ihIZ1s="; + + meta = with lib; { + description = "Merge YAML/JSON files in a in a convenient fashion"; + homepage = "https://github.com/herrjulz/aviator"; + license = licenses.mit; + maintainers = with maintainers; [ risson ]; + }; +} diff --git a/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch b/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch new file mode 100644 index 00000000000..c166066c980 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch @@ -0,0 +1,26 @@ +X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Felf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721 + +diff --git a/bfd/elf.c b/bfd/elf.c +index 36733e080dd..af62aadc3d4 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -2454,6 +2454,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) + "for section %pA found - ignoring"), + abfd, name, target_sect); + } ++ else ++ esdt->has_secondary_relocs = TRUE; + goto success; + } + +@@ -12587,6 +12589,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, + #endif + r_sym = elf32_r_sym; + ++ if (!elf_section_data (sec)->has_secondary_relocs) ++ return TRUE; ++ + /* Discover if there are any secondary reloc sections + associated with SEC. */ + for (relsec = abfd->sections; relsec != NULL; relsec = relsec->next) + diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index a4233886a85..7a06e290a96 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -61,6 +61,15 @@ stdenv.mkDerivation { # cross-compiling. ./always-search-rpath.patch + # Fix quadratic slowdown in `strip` performance. + # See #129467 and https://sourceware.org/bugzilla/show_bug.cgi?id=28058 + # Remove when we're on binutils > 2.36.1. + # The patch is downloaded from + # https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd/elf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721 + # which is the 2.36 backport (using `TRUE` instead of `true` of binutils master commit: + # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=956ea65cd707707c0f725930214cbc781367a831 + ./bfd-elf-Dont-read-non-existing-secondary-relocs.patch + ./CVE-2020-35448.patch ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch ++ # This patch was suggested by Nick Clifton to fix diff --git a/pkgs/development/tools/misc/chruby/default.nix b/pkgs/development/tools/misc/chruby/default.nix index bcc0687f55b..1aef6d52075 100644 --- a/pkgs/development/tools/misc/chruby/default.nix +++ b/pkgs/development/tools/misc/chruby/default.nix @@ -19,8 +19,6 @@ in stdenv.mkDerivation rec { sha256 = "1894g6fymr8kra9vwhbmnrcr58l022mcd7g9ans4zd3izla2j3gx"; }; - phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ]; - patches = lib.optionalString (rubies != null) [ ./env.patch ]; diff --git a/pkgs/development/tools/misc/coccinelle/default.nix b/pkgs/development/tools/misc/coccinelle/default.nix index 8534f1e2d85..2d9aa55ed05 100644 --- a/pkgs/development/tools/misc/coccinelle/default.nix +++ b/pkgs/development/tools/misc/coccinelle/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, lib, stdenv, python, ncurses, ocamlPackages, pkg-config }: +{ fetchurl, lib, stdenv, python3, ncurses, ocamlPackages, pkg-config }: stdenv.mkDerivation rec { pname = "coccinelle"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = with ocamlPackages; [ ocaml findlib menhir ocaml_pcre parmap stdcompat - python ncurses pkg-config + python3 ncurses pkg-config ]; doCheck = false; diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index ca50deb504d..ecb198d7248 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -10,14 +10,22 @@ stdenv.mkDerivation rec { buildInputs = [motif ncurses libX11 libXt]; configureFlags = [ "--with-x" ]; - patches = [ ./gcc44.patch ]; + patches = [ + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 + ./gcc44.patch + ]; NIX_CFLAGS_COMPILE = "-fpermissive"; + postInstall = '' + install -D icons/ddd.xpm $out/share/pixmaps/ddd.xpm + ''; + meta = { homepage = "https://www.gnu.org/software/ddd"; description = "Graphical front-end for command-line debuggers"; - license = lib.licenses.gpl2; + license = lib.licenses.gpl3Plus; platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ angustrau ]; }; } diff --git a/pkgs/development/tools/misc/distcc/masq.nix b/pkgs/development/tools/misc/distcc/masq.nix index 2387ab1bd41..27840481a10 100644 --- a/pkgs/development/tools/misc/distcc/masq.nix +++ b/pkgs/development/tools/misc/distcc/masq.nix @@ -3,7 +3,8 @@ stdenv.mkDerivation { name = "distcc-masq-${gccRaw.name}"; - phases = [ "installPhase" ]; + dontUnpack = true; + installPhase = '' mkdir -p $out/bin diff --git a/pkgs/development/tools/misc/luarocks/luarocks-nix.nix b/pkgs/development/tools/misc/luarocks/luarocks-nix.nix index 30e02a3623f..6e55292722f 100644 --- a/pkgs/development/tools/misc/luarocks/luarocks-nix.nix +++ b/pkgs/development/tools/misc/luarocks/luarocks-nix.nix @@ -5,7 +5,7 @@ luarocks.overrideAttrs(old: { src = fetchFromGitHub { owner = "nix-community"; repo = "luarocks-nix"; - rev = "v3.5.0_nix"; - sha256 = "sha256-Ea3PVkCaUPO/mvVZtHtD1G9T/Yom28M9oN6duY4ovHk="; + rev = "nix_v3.5.0-1"; + sha256 = "sha256-jcgshxAuuc8QizpYL/2K3PKYWiKsnF/8BJAUaryvEvQ="; }; }) diff --git a/pkgs/development/tools/misc/msitools/default.nix b/pkgs/development/tools/misc/msitools/default.nix index ab196ebc5b3..84a9a1135b5 100644 --- a/pkgs/development/tools/misc/msitools/default.nix +++ b/pkgs/development/tools/misc/msitools/default.nix @@ -59,7 +59,8 @@ stdenv.mkDerivation rec { bzip2 ]; - doCheck = true; + # WiX tests fail on darwin + doCheck = !stdenv.isDarwin; postPatch = '' patchShebangs subprojects/bats-core/{bin,libexec} diff --git a/pkgs/development/tools/misc/qtspim/default.nix b/pkgs/development/tools/misc/qtspim/default.nix new file mode 100644 index 00000000000..23d33a9f81c --- /dev/null +++ b/pkgs/development/tools/misc/qtspim/default.nix @@ -0,0 +1,61 @@ +{ lib, stdenv, fetchsvn, wrapQtAppsHook, qtbase, qttools, qmake, bison, flex, ... }: +stdenv.mkDerivation rec { + pname = "qtspim"; + version = "9.1.22"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/spimsimulator/code/"; + rev = "r739"; + sha256 = "1kazfgrbmi4xq7nrkmnqw1280rhdyc1hmr82flrsa3g1b1rlmj1s"; + }; + + postPatch = '' + cd QtSpim + + # Patches from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qtspim + sed -i 's/zero_imm/is_zero_imm/g' parser_yacc.cpp + sed -i 's/^int data_dir/bool data_dir/g' parser_yacc.cpp + sed -i 's/^int text_dir/bool text_dir/g' parser_yacc.cpp + sed -i 's/^int parse_error_occurred/bool parse_error_occurred/g' parser_yacc.cpp + + substituteInPlace QtSpim.pro --replace /usr/lib/qtspim/lib $out/lib + substituteInPlace menu.cpp \ + --replace /usr/lib/qtspim/bin/assistant ${qttools.dev}/bin/assistant \ + --replace /usr/lib/qtspim/help/qtspim.qhc $out/share/help/qtspim.qhc + substituteInPlace ../Setup/qtspim_debian_deployment/qtspim.desktop \ + --replace /usr/bin/qtspim qtspim \ + --replace /usr/lib/qtspim/qtspim.png qtspim + ''; + + nativeBuildInputs = [ wrapQtAppsHook qttools qmake bison flex ]; + buildInputs = [ qtbase ]; + QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}"; + + qmakeFlags = [ + "QtSpim.pro" + "-spec" + "linux-g++" + "CONFIG+=release" + ]; + + installPhase = '' + runHook preInstall + + install -D QtSpim $out/bin/qtspim + install -D ../Setup/qtspim_debian_deployment/copyright $out/share/licenses/qtspim/copyright + install -D ../Setup/qtspim_debian_deployment/qtspim.desktop $out/share/applications/qtspim.desktop + install -D ../Setup/NewIcon48x48.png $out/share/icons/hicolor/48x48/apps/qtspim.png + install -D ../Setup/NewIcon256x256.png $out/share/icons/hicolor/256x256/apps/qtspim.png + cp -r help $out/share/help + + runHook postInstall + ''; + + meta = with lib; { + description = "New user interface for spim, a MIPS simulator"; + homepage = "http://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/misc/spruce/default.nix b/pkgs/development/tools/misc/spruce/default.nix new file mode 100644 index 00000000000..ff95242681b --- /dev/null +++ b/pkgs/development/tools/misc/spruce/default.nix @@ -0,0 +1,23 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "spruce"; + version = "1.28.0"; + + src = fetchFromGitHub { + owner = "geofffranks"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-cNO+6rMQPO1e4Hen8vcFU1FRnnCv2+fDYtXXbuR2UCU="; + }; + + deleteVendor = true; + vendorSha256 = "sha256-5EM4Z9AN1Mjy7DayII0Iu+XrjM9lyUqrScMT/fe43dw="; + + meta = with lib; { + description = "A BOSH template merge tool"; + homepage = "https://github.com/geofffranks/spruce"; + license = licenses.mit; + maintainers = with maintainers; [ risson ]; + }; +} diff --git a/pkgs/development/tools/misc/terraform-ls/default.nix b/pkgs/development/tools/misc/terraform-ls/default.nix index 86afbcc9421..75b75733af6 100644 --- a/pkgs/development/tools/misc/terraform-ls/default.nix +++ b/pkgs/development/tools/misc/terraform-ls/default.nix @@ -2,36 +2,27 @@ buildGoModule rec { pname = "terraform-ls"; - version = "0.19.1"; + version = "0.20.0"; src = fetchFromGitHub { owner = "hashicorp"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ag8Dq3lhLoKE4rgrnWLHtKRHEnw/ytyXI+pRt5CgZJI="; + sha256 = "sha256-G1i5SS1BY+h8qPPjrZ9HCnKX3o2VkwvpeHPNxW6rnuI="; }; - vendorSha256 = "sha256-/lpjlThr6HPkuJ6om9ifBsdsh0x4kVXM6PAonk7GJCY="; + vendorSha256 = "sha256-nRElOa9IQ31Wh01wTFM6pazDYFnmR06vkU4CI8Gx4Vw="; ldflags = [ "-s" "-w" "-X main.version=v${version}" "-X main.prerelease=" ]; - preCheck = '' - # Remove tests that requires networking - rm internal/terraform/exec/exec_test.go - '' + lib.optionalString stdenv.isAarch64 '' - # Not all test failures have tracking issues as HashiCorp do not have - # aarch64 testing infra easily available, see issue 549 below. + # There's a mixture of tests that use networking and several that fail on aarch64 + doCheck = false; - # Remove file that contains `TestLangServer_workspaceExecuteCommand_modules_multiple` - # which fails on aarch64: https://github.com/hashicorp/terraform-ls/issues/549 - rm internal/langserver/handlers/execute_command_modules_test.go - - # `TestModuleManager_ModuleCandidatesByPath` variants fail - rm internal/terraform/module/module_manager_test.go - - # internal/terraform/module/module_ops_queue_test.go:17:15: undefined: testLogger - # internal/terraform/module/watcher_test.go:39:11: undefined: testLogger - # internal/terraform/module/watcher_test.go:79:14: undefined: testLogger - rm internal/terraform/module/{watcher_test,module_ops_queue_test}.go + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/terraform-ls --help + $out/bin/terraform-ls version | grep "v${version}" + runHook postInstallCheck ''; meta = with lib; { diff --git a/pkgs/development/tools/misc/usbsdmux/default.nix b/pkgs/development/tools/misc/usbsdmux/default.nix index ed7a6d8a220..07db23607ce 100644 --- a/pkgs/development/tools/misc/usbsdmux/default.nix +++ b/pkgs/development/tools/misc/usbsdmux/default.nix @@ -2,11 +2,11 @@ python3Packages.buildPythonApplication rec { pname = "usbsdmux"; - version = "0.2.0"; + version = "0.2.1"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "sha256-ydDUSqBTY62iOtWdgrFh2qrO9LMi+OCYIw5reh6uoIA="; + sha256 = "sha256-gCxwR5jxzkH22B6nxBwAd0HpwWMIj/zp5VROJ0IWq7c="; }; # usbsdmux is not meant to be used as an importable module and has no tests diff --git a/pkgs/development/tools/misc/watson-ruby/default.nix b/pkgs/development/tools/misc/watson-ruby/default.nix index 23ec0643d77..4d17680471d 100644 --- a/pkgs/development/tools/misc/watson-ruby/default.nix +++ b/pkgs/development/tools/misc/watson-ruby/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "watson-ruby"; version = (import ./gemset.nix).watson-ruby.version; - phases = [ "installPhase" ]; + dontUnpack = true; installPhase = let env = bundlerEnv { diff --git a/pkgs/development/tools/misc/xspim/default.nix b/pkgs/development/tools/misc/xspim/default.nix new file mode 100644 index 00000000000..2e6e3e3eb10 --- /dev/null +++ b/pkgs/development/tools/misc/xspim/default.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchsvn, imake, bison, flex, xlibsWrapper, libXaw, libXpm, ... }: + +stdenv.mkDerivation rec { + pname = "xspim"; + version = "9.1.22"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/spimsimulator/code/"; + rev = "r739"; + sha256 = "1kazfgrbmi4xq7nrkmnqw1280rhdyc1hmr82flrsa3g1b1rlmj1s"; + }; + + nativeBuildInputs = [ imake bison flex ]; + buildInputs = [ xlibsWrapper libXaw libXpm ]; + + preConfigure = '' + cd xspim + xmkmf + ''; + + makeFlags = [ + "BIN_DIR=${placeholder "out"}/bin" + "EXCEPTION_DIR=${placeholder "out"}/share/spim" + "MAN_DIR=${placeholder "out"}/share/man/man1" + ]; + + doCheck = true; + preCheck = '' + pushd ../spim + ''; + postCheck = '' + popd + ''; + + preInstall = '' + mkdir -p $out/share/spim + install -D ../spim/spim $out/bin/spim + install -D ../Documentation/spim.man $out/share/man/man1/spim.1 + install -D ../Documentation/xspim.man $out/share/man/man1/xspim.1 + ''; + + meta = with lib; { + description = "A MIPS32 simulator"; + homepage = "http://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/misc/xxgdb/default.nix b/pkgs/development/tools/misc/xxgdb/default.nix new file mode 100644 index 00000000000..fc0a38ee749 --- /dev/null +++ b/pkgs/development/tools/misc/xxgdb/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchurl, imake, xlibsWrapper, gccmakedep, libXaw }: + +stdenv.mkDerivation rec { + pname = "xxgdb"; + version = "1.12"; + + src = fetchurl { + url = "http://deb.debian.org/debian/pool/main/x/xxgdb/xxgdb_${version}.orig.tar.gz"; + sha256 = "0jwazg99wk2l7r390ggw0yr8xipl07bp0qynni141xss530i6d1a"; + }; + + patches = [ + # http://zhu-qy.blogspot.com.es/2012/11/slackware-14-i-still-got-xxgdb-all-ptys.html + ./xxgdb-pty.patch + ]; + + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ xlibsWrapper libXaw ]; + + preConfigure = '' + mkdir build + xmkmf + ''; + + makeFlags = [ + "DESTDIR=build" + ]; + + postInstall = '' + # Fix up install paths + shopt -s globstar + mv build/**/bin $out/bin + + install -D xxgdb.1 $out/share/man/man1/xxgdb.1 + ''; + + meta = with lib; { + description = "A simple but powerful graphical interface to gdb"; + license = licenses.mit; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch b/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch new file mode 100644 index 00000000000..735bb1b0b5f --- /dev/null +++ b/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch @@ -0,0 +1,84 @@ +--- xxgdb-1.12-org/calldbx.c 2012-10-26 17:17:49.810750909 -0700 ++++ xxgdb-1.12/calldbx.c 2012-10-26 17:53:59.209918816 -0700 +@@ -69,6 +69,12 @@ + * create_io_window(): create an io window for gdb to use + */ + ++#ifdef linux ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -126,6 +132,13 @@ + { + int master; + ++#ifdef _POSIX_SOURCE ++ if ((master = posix_openpt (O_RDWR|O_NOCTTY)) < 0) { ++ perror("posix_openpt failed:"); ++ } else { ++ return master; ++ } ++#else + #ifdef SVR4 /* (MJH) Use STREAMS */ + + if((master = open(MASTER_CLONE, O_RDWR)) < 0) +@@ -152,6 +165,7 @@ + } + #endif + #endif /* SVR4 */ ++#endif /* _POSIX_SOURCE */ + + #ifdef GDB + fprintf(stderr, "xxgdb: all ptys in use\n"); +@@ -167,7 +181,28 @@ + { + int slave; + +-#ifdef SVR4 /* (MJH) */ ++#ifdef _POSIX_SOURCE ++ char *slave_name = ptsname (master); ++ if (slave_name == NULL) { ++ perror ("Pseudo-tty slave"); ++ exit (2); ++ } // end if ++ if (grantpt (master) < 0) { ++ perror ("grantpt error"); ++ exit (3); ++ } ++ if (unlockpt (master) < 0) { ++ perror ("unlockpt error"); ++ exit (4); ++ } ++ if ((slave = open (slave_name, O_RDWR)) < 0) { ++ perror (slave_name); ++ exit (5); ++ } // end if ++ return slave; ++#else ++#ifdef SVR4 ++ /* (MJH) */ + char *slave_name = "unknown"; + extern char *ptsname(int master); + void (*handler)(); +@@ -194,6 +229,7 @@ + } + return slave; + #endif /* SVR4 */ ++#endif /* _POSIX_SOURCE */ + } + + #ifdef CREATE_IO_WINDOW +@@ -230,7 +266,7 @@ + { + /* child */ + /* printf("xterm xterm -l -e xxgdbiowin\n");*/ +- if (execlp("xterm", "xterm", "-e", "xxgdbiowin", 0)) ++ if (execlp("xterm", "xterm", "-e", "xxgdbiowin", NULL)) + { + printf("exec of 'xterm -e xxgdbiowin' fails\n"); + unlink("/tmp/iowindowtty"); |