diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc')
389 files changed, 27083 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/abi-compliance-checker/default.nix b/nixpkgs/pkgs/development/tools/misc/abi-compliance-checker/default.nix new file mode 100644 index 000000000000..c4dda95a7f25 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/abi-compliance-checker/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchFromGitHub, ctags, perl, binutils, abi-dumper }: + +stdenv.mkDerivation rec { + pname = "abi-compliance-checker"; + version = "2.3"; + + src = fetchFromGitHub { + owner = "lvc"; + repo = "abi-compliance-checker"; + rev = version; + sha256 = "1f1f9j2nf9j83sfl2ljadch99v6ha8rq8xm7ax5akc05hjpyckij"; + }; + + buildInputs = [ binutils ctags perl ]; + propagatedBuildInputs = [ abi-dumper ]; + + makeFlags = [ "prefix=$(out)" ]; + + meta = with lib; { + homepage = "https://lvc.github.io/abi-compliance-checker"; + description = "A tool for checking backward API/ABI compatibility of a C/C++ library"; + license = licenses.lgpl21; + maintainers = [ maintainers.bhipple ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/abi-dumper/default.nix b/nixpkgs/pkgs/development/tools/misc/abi-dumper/default.nix new file mode 100644 index 000000000000..6dd2bf41ba6f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/abi-dumper/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, ctags, perl, elfutils, vtable-dumper }: + +stdenv.mkDerivation rec { + pname = "abi-dumper"; + version = "1.2"; + + src = fetchFromGitHub { + owner = "lvc"; + repo = "abi-dumper"; + rev = version; + sha256 = "1i00rfnddrrb9lb1l6ib19g3a76pyasl9lb7rqz2p998gav1gjp2"; + }; + + patchPhase = '' + substituteInPlace abi-dumper.pl \ + --replace eu-readelf ${elfutils}/bin/eu-readelf \ + --replace vtable-dumper ${vtable-dumper}/bin/vtable-dumper \ + --replace '"ctags"' '"${ctags}/bin/ctags"' + ''; + + buildInputs = [ elfutils ctags perl vtable-dumper ]; + + preBuild = "mkdir -p $out"; + makeFlags = [ "prefix=$(out)" ]; + + meta = with lib; { + homepage = "https://github.com/lvc/abi-dumper"; + description = "Dump ABI of an ELF object containing DWARF debug info"; + license = licenses.lgpl21; + maintainers = [ maintainers.bhipple ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/acr/default.nix b/nixpkgs/pkgs/development/tools/misc/acr/default.nix new file mode 100644 index 000000000000..2ddc23f51c3c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/acr/default.nix @@ -0,0 +1,33 @@ +{ lib +, stdenv +, fetchFromGitHub +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "acr"; + version = "2.1.2"; + + src = fetchFromGitHub { + owner = "radareorg"; + repo = "acr"; + rev = finalAttrs.version; + hash = "sha256-xKB9zBw9sX+z/yBzvfIzQPyOHzlCAGfGLyuLGRoyWbg="; + }; + + preConfigure = '' + chmod +x ./autogen.sh && ./autogen.sh + ''; + + meta = { + homepage = "https://github.com/radareorg/acr/"; + description = "Pure shell autoconf replacement"; + longDescription = '' + ACR tries to replace autoconf functionality generating a full-compatible + 'configure' script (runtime flags). But using shell-script instead of + m4. This means that ACR is faster, smaller and easy to use. + ''; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/act/default.nix b/nixpkgs/pkgs/development/tools/misc/act/default.nix new file mode 100644 index 000000000000..4cd859ed3f5f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/act/default.nix @@ -0,0 +1,34 @@ +{ lib +, fetchFromGitHub +, buildGoModule +}: + +buildGoModule rec { + pname = "act"; + version = "0.2.52"; + + src = fetchFromGitHub { + owner = "nektos"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-mw0Ul6m8mgx2I3ExoDs5luN4PQXAI0NADTSYt+DFCs8="; + }; + + vendorHash = "sha256-WoeJ4yB3bTx6I+Ga5X7ZhPfjw3NERp1v/ot5pPsYYLw="; + + doCheck = false; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + ]; + + meta = with lib; { + description = "Run your GitHub Actions locally"; + homepage = "https://github.com/nektos/act"; + changelog = "https://github.com/nektos/act/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ Br1ght0ne kashw2 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/arcanist/default.nix b/nixpkgs/pkgs/development/tools/misc/arcanist/default.nix new file mode 100644 index 000000000000..06c0f700ffe8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/arcanist/default.nix @@ -0,0 +1,88 @@ +{ bison +, cacert +, fetchFromGitHub +, flex +, php +, lib, stdenv +, installShellFiles +, which +, python3 +}: + +# Make a custom wrapper. If `wrapProgram` is used, arcanist thinks .arc-wrapped is being +# invoked and complains about it being an unknown toolset. We could use `makeWrapper`, but +# then we’d need to still craft a script that does the `php libexec/arcanist/bin/...` dance +# anyway... So just do everything at once. +let makeArcWrapper = toolset: '' + cat << WRAPPER > $out/bin/${toolset} + #!$shell -e + export PATH='${php}/bin:${which}/bin'\''${PATH:+':'}\$PATH + exec ${php}/bin/php $out/libexec/arcanist/bin/${toolset} "\$@" + WRAPPER + chmod +x $out/bin/${toolset} +''; + +in +stdenv.mkDerivation { + pname = "arcanist"; + version = "20230530"; + + src = fetchFromGitHub { + owner = "phacility"; + repo = "arcanist"; + rev = "e50d1bc4eabac9c37e3220e9f3fb8e37ae20b957"; + hash = "sha256-u+HRsaCuAAyLrEihrZtLrdZ6NTVjPshieJATK3t5Fo4="; + }; + + patches = [ + ./dont-require-python3-in-path.patch + ./shellcomplete-strlen-null.patch + ]; + + buildInputs = [ php python3 ]; + + nativeBuildInputs = [ bison flex installShellFiles ]; + + postPatch = lib.optionalString stdenv.isAarch64 '' + substituteInPlace support/xhpast/Makefile \ + --replace "-minline-all-stringops" "" + ''; + + buildPhase = '' + runHook preBuild + make cleanall -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES + make xhpast -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/libexec + make install -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES + make cleanall -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES + cp -R . $out/libexec/arcanist + ln -sf ${cacert}/etc/ssl/certs/ca-bundle.crt $out/libexec/arcanist/resources/ssl/default.pem + + ${makeArcWrapper "arc"} + ${makeArcWrapper "phage"} + + $out/bin/arc shell-complete --generate -- + installShellCompletion --cmd arc --bash $out/libexec/arcanist/support/shell/rules/bash-rules.sh + installShellCompletion --cmd phage --bash $out/libexec/arcanist/support/shell/rules/bash-rules.sh + runHook postInstall + ''; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/arc help diff -- > /dev/null + $out/bin/phage help alias -- > /dev/null + ''; + + meta = { + description = "Command line interface to Phabricator"; + homepage = "https://www.phacility.com/"; + license = lib.licenses.asl20; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.thoughtpolice ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/arcanist/dont-require-python3-in-path.patch b/nixpkgs/pkgs/development/tools/misc/arcanist/dont-require-python3-in-path.patch new file mode 100644 index 000000000000..5c127491bb84 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/arcanist/dont-require-python3-in-path.patch @@ -0,0 +1,26 @@ +Don't require python3 in PATH + +Once packaged, the arcanoid.py script has an absolute path shebang to +python3, so there is no need to also require python3 in PATH. + +This prevents leaking in a python3 in PATH in the environment which arc +runs linters etc. + +Author: bjorn.forsman@gmail.com +diff -uNr arcanist.orig/src/workflow/ArcanistAnoidWorkflow.php arcanist.new/src/workflow/ArcanistAnoidWorkflow.php +--- arcanist.orig/src/workflow/ArcanistAnoidWorkflow.php 2022-03-31 13:23:30.865095192 +0200 ++++ arcanist.new/src/workflow/ArcanistAnoidWorkflow.php 2022-04-01 12:19:15.644159639 +0200 +@@ -24,13 +24,6 @@ + } + + public function runWorkflow() { +- if (!Filesystem::binaryExists('python3')) { +- throw new PhutilArgumentUsageException( +- pht( +- 'The "arc anoid" workflow requires "python3" to be available '. +- 'in your $PATH.')); +- } +- + $support_dir = phutil_get_library_root('arcanist'); + $support_dir = dirname($support_dir); + $support_dir = $support_dir.'/support/'; diff --git a/nixpkgs/pkgs/development/tools/misc/arcanist/shellcomplete-strlen-null.patch b/nixpkgs/pkgs/development/tools/misc/arcanist/shellcomplete-strlen-null.patch new file mode 100644 index 000000000000..6911ce074e0c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/arcanist/shellcomplete-strlen-null.patch @@ -0,0 +1,13 @@ +diff --git a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php +index 9c2fcf9a..307231c8 100644 +--- a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php ++++ b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php +@@ -92,7 +92,7 @@ EOTEXT + $argv = $this->getArgument('argv'); + + $is_generate = $this->getArgument('generate'); +- $is_shell = (bool)strlen($this->getArgument('shell')); ++ $is_shell = phutil_nonempty_string($this->getArgument('shell')); + $is_current = $this->getArgument('current'); + + if ($argv) { diff --git a/nixpkgs/pkgs/development/tools/misc/argbash/default.nix b/nixpkgs/pkgs/development/tools/misc/argbash/default.nix new file mode 100644 index 000000000000..bf33e788633e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/argbash/default.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoconf +, makeWrapper +, python3Packages +, runtimeShell +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "argbash"; + version = "2.10.0"; + + src = fetchFromGitHub { + owner = "matejak"; + repo = "argbash"; + rev = finalAttrs.version; + hash = "sha256-G739q6OhsXEldpIxiyOU51AmG4RChMqaN1t2wOy6sPU="; + }; + + postPatch = '' + patchShebangs . + substituteInPlace resources/Makefile \ + --replace '/bin/bash' "${runtimeShell}" + ''; + + nativeBuildInputs = [ + autoconf + makeWrapper + python3Packages.docutils + ]; + + makeFlags = [ + "-C" "resources" + "PREFIX=$(out)" + ]; + + postInstall = '' + wrapProgram $out/bin/argbash \ + --prefix PATH : '${autoconf}/bin' + ''; + + meta = { + homepage = "https://argbash.io/"; + description = "Bash argument parsing code generator"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/astyle/default.nix b/nixpkgs/pkgs/development/tools/misc/astyle/default.nix new file mode 100644 index 000000000000..66e972826cb9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/astyle/default.nix @@ -0,0 +1,26 @@ +{ stdenv, lib, fetchurl, cmake }: + +stdenv.mkDerivation rec { + pname = "astyle"; + version = "3.1"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}_${version}_linux.tar.gz"; + sha256 = "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"; + }; + + # lots of hardcoded references to /usr + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace ' /usr/' " $out/" + ''; + + nativeBuildInputs = [ cmake ]; + + meta = with lib; { + description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java"; + homepage = "https://astyle.sourceforge.net/"; + license = licenses.lgpl3; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autobuild/default.nix b/nixpkgs/pkgs/development/tools/misc/autobuild/default.nix new file mode 100644 index 000000000000..b6970beb8734 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autobuild/default.nix @@ -0,0 +1,36 @@ +{ fetchurl, lib, stdenv, makeWrapper, perl, openssh, rsync }: + +stdenv.mkDerivation rec { + pname = "autobuild"; + version = "5.3"; + + src = fetchurl { + url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz"; + sha256 = "0gv7g61ja9q9zg1m30k4snqwwy1kq7b4df6sb7d2qra7kbdq8af1"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl openssh rsync ]; + + doCheck = true; + + meta = { + description = "Continuous integration tool"; + + longDescription = '' + Autobuild is a package that process output from building + software, primarily focused on packages using Autoconf and + Automake, and then generate a HTML summary file, containing + links to each build log. + + Autobuild can also help you automate building your project on + many systems concurrently. Users with accounts on the + SourceForge compile farms will be able to invoke a parallel + build of their Autoconf/Automake based software, and produce a + summary of the build status, after reading the manual. + ''; + + homepage = "https://josefsson.org/autobuild/"; + license = lib.licenses.gpl2Plus; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf-archive/default.nix b/nixpkgs/pkgs/development/tools/misc/autoconf-archive/default.nix new file mode 100644 index 000000000000..3fbfabcee265 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf-archive/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchurl, xz }: + +stdenv.mkDerivation rec { + pname = "autoconf-archive"; + version = "2023.02.20"; + + src = fetchurl { + url = "mirror://gnu/autoconf-archive/autoconf-archive-${version}.tar.xz"; + hash = "sha256-cdQEhHmuKPH1eUYZw9ct+cAd9JscYo74X943WW3DGjM="; + }; + + strictDeps = true; + enableParallelBuilding = true; + + buildInputs = [ xz ]; + + meta = with lib; { + description = "Archive of autoconf m4 macros"; + homepage = "https://www.gnu.org/software/autoconf-archive/"; + license = licenses.gpl3; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf/2.13.nix b/nixpkgs/pkgs/development/tools/misc/autoconf/2.13.nix new file mode 100644 index 000000000000..8fba52aa1fd9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf/2.13.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchurl, m4, perl }: + +stdenv.mkDerivation rec { + pname = "autoconf"; + version = "2.13"; + + src = fetchurl { + url = "mirror://gnu/autoconf/autoconf-${version}.tar.gz"; + sha256 = "07krzl4czczdsgzrrw9fiqx35xcf32naf751khg821g5pqv12qgh"; + }; + + nativeBuildInputs = [ m4 perl ]; + strictDeps = true; + + doCheck = true; + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + postInstall = ''ln -s autoconf "$out"/bin/autoconf-2.13''; + + meta = { + homepage = "https://www.gnu.org/software/autoconf/"; + description = "Part of the GNU Build System"; + branch = "2.13"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf/2.64.nix b/nixpkgs/pkgs/development/tools/misc/autoconf/2.64.nix new file mode 100644 index 000000000000..daf026dc3a5b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf/2.64.nix @@ -0,0 +1,54 @@ +{ lib, stdenv, fetchurl, m4, perl }: + +stdenv.mkDerivation rec { + pname = "autoconf"; + version = "2.64"; + + src = fetchurl { + url = "mirror://gnu/autoconf/autoconf-${version}.tar.xz"; + sha256 = "0j3jdjpf5ly39dlp0bg70h72nzqr059k0x8iqxvaxf106chpgn9j"; + }; + + strictDeps = true; + nativeBuildInputs = [ m4 perl ]; + buildInputs = [ m4 ]; + + # Work around a known issue in Cygwin. See + # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for + # details. + # There are many test failures on `i386-pc-solaris2.11'. + #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = false; + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + enableParallelBuilding = true; + + # Make the Autotest test suite run in parallel. + preCheck = '' + export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" + ''; + + doInstallCheck = false; # fails + + meta = { + homepage = "https://www.gnu.org/software/autoconf/"; + description = "Part of the GNU Build System"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = lib.licenses.gpl2Plus; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf/2.69.nix b/nixpkgs/pkgs/development/tools/misc/autoconf/2.69.nix new file mode 100644 index 000000000000..870b0ae1d34a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf/2.69.nix @@ -0,0 +1,53 @@ +{ lib, stdenv, fetchurl, m4, perl }: + +stdenv.mkDerivation rec { + pname = "autoconf"; + version = "2.69"; + + src = fetchurl { + url = "mirror://gnu/autoconf/autoconf-${version}.tar.xz"; + sha256 = "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"; + }; + + nativeBuildInputs = [ m4 perl ]; + buildInputs = [ m4 ]; + + # Work around a known issue in Cygwin. See + # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for + # details. + # There are many test failures on `i386-pc-solaris2.11'. + #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = false; + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + enableParallelBuilding = true; + + # Make the Autotest test suite run in parallel. + preCheck = '' + export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" + ''; + + doInstallCheck = false; # fails + + meta = { + homepage = "https://www.gnu.org/software/autoconf/"; + description = "Part of the GNU Build System"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = lib.licenses.gpl2Plus; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf/2.71-fix-race.patch b/nixpkgs/pkgs/development/tools/misc/autoconf/2.71-fix-race.patch new file mode 100644 index 000000000000..e3b28554352b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf/2.71-fix-race.patch @@ -0,0 +1,36 @@ +https://savannah.gnu.org/support/index.php?110521 +https://git.savannah.gnu.org/cgit/autoconf.git/patch/?id=3a9802d60156809c139e9b4620bf04917e143ee2 +--- a/lib/Autom4te/FileUtils.pm ++++ b/lib/Autom4te/FileUtils.pm +@@ -34,12 +34,12 @@ This perl module provides various general purpose file handling functions. + + =cut + +-use 5.006; ++use 5.008; + use strict; + use warnings FATAL => 'all'; + + use Exporter; +-use File::stat; ++use Time::HiRes qw(stat); + use IO::File; + + use Autom4te::Channels; +@@ -115,10 +115,11 @@ sub mtime ($) + return 0 + if $file eq '-' || ! -f $file; + +- my $stat = stat ($file) ++ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, ++ $atime,$mtime,$ctime,$blksize,$blocks) = stat ($file) + or fatal "cannot stat $file: $!"; + +- return $stat->mtime; ++ return $mtime; + } + + +-- +cgit v1.2.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/autoconf/default.nix b/nixpkgs/pkgs/development/tools/misc/autoconf/default.nix new file mode 100644 index 000000000000..1fcb819bd4b7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autoconf/default.nix @@ -0,0 +1,69 @@ +{ lib, stdenv, fetchurl, m4, perl, texinfo }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "autoconf"; + version = "2.71"; + outputs = [ "out" "doc" ]; + + src = fetchurl { + url = "mirror://gnu/autoconf/autoconf-${version}.tar.xz"; + sha256 = "197sl23irn6s9pd54rxj5vcp5y8dv65jb9yfqgr2g56cxg7q6k7i"; + }; + patches = [ + # fix stale autom4te cache race condition: + # https://savannah.gnu.org/support/index.php?110521 + ./2.71-fix-race.patch + ]; + + strictDeps = true; + nativeBuildInputs = [ m4 perl texinfo ]; + buildInputs = [ m4 ]; + postBuild = " + make html + "; + + postInstall = " + make install-html + "; + + # Work around a known issue in Cygwin. See + # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for + # details. + # There are many test failures on `i386-pc-solaris2.11'. + doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + enableParallelBuilding = true; + + # Make the Autotest test suite run in parallel. + preCheck ='' + export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" + ''; + + meta = { + homepage = "https://www.gnu.org/software/autoconf/"; + description = "Part of the GNU Build System"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = lib.licenses.gpl3Plus; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/autogen/default.nix b/nixpkgs/pkgs/development/tools/misc/autogen/default.nix new file mode 100644 index 000000000000..a1e543f30fa0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/autogen/default.nix @@ -0,0 +1,117 @@ +{ lib, stdenv, buildPackages, fetchurl, fetchpatch, autoreconfHook, which, pkg-config, perl, guile_2_2, libxml2 }: + +stdenv.mkDerivation rec { + pname = "autogen"; + version = "5.18.16"; + + src = fetchurl { + url = "mirror://gnu/autogen/rel${version}/autogen-${version}.tar.xz"; + sha256 = "16mlbdys8q4ckxlvxyhwkdnh1ay9f6g0cyp1kylkpalgnik398gq"; + }; + + patches = let + dp = { ver ? "1%255.18.16-5", name, sha256 }: fetchurl { + url = "https://salsa.debian.org/debian/autogen/-/raw/debian/${ver}" + + "/debian/patches/${name}?inline=false"; + inherit name sha256; + }; + in [ + (dp { + name = "20_no_Werror.diff"; + sha256 = "08z4s2ifiqyaacjpd9pzr59w8m4j3548kkaq1bwvp2gjn29m680x"; + }) + (dp { + name = "30_ag_macros.m4_syntax_error.diff"; + sha256 = "1z8vmbwbkz3505wd33i2xx91mlf8rwsa7klndq37nw821skxwyh3"; + }) + (dp { + name = "31_allow_overriding_AGexe_for_crossbuild.diff"; + sha256 = "0h9wkc9bqb509knh8mymi43hg6n6sxg2lixvjlchcx7z0j7p8xkf"; + }) + (dp { + name = "40_suse_01-autogen-catch-race-error.patch"; + sha256 = "1cfkym2zds1f85md1m74snxzqmzlj7wd5jivgmyl342856848xav"; + }) + (dp { + name = "40_suse_03-gcc9-fix-wrestrict.patch"; + sha256 = "1ifdwi6gf96jc78jw7q4bfi5fgdldlf2nl55y20h6xb78kv0pznd"; + }) + (dp { + name = "40_suse_05-sprintf-overflow.patch"; + sha256 = "136m62k68w1h5k7iapynvbyipidw35js6pq21lsc6rpxvgp0n469"; + }) + (dp { + name = "40_suse_06-autogen-avoid-GCC-code-analysis-bug.patch"; + sha256 = "1d65zygzw2rpa00s0jy2y1bg29vkbhnjwlb5pv22rfv87zbk6z9q"; + }) + # Next upstream release will contain guile-3 support. We apply non-invasive + # patch meanwhile. + (fetchpatch { + name = "guile-3.patch"; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch?id=43bcc61c56a5a7de0eaf806efec7d8c0e4c01ae7"; + sha256 = "18d7y1f6164dm1wlh7rzbacfygiwrmbc35a7qqsbdawpkhydm5lr"; + }) + ]; + + outputs = [ "bin" "dev" "lib" "out" "man" "info" ]; + + nativeBuildInputs = [ + which pkg-config perl autoreconfHook/*patches applied*/ + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # autogen needs a build autogen when cross-compiling + buildPackages.buildPackages.autogen buildPackages.texinfo + ]; + buildInputs = [ + guile_2_2 libxml2 + ]; + + preConfigure = '' + export MAN_PAGE_DATE=$(date '+%Y-%m-%d' -d "@$SOURCE_DATE_EPOCH") + ''; + + configureFlags = [ + "--with-libxml2=${libxml2.dev}" + "--with-libxml2-cflags=-I${libxml2.dev}/include/libxml2" + # Make sure to use a static value for the timeout. If we do not set a value + # here autogen will select one based on the execution time of the configure + # phase which is not really reproducible. + # + # If you are curious about the number 78, it has been cargo-culted from + # Debian: https://salsa.debian.org/debian/autogen/-/blob/master/debian/rules#L21 + "--enable-timeout=78" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # the configure check for regcomp wants to run a host program + "libopts_cv_with_libregex=yes" + #"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo" + ] + # See: https://sourceforge.net/p/autogen/bugs/187/ + ++ lib.optionals stdenv.isDarwin [ "ac_cv_func_utimensat=no" ]; + + #doCheck = true; # not reliable + + postInstall = '' + mkdir -p $dev/bin + mv $bin/bin/autoopts-config $dev/bin + + for f in $lib/lib/autogen/tpl-config.tlib $out/share/autogen/tpl-config.tlib; do + sed -e "s|$dev/include|/no-such-autogen-include-path|" -i $f + sed -e "s|$bin/bin|/no-such-autogen-bin-path|" -i $f + sed -e "s|$lib/lib|/no-such-autogen-lib-path|" -i $f + done + + '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # remove build directory (/build/**, or /tmp/nix-build-**) from RPATHs + for f in "$bin"/bin/*; do + local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)'$NIX_BUILD_TOP'[^:]*:@\1@g')" + patchelf --set-rpath "$nrp" "$f" + done + ''; + + meta = with lib; { + description = "Automated text and program generation tool"; + license = with licenses; [ gpl3Plus lgpl3Plus ]; + homepage = "https://www.gnu.org/software/autogen/"; + platforms = platforms.all; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix new file mode 100644 index 000000000000..161dca6f1805 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + pname = "automake"; + version = "1.11.6"; + + # TODO: Remove the `aclocal' wrapper when $ACLOCAL_PATH support is + # available upstream; see + # <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9026>. + builder = ./builder.sh; + + setupHook = ./setup-hook.sh; + + src = fetchurl { + url = "mirror://gnu/automake/automake-${version}.tar.xz"; + sha256 = "1ffbc6cc41f0ea6c864fbe9485b981679dc5e350f6c4bc6c3512f5a4226936b5"; + }; + + patches = [ ./fix-test-autoconf-2.69.patch ./fix-perl-5.26.patch ]; + + strictDeps = true; + nativeBuildInputs = [ perl autoconf ]; + buildInputs = [ autoconf ]; + + doCheck = false; # takes _a lot_ of time, fails 11 of 782 tests + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + # Run the test suite in parallel. + enableParallelBuilding = true; + + meta = { + branch = "1.11"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + license = lib.licenses.gpl2Plus; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix new file mode 100644 index 000000000000..f0df759ee2cf --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + pname = "automake"; + version = "1.15.1"; + + src = fetchurl { + url = "mirror://gnu/automake/automake-${version}.tar.xz"; + sha256 = "1bzd9g32dfm4rsbw93ld9x7b5nc1y6i4m6zp032qf1i28a8s6sxg"; + }; + + nativeBuildInputs = [ autoconf perl ]; + buildInputs = [ autoconf ]; + + setupHook = ./setup-hook.sh; + + patches = [ ./help2man-SOURCE_DATE_EPOCH-support.patch ]; + + doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths + doInstallCheck = false; # runs the same thing, fails the same tests + + # The test suite can run in parallel. + enableParallelBuilding = true; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + meta = { + branch = "1.15"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + license = lib.licenses.gpl2Plus; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix new file mode 100644 index 000000000000..0d9572c6f314 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + pname = "automake"; + version = "1.16.5"; + + src = fetchurl { + url = "mirror://gnu/automake/automake-${version}.tar.xz"; + sha256 = "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh"; + }; + + strictDeps = true; + nativeBuildInputs = [ autoconf perl ]; + buildInputs = [ autoconf ]; + + setupHook = ./setup-hook.sh; + + doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths + doInstallCheck = false; # runs the same thing, fails the same tests + + # The test suite can run in parallel. + enableParallelBuilding = true; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + meta = with lib; { + branch = "1.16"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + license = licenses.gpl2Plus; + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/builder.sh b/nixpkgs/pkgs/development/tools/misc/automake/builder.sh new file mode 100644 index 000000000000..0cb1d5d61e33 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/builder.sh @@ -0,0 +1,48 @@ +if [ -e .attrs.sh ]; then source .attrs.sh; fi +source $stdenv/setup + +# Wrap the given `aclocal' program, appending extra `-I' flags +# corresponding to the directories listed in $ACLOCAL_PATH. (Note +# that `wrapProgram' can't be used for that purpose since it can only +# prepend flags, not append them.) +wrapAclocal() { + local program="$1" + local wrapped="$(dirname $program)/.$(basename $program)-wrapped" + + mv "$program" "$wrapped" + cat > "$program"<<EOF +#! $SHELL -e + +unset extraFlagsArray +declare -a extraFlagsArray + +oldIFS=\$IFS +IFS=: +for dir in \$ACLOCAL_PATH; do + if test -n "\$dir" -a -d "\$dir"; then + extraFlagsArray=("\${extraFlagsArray[@]}" "-I" "\$dir") + fi +done +IFS=\$oldIFS + +exec "$wrapped" "\$@" "\${extraFlagsArray[@]}" +EOF + chmod +x "$program" +} + +postInstall() { + # Create a wrapper around `aclocal' that converts every element in + # `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal' + # becomes modular; M4 macros do not need to be stored in a single + # global directory, while callers of `aclocal' do not need to pass + # `-I' options explicitly. + + for prog in $out/bin/aclocal*; do + wrapAclocal "$prog" + done + + ln -s aclocal-1.11 $out/share/aclocal + ln -s automake-1.11 $out/share/automake +} + +genericBuild diff --git a/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch b/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch new file mode 100644 index 000000000000..fb2d08de6d81 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch @@ -0,0 +1,10 @@ +--- automake-1.11.2/automake.in ++++ automake-1.11.2/automake.in +@@ -4156,7 +4156,7 @@ sub substitute_ac_subst_variables_worker($) + sub substitute_ac_subst_variables ($) + { + my ($text) = @_; +- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; ++ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; + return $text; + } diff --git a/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch b/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch new file mode 100644 index 000000000000..2ffa91f24eda --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch @@ -0,0 +1,13 @@ +With Autoconf 2.69 (instead of 2.68), config.{guess,sub} are needed. + +--- automake-1.11.2/tests/compile_f90_c_cxx.test 2011-12-20 21:56:29.000000000 +0100 ++++ automake-1.11.2/tests/compile_f90_c_cxx.test 2012-07-07 13:35:58.000000000 +0200 +@@ -41,7 +41,7 @@ END + : > baz.cc + + $ACLOCAL +-$AUTOMAKE ++$AUTOMAKE --add-missing + + # Look for the macros at the beginning of rules. Be careful, as there + # are literal tabs at the beginning of the search strings. diff --git a/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch b/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch new file mode 100644 index 000000000000..048f75e63343 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch @@ -0,0 +1,41 @@ +From 2e3357d7f0d63f1caeb40d9644c2436a5cd0da5f Mon Sep 17 00:00:00 2001 +From: David Terry <me@xwvvvvwx.com> +Date: Fri, 18 Oct 2019 10:23:11 +0200 +Subject: [PATCH] help2man: add support for SOURCE_DATE_EPOCH + +--- + doc/help2man | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/doc/help2man b/doc/help2man +index af4306f..4a64167 100755 +--- a/doc/help2man ++++ b/doc/help2man +@@ -213,11 +213,23 @@ sub get_option_value; + my $help_text = get_option_value $ARGV[0], $help_option; + $version_text ||= get_option_value $ARGV[0], $version_option; + ++# By default the generated manual pages will include the current date. This may ++# however be overriden by setting the environment variable $SOURCE_DATE_EPOCH ++# to an integer value of the seconds since the UNIX epoch. This is primarily ++# intended to support reproducible builds (wiki.debian.org/ReproducibleBuilds) ++# and will additionally ensure that the output date string is UTC. ++my $epoch_secs = time; ++if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/) ++{ ++ $epoch_secs = $1; ++ $ENV{TZ} = 'UTC'; ++} ++ + # Translators: the following message is a strftime(3) format string, which in + # the English version expands to the month as a word and the full year. It + # is used on the footer of the generated manual pages. If in doubt, you may + # just use %x as the value (which should be the full locale-specific date). +-my $date = enc strftime _("%B %Y"), localtime; ++my $date = enc strftime _("%B %Y"), localtime $epoch_secs; + (my $program = $ARGV[0]) =~ s!.*/!!; + my $package = $program; + my $version; +-- +2.23.0 + diff --git a/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh b/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh new file mode 100644 index 000000000000..292632b7cbce --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh @@ -0,0 +1,5 @@ +addAclocals () { + addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal +} + +addEnvHooks "$hostOffset" addAclocals diff --git a/nixpkgs/pkgs/development/tools/misc/automaticcomponenttoolkit/default.nix b/nixpkgs/pkgs/development/tools/misc/automaticcomponenttoolkit/default.nix new file mode 100644 index 000000000000..cf84a98467d6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automaticcomponenttoolkit/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, go }: + +stdenv.mkDerivation rec { + pname = "AutomaticComponentToolkit"; + version = "1.6.0"; + + src = fetchFromGitHub { + owner = "Autodesk"; + repo = pname; + rev = "v${version}"; + sha256 = "1r0sbw82cf9dbcj3vgnbd4sc1lklzvijic2z5wgkvs21azcm0yzh"; + }; + + nativeBuildInputs = [ go ]; + + buildPhase = '' + cd Source + export HOME=/tmp + go build -o act *.go + ''; + + installPhase = '' + install -Dm0755 act $out/bin/act + ''; + + meta = with lib; { + description = "Toolkit to automatically generate software components: abstract API, implementation stubs and language bindings"; + homepage = "https://github.com/Autodesk/AutomaticComponentToolkit"; + license = licenses.bsd2; + maintainers = with maintainers; [ gebner ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/aviator/bump-golang-x-sys.patch b/nixpkgs/pkgs/development/tools/misc/aviator/bump-golang-x-sys.patch new file mode 100644 index 000000000000..cb9b076d3eaf --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/aviator/bump-golang-x-sys.patch @@ -0,0 +1,24 @@ +diff --git a/go.mod b/go.mod +index 9bc55db..4bddb07 100644 +--- a/go.mod ++++ b/go.mod +@@ -19,5 +19,6 @@ require ( + github.com/smallfish/simpleyaml v0.0.0-20170527020626-116d8e577389 // indirect + github.com/starkandwayne/goutils v0.0.0-20190115202530-896b8a6904be + github.com/urfave/cli v1.19.1 ++ golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect + gopkg.in/yaml.v2 v2.3.0 + ) +diff --git a/go.sum b/go.sum +index 7641199..d983a95 100644 +--- a/go.sum ++++ b/go.sum +@@ -138,6 +138,8 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w + golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o= + golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= ++golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= ++golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= + golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= + golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= diff --git a/nixpkgs/pkgs/development/tools/misc/aviator/default.nix b/nixpkgs/pkgs/development/tools/misc/aviator/default.nix new file mode 100644 index 000000000000..fe7e1bc9cf81 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/aviator/default.nix @@ -0,0 +1,27 @@ +{ 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="; + }; + + patches = [ + ./bump-golang-x-sys.patch + ]; + + deleteVendor = true; + vendorHash = "sha256-AJyxCE4DdAXRS+2sY4Zzu8NTEFKJoV1bopfOqOFKZfI="; + + 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/nixpkgs/pkgs/development/tools/misc/awf/default.nix b/nixpkgs/pkgs/development/tools/misc/awf/default.nix new file mode 100644 index 000000000000..b73f1dc04502 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/awf/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, gtk2, gtk3, pkg-config +, wrapGAppsHook }: + +stdenv.mkDerivation rec { + pname = "awf"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "valr"; + repo = "awf"; + rev = "v${version}"; + sha256 = "0jl2kxwpvf2n8974zzyp69mqhsbjnjcqm39y0jvijvjb1iy8iman"; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ]; + + buildInputs = [ gtk2 gtk3 ]; + + autoreconfPhase = '' + patchShebangs ./autogen.sh + ./autogen.sh + ''; + + meta = with lib; { + description = "A Widget Factory"; + longDescription = '' + A widget factory is a theme preview application for gtk2 and + gtk3. It displays the various widget types provided by gtk2/gtk3 + in a single window allowing to see the visual effect of the + applied theme. + ''; + homepage = "https://github.com/valr/awf"; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ michalrus ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/babeltrace/default.nix b/nixpkgs/pkgs/development/tools/misc/babeltrace/default.nix new file mode 100644 index 000000000000..014d926eea3d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/babeltrace/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, glib, libuuid, popt, elfutils }: + +stdenv.mkDerivation rec { + pname = "babeltrace"; + version = "1.5.8"; + + src = fetchurl { + url = "https://www.efficios.com/files/babeltrace/${pname}-${version}.tar.bz2"; + sha256 = "1hkg3phnamxfrhwzmiiirbhdgckzfkqwhajl0lmr1wfps7j47wcz"; + }; + + # The pre-generated ./configure script uses an old autoconf version which + # breaks cross-compilation (replaces references to malloc with rpl_malloc). + # Re-generate with nixpkgs's autoconf. This requires glib to be present in + # nativeBuildInputs for its m4 macros to be present. + nativeBuildInputs = [ autoreconfHook glib pkg-config ]; + buildInputs = [ glib libuuid popt elfutils ]; + + # --enable-debug-info (default) requires the configure script to run host + # executables to determine the elfutils library version, which cannot be done + # while cross compiling. + configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-debug-info"; + + meta = with lib; { + description = "Command-line tool and library to read and convert LTTng tracefiles"; + homepage = "https://www.efficios.com/babeltrace"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/bashdb/default.nix b/nixpkgs/pkgs/development/tools/misc/bashdb/default.nix new file mode 100644 index 000000000000..2babde7afa6b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/bashdb/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, makeWrapper +, python3Packages +}: + +stdenv.mkDerivation rec { + pname = "bashdb"; + version = "5.0-1.1.2"; + + src = fetchurl { + url = "mirror://sourceforge/bashdb/${pname}-${version}.tar.bz2"; + sha256 = "sha256-MBdtKtKMWwCy4tIcXqGu+PuvQKj52fcjxnxgUx87czA="; + }; + + patches = [ + # Enable building with bash 5.1/5.2 + # Remove with any upstream 5.1-x.y.z release + (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/569fbb806d9ee813afa8b27d2098a44f93433922/devel/bashdb/files/patch-configure"; + sha256 = "19zfzcnxavndyn6kfxp775kjcd0gigsm4y3bnh6fz5ilhnnbbbgr"; + }) + ]; + patchFlags = [ "-p0" ]; + + nativeBuildInputs = [ + makeWrapper + ]; + + postInstall = '' + wrapProgram $out/bin/bashdb --prefix PYTHONPATH ":" "$(toPythonPath ${python3Packages.pygments})" + ''; + + meta = { + description = "Bash script debugger"; + homepage = "https://bashdb.sourceforge.net/"; + license = lib.licenses.gpl2; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch b/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch new file mode 100644 index 000000000000..f9c6e88d97b4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch @@ -0,0 +1,137 @@ +From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001 +From: Andrew Childs <andrew.childs@bibo.com.ph> +Date: Tue, 22 Feb 2022 11:28:04 +0900 +Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection" + +This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7. +--- + ChangeLog | 9 ------ + libtool.m4 | 88 ++++++++++++++++++++++++++---------------------------- + 2 files changed, 43 insertions(+), 54 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 18e8b6835da..c12f07403c3 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -375,15 +375,6 @@ + + * src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace. + +-2021-09-27 Nick Alcock <nick.alcock@oracle.com> +- +- PR libctf/27967 +- * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided +- NM, if there is one. Run nm on itself, not on /dev/null, to avoid +- errors from nms that refuse to work on non-regular files. Remove +- other workarounds for this problem. Strip out blank lines from the +- nm output. +- + 2021-09-27 Nick Alcock <nick.alcock@oracle.com> + + PR libctf/27967 +diff --git a/libtool.m4 b/libtool.m4 +index a216bb14e99..7a711249304 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1], + + # LT_PATH_NM + # ---------- +-# find the pathname to a BSD- or MS-compatible name lister, and any flags +-# needed to make it compatible ++# find the pathname to a BSD- or MS-compatible name lister + AC_DEFUN([LT_PATH_NM], + [AC_REQUIRE([AC_PROG_CC])dnl + AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, + [if test -n "$NM"; then +- # Let the user override the nm to test. +- lt_nm_to_check="$NM" +- else +- lt_nm_to_check="${ac_tool_prefix}nm" +- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then +- lt_nm_to_check="$lt_nm_to_check nm" +- fi +- fi +- for lt_tmp_nm in $lt_nm_to_check; do +- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do +- IFS="$lt_save_ifs" +- test -z "$ac_dir" && ac_dir=. +- case "$lt_tmp_nm" in +- */*|*\\*) tmp_nm="$lt_tmp_nm";; +- *) tmp_nm="$ac_dir/$lt_tmp_nm";; +- esac +- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then +- # Check to see if the nm accepts a BSD-compat flag. +- # Adding the `sed 1q' prevents false positives on HP-UX, which says: +- # nm: unknown option "B" ignored +- case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in +- *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" +- break +- ;; +- *) +- case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in +- *$tmp_nm*) +- lt_cv_path_NM="$tmp_nm -p" +- break +- ;; +- *) +- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but +- continue # so that we can try to find one that supports BSD flags +- ;; +- esac +- ;; +- esac +- fi +- done +- IFS="$lt_save_ifs" +- done +- : ${lt_cv_path_NM=no}]) ++ # Let the user override the test. ++ lt_cv_path_NM="$NM" ++else ++ lt_nm_to_check="${ac_tool_prefix}nm" ++ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then ++ lt_nm_to_check="$lt_nm_to_check nm" ++ fi ++ for lt_tmp_nm in $lt_nm_to_check; do ++ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ++ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do ++ IFS="$lt_save_ifs" ++ test -z "$ac_dir" && ac_dir=. ++ tmp_nm="$ac_dir/$lt_tmp_nm" ++ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then ++ # Check to see if the nm accepts a BSD-compat flag. ++ # Adding the `sed 1q' prevents false positives on HP-UX, which says: ++ # nm: unknown option "B" ignored ++ # Tru64's nm complains that /dev/null is an invalid object file ++ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in ++ */dev/null* | *'Invalid file or object type'*) ++ lt_cv_path_NM="$tmp_nm -B" ++ break ++ ;; ++ *) ++ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in ++ */dev/null*) ++ lt_cv_path_NM="$tmp_nm -p" ++ break ++ ;; ++ *) ++ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ++ continue # so that we can try to find one that supports BSD flags ++ ;; ++ esac ++ ;; ++ esac ++ fi ++ done ++ IFS="$lt_save_ifs" ++ done ++ : ${lt_cv_path_NM=no} ++fi]) + if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" + else +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-the-NM-nm-over-here-B-option-w.patch b/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-the-NM-nm-over-here-B-option-w.patch new file mode 100644 index 000000000000..b5083d81d71c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-the-NM-nm-over-here-B-option-w.patch @@ -0,0 +1,42 @@ +This reverts upstream commit caf606c90d55305967b9253447dda93d2f1835ab +until https://sourceware.org/PR29547 is fixed. + +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -3214,31 +3214,25 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi +- for lt_tmp_nm in "$lt_nm_to_check"; do ++ for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. +- # Strip out any user-provided options from the nm to test twice, +- # the first time to test to see if nm (rather than its options) has +- # an explicit path, the second time to yield a file which can be +- # nm'ed itself. +- tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" +- case "$tmp_nm_path" in ++ case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac +- tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" +- if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then ++ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored +- case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in ++ case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) +- case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in ++ case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch b/nixpkgs/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch new file mode 100644 index 000000000000..e601be3a3308 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch @@ -0,0 +1,47 @@ +From 33a8dc728eb5da3e1d3439c96810d1f6b2660b89 Mon Sep 17 00:00:00 2001 +From: Andrew Childs <andrew.childs@bibo.com.ph> +Date: Tue, 22 Feb 2022 12:24:46 +0900 +Subject: [PATCH] libtool.m4: update macos version detection block + +Includes upstream change +9e8c882517082fe5755f2524d23efb02f1522490 +--- + libtool.m4 | 21 ++++++++------------- + 1 file changed, 8 insertions(+), 13 deletions(-) + +diff --git a/libtool.m4 b/libtool.m4 +index 7a711249304..f452efb4300 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -996,20 +996,15 @@ _LT_EOF + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; ++ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- 10.[[012]][[,.]]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ darwin*) ++ case $MACOSX_DEPLOYMENT_TARGET,$host in ++ 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ *) ++ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch new file mode 100644 index 000000000000..f9c6e88d97b4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch @@ -0,0 +1,137 @@ +From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001 +From: Andrew Childs <andrew.childs@bibo.com.ph> +Date: Tue, 22 Feb 2022 11:28:04 +0900 +Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection" + +This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7. +--- + ChangeLog | 9 ------ + libtool.m4 | 88 ++++++++++++++++++++++++++---------------------------- + 2 files changed, 43 insertions(+), 54 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 18e8b6835da..c12f07403c3 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -375,15 +375,6 @@ + + * src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace. + +-2021-09-27 Nick Alcock <nick.alcock@oracle.com> +- +- PR libctf/27967 +- * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided +- NM, if there is one. Run nm on itself, not on /dev/null, to avoid +- errors from nms that refuse to work on non-regular files. Remove +- other workarounds for this problem. Strip out blank lines from the +- nm output. +- + 2021-09-27 Nick Alcock <nick.alcock@oracle.com> + + PR libctf/27967 +diff --git a/libtool.m4 b/libtool.m4 +index a216bb14e99..7a711249304 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1], + + # LT_PATH_NM + # ---------- +-# find the pathname to a BSD- or MS-compatible name lister, and any flags +-# needed to make it compatible ++# find the pathname to a BSD- or MS-compatible name lister + AC_DEFUN([LT_PATH_NM], + [AC_REQUIRE([AC_PROG_CC])dnl + AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, + [if test -n "$NM"; then +- # Let the user override the nm to test. +- lt_nm_to_check="$NM" +- else +- lt_nm_to_check="${ac_tool_prefix}nm" +- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then +- lt_nm_to_check="$lt_nm_to_check nm" +- fi +- fi +- for lt_tmp_nm in $lt_nm_to_check; do +- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do +- IFS="$lt_save_ifs" +- test -z "$ac_dir" && ac_dir=. +- case "$lt_tmp_nm" in +- */*|*\\*) tmp_nm="$lt_tmp_nm";; +- *) tmp_nm="$ac_dir/$lt_tmp_nm";; +- esac +- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then +- # Check to see if the nm accepts a BSD-compat flag. +- # Adding the `sed 1q' prevents false positives on HP-UX, which says: +- # nm: unknown option "B" ignored +- case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in +- *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" +- break +- ;; +- *) +- case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in +- *$tmp_nm*) +- lt_cv_path_NM="$tmp_nm -p" +- break +- ;; +- *) +- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but +- continue # so that we can try to find one that supports BSD flags +- ;; +- esac +- ;; +- esac +- fi +- done +- IFS="$lt_save_ifs" +- done +- : ${lt_cv_path_NM=no}]) ++ # Let the user override the test. ++ lt_cv_path_NM="$NM" ++else ++ lt_nm_to_check="${ac_tool_prefix}nm" ++ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then ++ lt_nm_to_check="$lt_nm_to_check nm" ++ fi ++ for lt_tmp_nm in $lt_nm_to_check; do ++ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ++ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do ++ IFS="$lt_save_ifs" ++ test -z "$ac_dir" && ac_dir=. ++ tmp_nm="$ac_dir/$lt_tmp_nm" ++ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then ++ # Check to see if the nm accepts a BSD-compat flag. ++ # Adding the `sed 1q' prevents false positives on HP-UX, which says: ++ # nm: unknown option "B" ignored ++ # Tru64's nm complains that /dev/null is an invalid object file ++ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in ++ */dev/null* | *'Invalid file or object type'*) ++ lt_cv_path_NM="$tmp_nm -B" ++ break ++ ;; ++ *) ++ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in ++ */dev/null*) ++ lt_cv_path_NM="$tmp_nm -p" ++ break ++ ;; ++ *) ++ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ++ continue # so that we can try to find one that supports BSD flags ++ ;; ++ esac ++ ;; ++ esac ++ fi ++ done ++ IFS="$lt_save_ifs" ++ done ++ : ${lt_cv_path_NM=no} ++fi]) + if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" + else +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-libtool.m4-update-macos-version-detection-block.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-libtool.m4-update-macos-version-detection-block.patch new file mode 100644 index 000000000000..e601be3a3308 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/0001-libtool.m4-update-macos-version-detection-block.patch @@ -0,0 +1,47 @@ +From 33a8dc728eb5da3e1d3439c96810d1f6b2660b89 Mon Sep 17 00:00:00 2001 +From: Andrew Childs <andrew.childs@bibo.com.ph> +Date: Tue, 22 Feb 2022 12:24:46 +0900 +Subject: [PATCH] libtool.m4: update macos version detection block + +Includes upstream change +9e8c882517082fe5755f2524d23efb02f1522490 +--- + libtool.m4 | 21 ++++++++------------- + 1 file changed, 8 insertions(+), 13 deletions(-) + +diff --git a/libtool.m4 b/libtool.m4 +index 7a711249304..f452efb4300 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -996,20 +996,15 @@ _LT_EOF + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; ++ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) # darwin 5.x on +- # if running on 10.5 or later, the deployment target defaults +- # to the OS version, if on x86, and 10.4, the deployment +- # target defaults to 10.4. Don't you love it? +- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in +- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; +- 10.[[012]][[,.]]*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- 10.*) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ darwin*) ++ case $MACOSX_DEPLOYMENT_TARGET,$host in ++ 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) ++ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; ++ *) ++ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac +-- +2.34.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/always-search-rpath.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/always-search-rpath.patch new file mode 100644 index 000000000000..2e9956e6b6e4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/always-search-rpath.patch @@ -0,0 +1,14 @@ +diff --git a/ld/genscripts.sh b/ld/genscripts.sh +index b6940d376d..0feb1adfd0 100755 +--- a/ld/genscripts.sh ++++ b/ld/genscripts.sh +@@ -125,6 +125,9 @@ if test "x$NATIVE" = "xyes" ; then + USE_LIBPATH=yes + fi + ++# TODO: why is this needed? ++USE_LIBPATH=yes ++ + # Set the library search path, for libraries named by -lfoo. + # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used. + # Otherwise, the default is set here. diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/build-components-separately.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/build-components-separately.patch new file mode 100644 index 000000000000..0b4162d84880 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/build-components-separately.patch @@ -0,0 +1,155 @@ +diff --git a/bfd/configure.ac b/bfd/configure.ac +index fec067b2135..377e1f5443f 100644 +--- a/bfd/configure.ac ++++ b/bfd/configure.ac +@@ -292,30 +292,16 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, + + LT_LIB_M + +-# When building a shared libbfd, link against the pic version of libiberty +-# so that apps that use libbfd won't need libiberty just to satisfy any +-# libbfd references. +-# We can't do that if a pic libiberty is unavailable since including non-pic +-# code would insert text relocations into libbfd. + SHARED_LIBADD= +-SHARED_LDFLAGS= ++SHARED_LDFLAGS=-liberty + if test "$enable_shared" = "yes"; then +-changequote(,)dnl +- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` +-changequote([,])dnl +- if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" +- fi +-fi +- + SHARED_LIBADD="$SHARED_LIBADD $LIBINTL" + +-if test "$enable_shared" = "yes"; then + case "${host}" in + # More hacks to build DLLs on Windows. + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" +- SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32" ++ SHARED_LIBADD="-liberty $SHARED_LIBADD -lcygwin -lkernel32" + ;; + esac + +diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am +index 0e04b4c05c4..848a02662e7 100644 +--- a/opcodes/Makefile.am ++++ b/opcodes/Makefile.am +@@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) + endif + + # This is where bfd.h lives. +-BFD_H = ../bfd/bfd.h ++BFD_H = $(BFDDIR)/bfd.h + + BUILD_LIBS = @BUILD_LIBS@ + BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ +@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ + # development.sh is used to determine -Werror default. + CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh + +-AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ ++AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ + + disassemble.lo: disassemble.c + if am__fastdepCC +@@ -327,9 +327,18 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c +-libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ ++libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion + libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ +-libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@ ++libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ + # Allow dependency tracking to work on all the source files. + EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES) + ++libtool-soversion: ++ @echo "creating $@" ++ bfd_soversion="$(VERSION)" ;\ ++ . $(BFDDIR)/development.sh ;\ ++ if test "$$development" = true ; then \ ++ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ ++ fi ;\ ++ echo "$${bfd_soversion}" > $@ ++ + # libtool will build .libs/libopcodes.a. We create libopcodes.a in + # the build directory so that we don't have to convert all the + # programs that use libopcodes.a simultaneously. This is a hack which +diff --git a/opcodes/configure.ac b/opcodes/configure.ac +index e564f067334..5da62a3d58b 100644 +--- a/opcodes/configure.ac ++++ b/opcodes/configure.ac +@@ -98,6 +98,8 @@ BFD_64_BIT + AC_SUBST(HDEFINES) + AC_PROG_INSTALL + ++GCC_HEADER_STDINT(bfd_stdint.h) ++ + AC_CHECK_DECLS([basename, stpcpy]) + + # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do +@@ -148,44 +150,21 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, + + LT_LIB_M + +-#Libs for generator progs +-if test "x$cross_compiling" = "xno"; then +- BUILD_LIBS=../libiberty/libiberty.a +- BUILD_LIB_DEPS=$BUILD_LIBS +-else +- # if cross-compiling, assume that the system provides -liberty +- # and that the version is compatible with new headers. +- BUILD_LIBS=-liberty +- BUILD_LIB_DEPS= +-fi +-BUILD_LIBS="$BUILD_LIBS $LIBINTL" +-BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP" ++BUILD_LIBS="-liberty $LIBINTL" ++BUILD_LIB_DEPS="$LIBINTL_DEP" + + AC_SUBST(BUILD_LIBS) + AC_SUBST(BUILD_LIB_DEPS) + + # Horrible hacks to build DLLs on Windows and a shared library elsewhere. + SHARED_LDFLAGS= +-SHARED_LIBADD= ++SHARED_LIBADD=-liberty + SHARED_DEPENDENCIES= +-if test "$enable_shared" = "yes"; then +-# When building a shared libopcodes, link against the pic version of libiberty +-# so that apps that use libopcodes won't need libiberty just to satisfy any +-# libopcodes references. +-# We can't do that if a pic libiberty is unavailable since including non-pic +-# code would insert text relocations into libopcodes. + # Note that linking against libbfd as we do here, which is itself linked + # against libiberty, may not satisfy all the libopcodes libiberty references + # since libbfd may not pull in the entirety of libiberty. + # Also, jam libintl into the right place in all of this: after libiberty, + # which uses it, but before -lcygwin, which it uses. +-changequote(,)dnl +- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` +-changequote([,])dnl +- if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" +- fi +-fi + + SHARED_LIBADD="$SHARED_LIBADD $LIBINTL" + +@@ -193,11 +172,10 @@ if test "$enable_shared" = "yes"; then + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" +- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" ++ SHARED_LIBADD="-lbfd -liberty $SHARED_LIBADD" + ;; + *) +- SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" +- SHARED_DEPENDENCIES="../bfd/libbfd.la" ++ SHARED_LIBADD="-lbfd ${SHARED_LIBADD}" + ;; + esac + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/default.nix b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/default.nix new file mode 100644 index 000000000000..1194cbeb2453 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/default.nix @@ -0,0 +1,232 @@ +let + execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf"; +in + +{ stdenv +, autoreconfHook +, autoconf269, automake, libtool +, bison +, buildPackages +, fetchFromGitHub +, fetchurl +, flex +, gettext +, lib +, noSysDirs +, perl +, substitute +, texinfo +, zlib + +, enableGold ? execFormatIsELF stdenv.targetPlatform +, enableShared ? !stdenv.hostPlatform.isStatic + # WARN: Enabling all targets increases output size to a multiple. +, withAllTargets ? false +}: + +# WARN: configure silently disables ld.gold if it's unsupported, so we need to +# make sure that intent matches result ourselves. +assert enableGold -> execFormatIsELF stdenv.targetPlatform; + + +let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + + version = "2.38"; + + srcs = { + normal = fetchurl { + url = "mirror://gnu/binutils/binutils-${version}.tar.bz2"; + sha256 = "sha256-Bw7HHPB3pqWOC5WfBaCaNQFTeMLYpR6Q866r/jBZDvg="; + }; + vc4-none = fetchFromGitHub { + owner = "itszor"; + repo = "binutils-vc4"; + rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36"; + sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"; + }; + }; + + #INFO: The targetPrefix prepended to binary names to allow multiple binuntils + # on the PATH to both be usable. + targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; +in + +stdenv.mkDerivation { + pname = targetPrefix + "binutils"; + inherit version; + + # HACK: Ensure that we preserve source from bootstrap binutils to not rebuild LLVM + src = stdenv.__bootPackages.binutils-unwrapped_2_38.src + or srcs.${targetPlatform.system} + or srcs.normal; + + # WARN: this package is used for bootstrapping fetchurl, and thus cannot use + # fetchpatch! All mutable patches (generated by GitHub or cgit) that are + # needed here should be included directly in Nixpkgs as files. + patches = [ + # Make binutils output deterministic by default. + ./deterministic.patch + + + # Breaks nm BSD flag detection + ./0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch + + # Required for newer macos versions + ./0001-libtool.m4-update-macos-version-detection-block.patch + + # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's + # not clear why this behavior was decided upon but it has the unfortunate + # consequence that the linker will fail to find transitive dependencies of + # shared objects when cross-compiling. Consequently, we are forced to + # override this behavior, forcing ld to search DT_RPATH even when + # cross-compiling. + ./always-search-rpath.patch + + # Fixed in 2.39 + # https://sourceware.org/bugzilla/show_bug.cgi?id=28885 + # https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=99852365513266afdd793289813e8e565186c9e6 + # https://github.com/NixOS/nixpkgs/issues/170946 + ./deterministic-temp-prefixes.patch + ] + ++ lib.optional targetPlatform.isiOS ./support-ios.patch + ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch + ++ lib.optional stdenv.targetPlatform.isMips64n64 + # this patch is from debian: + # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff + (if stdenv.targetPlatform.isMusl + then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; } + else ./mips64-default-n64.patch) + # On PowerPC, when generating assembly code, GCC generates a `.machine` + # custom instruction which instructs the assembler to generate code for this + # machine. However, some GCC versions generate the wrong one, or make it + # too strict, which leads to some confusing "unrecognized opcode: wrtee" + # or "unrecognized opcode: eieio" errors. + # + # To remove when binutils 2.39 is released. + # + # Upstream commit: + # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=cebc89b9328eab994f6b0314c263f94e7949a553 + ++ lib.optional stdenv.targetPlatform.isPower ./ppc-make-machine-less-strict.patch + ; + + outputs = [ "out" "info" "man" ]; + + strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ + bison + perl + texinfo + ] + ++ lib.optionals targetPlatform.isiOS [ autoreconfHook ] + ++ lib.optionals buildPlatform.isDarwin [ autoconf269 automake gettext libtool ] + ++ lib.optionals targetPlatform.isVc4 [ flex ] + ; + + buildInputs = [ zlib gettext ]; + + inherit noSysDirs; + + preConfigure = (lib.optionalString buildPlatform.isDarwin '' + for i in */configure.ac; do + pushd "$(dirname "$i")" + echo "Running autoreconf in $PWD" + # autoreconf doesn't work, don't know why + # autoreconf ''${autoreconfFlags:---install --force --verbose} + autoconf + popd + done + '') + '' + # Clear the default library search path. + if test "$noSysDirs" = "1"; then + echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt + fi + + # Use symlinks instead of hard links to save space ("strip" in the + # fixup phase strips each hard link separately). + for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in gold/Makefile.in; do + sed -i "$i" -e 's|ln |ln -s |' + done + ''; + + # As binutils takes part in the stdenv building, we don't want references + # to the bootstrap-tools libgcc (as uses to happen on arm/mips) + env.NIX_CFLAGS_COMPILE = + if hostPlatform.isDarwin + then "-Wno-string-plus-int -Wno-deprecated-declarations" + else "-static-libgcc"; + + hardeningDisable = [ "format" "pie" ]; + + configurePlatforms = [ "build" "host" "target" ]; + + configureFlags = [ + "--enable-64-bit-bfd" + "--with-system-zlib" + + "--enable-deterministic-archives" + "--disable-werror" + "--enable-fix-loongson2f-nop" + + # Turn on --enable-new-dtags by default to make the linker set + # RUNPATH instead of RPATH on binaries. This is important because + # RUNPATH can be overridden using LD_LIBRARY_PATH at runtime. + "--enable-new-dtags" + + # force target prefix. Some versions of binutils will make it empty if + # `--host` and `--target` are too close, even if Nixpkgs thinks the + # platforms are different (e.g. because not all the info makes the + # `config`). Other versions of binutils will always prefix if `--target` is + # passed, even if `--host` and `--target` are the same. The easiest thing + # for us to do is not leave it to chance, and force the program prefix to be + # what we want it to be. + "--program-prefix=${targetPrefix}" + ] + ++ lib.optionals withAllTargets [ "--enable-targets=all" ] + ++ lib.optionals enableGold [ "--enable-gold" "--enable-plugins" ] + ++ (if enableShared + then [ "--enable-shared" "--disable-static" ] + else [ "--disable-shared" "--enable-static" ]) + ; + + # Fails + doCheck = false; + + # Remove on next bump. It's a vestige of past conditional. Stays here to avoid + # mass rebuild. + postFixup = ""; + + # Break dependency on pkgsBuildBuild.gcc when building a cross-binutils + stripDebugList = if stdenv.hostPlatform != stdenv.targetPlatform then "bin lib ${stdenv.hostPlatform.config}" else null; + + # INFO: Otherwise it fails with: + # `./sanity.sh: line 36: $out/bin/size: not found` + doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform); + + enableParallelBuilding = true; + + passthru = { + inherit targetPrefix; + hasGold = enableGold; + isGNU = true; + }; + + meta = with lib; { + description = "Tools for manipulating binaries (linker, assembler, etc.)"; + longDescription = '' + The GNU Binutils are a collection of binary tools. The main + ones are `ld' (the GNU linker) and `as' (the GNU assembler). + They also include the BFD (Binary File Descriptor) library, + `gprof', `nm', `strip', etc. + ''; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 lovesegfault ]; + platforms = platforms.unix; + + # INFO: Give binutils a lower priority than gcc-wrapper to prevent a + # collision due to the ld/as wrappers/symlinks in the latter. + priority = 10; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic-temp-prefixes.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic-temp-prefixes.patch new file mode 100644 index 000000000000..3c27340b9c04 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic-temp-prefixes.patch @@ -0,0 +1,36 @@ +From 99852365513266afdd793289813e8e565186c9e6 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Wed, 23 Mar 2022 11:39:49 +0000 +Subject: [PATCH] dlltool: Use the output name as basis for deterministic temp + prefixes + + PR 28885 + * dlltool.c (main): use imp_name rather than dll_name when + generating a temporary file name. +--- + binutils/ChangeLog | 9 +++++++++ + binutils/dlltool.c | 7 ++++--- + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/binutils/dlltool.c b/binutils/dlltool.c +index d95bf3f5470..89871510b45 100644 +--- a/binutils/dlltool.c ++++ b/binutils/dlltool.c +@@ -3992,10 +3992,11 @@ main (int ac, char **av) + if (tmp_prefix == NULL) + { + /* If possible use a deterministic prefix. */ +- if (dll_name) ++ if (imp_name || delayimp_name) + { +- tmp_prefix = xmalloc (strlen (dll_name) + 2); +- sprintf (tmp_prefix, "%s_", dll_name); ++ const char *input = imp_name ? imp_name : delayimp_name; ++ tmp_prefix = xmalloc (strlen (input) + 2); ++ sprintf (tmp_prefix, "%s_", input); + for (i = 0; tmp_prefix[i]; i++) + if (!ISALNUM (tmp_prefix[i])) + tmp_prefix[i] = '_'; +-- +2.31.1 + diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic.patch new file mode 100644 index 000000000000..736e0aca6ce1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/deterministic.patch @@ -0,0 +1,12 @@ +diff -ur orig/binutils-2.23.1/ld/ldlang.c binutils-2.23.1/ld/ldlang.c +--- orig/ld/ldlang.c ++++ new/ld/ldlang.c +@@ -3095,6 +3095,8 @@ + ldfile_output_machine)) + einfo (_("%P%F:%s: can not set architecture: %E\n"), name); + ++ link_info.output_bfd->flags |= BFD_DETERMINISTIC_OUTPUT; ++ + link_info.hash = bfd_link_hash_table_create (link_info.output_bfd); + if (link_info.hash == NULL) + einfo (_("%P%F: can not create hash table: %E\n")); diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libbfd.nix b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libbfd.nix new file mode 100644 index 000000000000..feac15b512f9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libbfd.nix @@ -0,0 +1,59 @@ +{ lib, stdenv +, fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped_2_38 +, libiberty, libintl, zlib +}: + +stdenv.mkDerivation { + pname = "libbfd"; + inherit (binutils-unwrapped_2_38) version src; + + outputs = [ "out" "dev" ]; + + patches = binutils-unwrapped_2_38.patches ++ [ + ./build-components-separately.patch + (fetchpatch { + url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch"; + sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q"; + }) + ]; + + # We just want to build libbfd + postPatch = '' + cd bfd + ''; + + postAutoreconf = '' + echo "Updating config.guess and config.sub from ${gnu-config}" + cp -f ${gnu-config}/config.{guess,sub} ../ + ''; + + # We update these ourselves + dontUpdateAutotoolsGnuConfigScripts = true; + + strictDeps = true; + nativeBuildInputs = [ autoreconfHook bison ]; + buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ]; + + configurePlatforms = [ "build" "host" ]; + configureFlags = [ + "--enable-targets=all" "--enable-64-bit-bfd" + "--enable-install-libbfd" + "--with-system-zlib" + ] ++ lib.optional (!stdenv.hostPlatform.isStatic) "--enable-shared"; + + enableParallelBuilding = true; + + meta = with lib; { + description = "A library for manipulating containers of machine code"; + longDescription = '' + BFD is a library which provides a single interface to read and write + object files, executables, archive files, and core files in any format. + It is associated with GNU Binutils, and elsewhere often distributed with + it. + ''; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libopcodes.nix b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libopcodes.nix new file mode 100644 index 000000000000..16b3695626d7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/libopcodes.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, buildPackages +, autoreconfHook, bison, binutils-unwrapped_2_38 +, libiberty, libbfd_2_38 +}: + +stdenv.mkDerivation { + pname = "libopcodes"; + inherit (binutils-unwrapped_2_38) version src; + + outputs = [ "out" "dev" ]; + + patches = binutils-unwrapped_2_38.patches ++ [ + ./build-components-separately.patch + ]; + + # We just want to build libopcodes + postPatch = '' + cd opcodes + find . ../include/opcode -type f -exec sed {} -i -e 's/"bfd.h"/<bfd.h>/' \; + ''; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ autoreconfHook bison ]; + buildInputs = [ libiberty ]; + # dis-asm.h includes bfd.h + propagatedBuildInputs = [ libbfd_2_38 ]; + + configurePlatforms = [ "build" "host" ]; + configureFlags = [ + "--enable-targets=all" "--enable-64-bit-bfd" + "--enable-install-libbfd" + "--enable-shared" + ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "A library from binutils for manipulating machine code"; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/mips64-default-n64.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/mips64-default-n64.patch new file mode 100644 index 000000000000..00581279f85e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/mips64-default-n64.patch @@ -0,0 +1,82 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -927,11 +927,21 @@ case "${targ}" in + targ_defvec=mips_elf32_be_vec + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; +- mips64*el-*-linux*) ++ mips*64*el-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec" ++ want64=true ++ ;; ++ mips*64*-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" ++ want64=true ++ ;; ++ mips*64*el-*-linux*) + targ_defvec=mips_elf32_ntrad_le_vec + targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" + ;; +- mips64*-*-linux*) ++ mips*64*-*-linux*) + targ_defvec=mips_elf32_ntrad_be_vec + targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" + ;; +--- a/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d ++++ b/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d +@@ -1,4 +1,5 @@ + #PROG: objcopy ++#as: -n32 + #readelf: --notes --wide + #objcopy: --merge-notes + #name: MIPS merge notes section (n32) +--- a/gas/configure ++++ b/gas/configure +@@ -12167,6 +12167,9 @@ _ACEOF + esac + # Decide which ABI to target by default. + case ${target} in ++ mips*64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ + | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) + mips_default_abi=N32_ABI +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -384,6 +384,9 @@ changequote([,])dnl + esac + # Decide which ABI to target by default. + case ${target} in ++ mips*64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ + | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) + mips_default_abi=N32_ABI +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -543,11 +543,19 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 ++mips*64*el-*-linux-gnuabi64) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" ++ targ_extra_libpath=$targ_extra_emuls ++ ;; ++mips*64*el-*-linux-*) targ_emul=elf32ltsmipn32 + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 ++mips*64*-*-linux-gnuabi64) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" ++ targ_extra_libpath=$targ_extra_emuls ++ ;; ++mips*64*-*-linux-*) targ_emul=elf32btsmipn32 + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/ppc-make-machine-less-strict.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/ppc-make-machine-less-strict.patch new file mode 100644 index 000000000000..c2452414fc7d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/ppc-make-machine-less-strict.patch @@ -0,0 +1,51 @@ +From cebc89b9328eab994f6b0314c263f94e7949a553 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Mon, 21 Feb 2022 10:58:57 +1030 +Subject: [PATCH] binutils 2.38 vs. ppc32 linux kernel + +Commit b25f942e18d6 made .machine more strict. Weaken it again. + + * config/tc-ppc.c (ppc_machine): Treat an early .machine specially, + keeping sticky options to work around gcc bugs. +--- + gas/config/tc-ppc.c | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c +index 054f9c72161..89bc7d3f9b9 100644 +--- a/gas/config/tc-ppc.c ++++ b/gas/config/tc-ppc.c +@@ -5965,7 +5965,30 @@ ppc_machine (int ignore ATTRIBUTE_UNUSED) + options do not count as a new machine, instead they add + to currently selected opcodes. */ + ppc_cpu_t machine_sticky = 0; +- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string); ++ /* Unfortunately, some versions of gcc emit a .machine ++ directive very near the start of the compiler's assembly ++ output file. This is bad because it overrides user -Wa ++ cpu selection. Worse, there are versions of gcc that ++ emit the *wrong* cpu, not even respecting the -mcpu given ++ to gcc. See gcc pr101393. And to compound the problem, ++ as of 20220222 gcc doesn't pass the correct cpu option to ++ gas on the command line. See gcc pr59828. Hack around ++ this by keeping sticky options for an early .machine. */ ++ asection *sec; ++ for (sec = stdoutput->sections; sec != NULL; sec = sec->next) ++ { ++ segment_info_type *info = seg_info (sec); ++ /* Are the frags for this section perturbed from their ++ initial state? Even .align will count here. */ ++ if (info != NULL ++ && (info->frchainP->frch_root != info->frchainP->frch_last ++ || info->frchainP->frch_root->fr_type != rs_fill ++ || info->frchainP->frch_root->fr_fix != 0)) ++ break; ++ } ++ new_cpu = ppc_parse_cpu (ppc_cpu, ++ sec == NULL ? &sticky : &machine_sticky, ++ cpu_string); + if (new_cpu != 0) + ppc_cpu = new_cpu; + else +-- +2.31.1 diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/support-ios.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/support-ios.patch new file mode 100644 index 000000000000..74e56d130ed5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/support-ios.patch @@ -0,0 +1,168 @@ +diff --git a/bfd/config.bfd b/bfd/config.bfd +index f04a993f06..1e24a9d030 100644 +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -238,7 +238,7 @@ case "${targ}" in + + # START OF targmatch.h + #ifdef BFD64 +- aarch64-*-darwin*) ++ aarch64-*-darwin* | aarch64-*-ios*) + targ_defvec=aarch64_mach_o_vec + targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec" + targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" +@@ -358,7 +358,7 @@ case "${targ}" in + targ_selvecs=arc_elf32_be_vec + ;; + +- arm-*-darwin*) ++ arm-*-darwin* | arm-*-ios*) + targ_defvec=arm_mach_o_vec + targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec" + targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" +@@ -678,7 +678,7 @@ case "${targ}" in + i[3-7]86-*-aix*) + targ_defvec=i386_coff_vec + ;; +- i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*) ++ i[3-7]86-*-darwin* | i[3-7]86-*-ios* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*) + targ_defvec=i386_mach_o_vec + targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ64_selvecs=x86_64_mach_o_vec +@@ -762,7 +762,7 @@ case "${targ}" in + targ_defvec=x86_64_elf64_cloudabi_vec + want64=true + ;; +- x86_64-*-darwin*) ++ x86_64-*-darwin* | x86_64-*-ios*) + targ_defvec=x86_64_mach_o_vec + targ_selvecs="i386_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch" +@@ -1402,7 +1402,7 @@ case "${targ}" in + targ_selvecs="powerpc_elf32_le_vec powerpc_boot_vec" + targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec" + ;; +- powerpc-*-darwin* | powerpc-*-macos10* | powerpc-*-rhapsody*) ++ powerpc-*-darwin* | powerpc-*-ios* | powerpc-*-macos10* | powerpc-*-rhapsody*) + targ_defvec=mach_o_be_vec + targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_archs="$targ_archs bfd_i386_arch" +diff --git a/configure.ac b/configure.ac +index aae94501e4..2cceb4dad4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -510,7 +510,7 @@ if test x$enable_libgomp = x ; then + ;; + *-*-solaris2* | *-*-hpux11*) + ;; +- *-*-darwin* | *-*-aix*) ++ *-*-darwin* | *-*-ios* | *-*-aix*) + ;; + nvptx*-*-*) + ;; +@@ -700,13 +700,13 @@ esac + + # Disable libffi for some systems. + case "${target}" in +- powerpc-*-darwin*) ++ powerpc-*-darwin* | powerpc-*-ios*) + ;; +- i[[3456789]]86-*-darwin*) ++ i[[3456789]]86-*-darwin* | i[[3456789]]86-*-ios*) + ;; +- x86_64-*-darwin[[912]]*) ++ x86_64-*-darwin[[912]]* | x86_64-*-ios[[912]]*) + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + noconfigdirs="$noconfigdirs target-libffi" + ;; + *-*-netware*) +@@ -788,7 +788,7 @@ esac + # Disable the go frontend on systems where it is known to not work. Please keep + # this in sync with contrib/config-list.mk. + case "${target}" in +-*-*-darwin* | *-*-cygwin* | *-*-mingw*) ++*-*-darwin* | *-*-ios* | *-*-cygwin* | *-*-mingw*) + unsupported_languages="$unsupported_languages go" + ;; + esac +@@ -797,7 +797,7 @@ esac + # For testing, you can easily override this with --enable-libgo. + if test x$enable_libgo = x; then + case "${target}" in +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + # PR 46986 + noconfigdirs="$noconfigdirs target-libgo" + ;; +@@ -916,27 +916,27 @@ esac + case "${target}" in + *-*-chorusos) + ;; +- aarch64-*-darwin*) ++ aarch64-*-darwin* | aarch64-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- arm-*-darwin*) ++ arm-*-darwin* | arm-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- powerpc-*-darwin*) ++ powerpc-*-darwin* | powerpc-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- i[[3456789]]86-*-darwin*) ++ i[[3456789]]86-*-darwin* | i[[3456789]]86-*-ios*) + noconfigdirs="$noconfigdirs ld gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- x86_64-*-darwin[[912]]*) ++ x86_64-*-darwin[[912]]* | x86_64-*-ios[[912]]*) + noconfigdirs="$noconfigdirs ld gas gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +@@ -1226,7 +1226,7 @@ case "${host}" in + hppa*-*) + host_makefile_frag="config/mh-pa" + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + host_makefile_frag="config/mh-darwin" + ;; + powerpc-*-aix*) +@@ -1697,7 +1697,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + build_lto_plugin=yes + ],[if test x"$default_enable_lto" = x"yes" ; then + case $target in +- *-apple-darwin[[912]]* | *-cygwin* | *-mingw* | *djgpp*) ;; ++ *-apple-darwin[[912]]* | *-apple-ios[[912]]* | *-cygwin* | *-mingw* | *djgpp*) ;; + # On other non-ELF platforms, LTO has yet to be validated. + *) enable_lto=no ;; + esac +@@ -1708,7 +1708,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in +- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;; ++ *-cygwin* | *-mingw* | *-apple-darwin* | *-apple-ios* | *djgpp*) ;; + *) if test x"$enable_lto" = x"yes"; then + AC_MSG_ERROR([LTO support is not enabled for this target.]) + fi +@@ -2590,7 +2590,7 @@ rm -f conftest* + # Decide which environment variable is used to find dynamic libraries. + case "${host}" in + *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; +- *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; ++ *-*-darwin* | *-*-ios* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; + *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; + *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; + esac diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/2.38/windres-locate-gcc.patch b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/windres-locate-gcc.patch new file mode 100644 index 000000000000..721667c62cec --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/2.38/windres-locate-gcc.patch @@ -0,0 +1,19 @@ +diff --git a/binutils/resrc.c b/binutils/resrc.c +index a875c3a4..0411d047 100644 +--- a/binutils/resrc.c ++++ b/binutils/resrc.c +@@ -521,7 +521,13 @@ read_rc_file (const char *filename, const char *preprocessor, + + cpp_pipe = 0; + +- if (dash) ++ /* Nixpkgs specific : look first at the prefixed path ++ ( there should be no gcc in the binutils folder ) */ ++ if (slash && dash) { ++ cpp_pipe = look_for_default(cmd, slash + 1, dash - slash, preprocargs, filename); ++ } ++ ++ if (dash && ! cpp_pipe) + { + /* First, try looking for a prefixed gcc in the windres + directory, with the same prefix as windres */ diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/CVE-2023-1972.patch b/nixpkgs/pkgs/development/tools/misc/binutils/CVE-2023-1972.patch new file mode 100644 index 000000000000..838fbf722761 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/CVE-2023-1972.patch @@ -0,0 +1,23 @@ +diff --git a/bfd/elf.c b/bfd/elf.c +index 027d0143735..185028cbd97 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) + bfd_set_error (bfd_error_file_too_big); + goto error_return_verdef; + } ++ ++ if (amt == 0) ++ goto error_return_verdef; + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); + if (elf_tdata (abfd)->verdef == NULL) + goto error_return_verdef; +@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) + bfd_set_error (bfd_error_file_too_big); + goto error_return; + } ++ if (amt == 0) ++ goto error_return; + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); + if (elf_tdata (abfd)->verdef == NULL) + goto error_return; diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/always-search-rpath.patch b/nixpkgs/pkgs/development/tools/misc/binutils/always-search-rpath.patch new file mode 100644 index 000000000000..2e9956e6b6e4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/always-search-rpath.patch @@ -0,0 +1,14 @@ +diff --git a/ld/genscripts.sh b/ld/genscripts.sh +index b6940d376d..0feb1adfd0 100755 +--- a/ld/genscripts.sh ++++ b/ld/genscripts.sh +@@ -125,6 +125,9 @@ if test "x$NATIVE" = "xyes" ; then + USE_LIBPATH=yes + fi + ++# TODO: why is this needed? ++USE_LIBPATH=yes ++ + # Set the library search path, for libraries named by -lfoo. + # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used. + # Otherwise, the default is set here. diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/avr-size.patch b/nixpkgs/pkgs/development/tools/misc/binutils/avr-size.patch new file mode 100644 index 000000000000..ae78228b0a34 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/avr-size.patch @@ -0,0 +1,435 @@ +diff --git a/binutils/size.c b/binutils/size.c +index 3697087714..f99d45a6bf 100644 +--- a/binutils/size.c ++++ b/binutils/size.c +@@ -51,7 +51,8 @@ enum output_format + { + FORMAT_BERKLEY, + FORMAT_SYSV, +- FORMAT_GNU ++ FORMAT_GNU, ++ FORMAT_AVR + }; + static enum output_format selected_output_format = + #if BSD_DEFAULT +@@ -74,6 +75,246 @@ static bfd_size_type total_textsize; + /* Program exit status. */ + static int return_code = 0; + ++ ++/* AVR Size specific stuff */ ++ ++#define AVR64 64UL ++#define AVR128 128UL ++#define AVR256 256UL ++#define AVR512 512UL ++#define AVR1K 1024UL ++#define AVR2K 2048UL ++#define AVR4K 4096UL ++#define AVR8K 8192UL ++#define AVR16K 16384UL ++#define AVR20K 20480UL ++#define AVR24K 24576UL ++#define AVR32K 32768UL ++#define AVR36K 36864UL ++#define AVR40K 40960UL ++#define AVR64K 65536UL ++#define AVR68K 69632UL ++#define AVR128K 131072UL ++#define AVR136K 139264UL ++#define AVR200K 204800UL ++#define AVR256K 262144UL ++#define AVR264K 270336UL ++ ++typedef struct ++{ ++ char *name; ++ long flash; ++ long ram; ++ long eeprom; ++} avr_device_t; ++ ++avr_device_t avr[] = ++{ ++ {"atxmega256a3", AVR264K, AVR16K, AVR4K}, ++ {"atxmega256a3b", AVR264K, AVR16K, AVR4K}, ++ {"atxmega256d3", AVR264K, AVR16K, AVR4K}, ++ ++ {"atmega2560", AVR256K, AVR8K, AVR4K}, ++ {"atmega2561", AVR256K, AVR8K, AVR4K}, ++ ++ {"atxmega192a3", AVR200K, AVR16K, AVR2K}, ++ {"atxmega192d3", AVR200K, AVR16K, AVR2K}, ++ ++ {"atxmega128a1", AVR136K, AVR8K, AVR2K}, ++ {"atxmega128a1u", AVR136K, AVR8K, AVR2K}, ++ {"atxmega128a3", AVR136K, AVR8K, AVR2K}, ++ {"atxmega128d3", AVR136K, AVR8K, AVR2K}, ++ ++ {"at43usb320", AVR128K, 608UL, 0UL}, ++ {"at90can128", AVR128K, AVR4K, AVR4K}, ++ {"at90usb1286", AVR128K, AVR8K, AVR4K}, ++ {"at90usb1287", AVR128K, AVR8K, AVR4K}, ++ {"atmega128", AVR128K, AVR4K, AVR4K}, ++ {"atmega1280", AVR128K, AVR8K, AVR4K}, ++ {"atmega1281", AVR128K, AVR8K, AVR4K}, ++ {"atmega1284p", AVR128K, AVR16K, AVR4K}, ++ {"atmega128rfa1", AVR128K, AVR16K, AVR4K}, ++ {"atmega103", AVR128K, 4000UL, AVR4K}, ++ ++ {"atxmega64a1", AVR68K, AVR4K, AVR2K}, ++ {"atxmega64a1u", AVR68K, AVR4K, AVR2K}, ++ {"atxmega64a3", AVR68K, AVR4K, AVR2K}, ++ {"atxmega64d3", AVR68K, AVR4K, AVR2K}, ++ ++ {"at90can64", AVR64K, AVR4K, AVR2K}, ++ {"at90scr100", AVR64K, AVR4K, AVR2K}, ++ {"at90usb646", AVR64K, AVR4K, AVR2K}, ++ {"at90usb647", AVR64K, AVR4K, AVR2K}, ++ {"atmega64", AVR64K, AVR4K, AVR2K}, ++ {"atmega640", AVR64K, AVR8K, AVR4K}, ++ {"atmega644", AVR64K, AVR4K, AVR2K}, ++ {"atmega644a", AVR64K, AVR4K, AVR2K}, ++ {"atmega644p", AVR64K, AVR4K, AVR2K}, ++ {"atmega644pa", AVR64K, AVR4K, AVR2K}, ++ {"atmega645", AVR64K, AVR4K, AVR2K}, ++ {"atmega645a", AVR64K, AVR4K, AVR2K}, ++ {"atmega645p", AVR64K, AVR4K, AVR2K}, ++ {"atmega6450", AVR64K, AVR4K, AVR2K}, ++ {"atmega6450a", AVR64K, AVR4K, AVR2K}, ++ {"atmega6450p", AVR64K, AVR4K, AVR2K}, ++ {"atmega649", AVR64K, AVR4K, AVR2K}, ++ {"atmega649a", AVR64K, AVR4K, AVR2K}, ++ {"atmega649p", AVR64K, AVR4K, AVR2K}, ++ {"atmega6490", AVR64K, AVR4K, AVR2K}, ++ {"atmega6490a", AVR64K, AVR4K, AVR2K}, ++ {"atmega6490p", AVR64K, AVR4K, AVR2K}, ++ {"atmega64c1", AVR64K, AVR4K, AVR2K}, ++ {"atmega64hve", AVR64K, AVR4K, AVR1K}, ++ {"atmega64m1", AVR64K, AVR4K, AVR2K}, ++ {"m3000", AVR64K, AVR4K, 0UL}, ++ ++ {"atmega406", AVR40K, AVR2K, AVR512}, ++ ++ {"atxmega32a4", AVR36K, AVR4K, AVR1K}, ++ {"atxmega32d4", AVR36K, AVR4K, AVR1K}, ++ ++ {"at90can32", AVR32K, AVR2K, AVR1K}, ++ {"at94k", AVR32K, AVR4K, 0UL}, ++ {"atmega32", AVR32K, AVR2K, AVR1K}, ++ {"atmega323", AVR32K, AVR2K, AVR1K}, ++ {"atmega324a", AVR32K, AVR2K, AVR1K}, ++ {"atmega324p", AVR32K, AVR2K, AVR1K}, ++ {"atmega324pa", AVR32K, AVR2K, AVR1K}, ++ {"atmega325", AVR32K, AVR2K, AVR1K}, ++ {"atmega325a", AVR32K, AVR2K, AVR1K}, ++ {"atmega325p", AVR32K, AVR2K, AVR1K}, ++ {"atmega3250", AVR32K, AVR2K, AVR1K}, ++ {"atmega3250a", AVR32K, AVR2K, AVR1K}, ++ {"atmega3250p", AVR32K, AVR2K, AVR1K}, ++ {"atmega328", AVR32K, AVR2K, AVR1K}, ++ {"atmega328p", AVR32K, AVR2K, AVR1K}, ++ {"atmega329", AVR32K, AVR2K, AVR1K}, ++ {"atmega329a", AVR32K, AVR2K, AVR1K}, ++ {"atmega329p", AVR32K, AVR2K, AVR1K}, ++ {"atmega329pa", AVR32K, AVR2K, AVR1K}, ++ {"atmega3290", AVR32K, AVR2K, AVR1K}, ++ {"atmega3290a", AVR32K, AVR2K, AVR1K}, ++ {"atmega3290p", AVR32K, AVR2K, AVR1K}, ++ {"atmega32hvb", AVR32K, AVR2K, AVR1K}, ++ {"atmega32c1", AVR32K, AVR2K, AVR1K}, ++ {"atmega32hvb", AVR32K, AVR2K, AVR1K}, ++ {"atmega32m1", AVR32K, AVR2K, AVR1K}, ++ {"atmega32u2", AVR32K, AVR1K, AVR1K}, ++ {"atmega32u4", AVR32K, 2560UL, AVR1K}, ++ {"atmega32u6", AVR32K, 2560UL, AVR1K}, ++ ++ {"at43usb355", AVR24K, 1120UL, 0UL}, ++ ++ {"atxmega16a4", AVR20K, AVR2K, AVR1K}, ++ {"atxmega16d4", AVR20K, AVR2K, AVR1K}, ++ ++ {"at76c711", AVR16K, AVR2K, 0UL}, ++ {"at90pwm216", AVR16K, AVR1K, AVR512}, ++ {"at90pwm316", AVR16K, AVR1K, AVR512}, ++ {"at90usb162", AVR16K, AVR512, AVR512}, ++ {"atmega16", AVR16K, AVR1K, AVR512}, ++ {"atmega16a", AVR16K, AVR1K, AVR512}, ++ {"atmega161", AVR16K, AVR1K, AVR512}, ++ {"atmega162", AVR16K, AVR1K, AVR512}, ++ {"atmega163", AVR16K, AVR1K, AVR512}, ++ {"atmega164", AVR16K, AVR1K, AVR512}, ++ {"atmega164a", AVR16K, AVR1K, AVR512}, ++ {"atmega164p", AVR16K, AVR1K, AVR512}, ++ {"atmega165a", AVR16K, AVR1K, AVR512}, ++ {"atmega165", AVR16K, AVR1K, AVR512}, ++ {"atmega165p", AVR16K, AVR1K, AVR512}, ++ {"atmega168", AVR16K, AVR1K, AVR512}, ++ {"atmega168a", AVR16K, AVR1K, AVR512}, ++ {"atmega168p", AVR16K, AVR1K, AVR512}, ++ {"atmega169", AVR16K, AVR1K, AVR512}, ++ {"atmega169a", AVR16K, AVR1K, AVR512}, ++ {"atmega169p", AVR16K, AVR1K, AVR512}, ++ {"atmega169pa", AVR16K, AVR1K, AVR512}, ++ {"atmega16hva", AVR16K, 768UL, AVR256}, ++ {"atmega16hva2", AVR16K, AVR1K, AVR256}, ++ {"atmega16hvb", AVR16K, AVR1K, AVR512}, ++ {"atmega16m1", AVR16K, AVR1K, AVR512}, ++ {"atmega16u2", AVR16K, AVR512, AVR512}, ++ {"atmega16u4", AVR16K, 1280UL, AVR512}, ++ {"attiny167", AVR16K, AVR512, AVR512}, ++ ++ {"at90c8534", AVR8K, 352UL, AVR512}, ++ {"at90pwm1", AVR8K, AVR512, AVR512}, ++ {"at90pwm2", AVR8K, AVR512, AVR512}, ++ {"at90pwm2b", AVR8K, AVR512, AVR512}, ++ {"at90pwm3", AVR8K, AVR512, AVR512}, ++ {"at90pwm3b", AVR8K, AVR512, AVR512}, ++ {"at90pwm81", AVR8K, AVR256, AVR512}, ++ {"at90s8515", AVR8K, AVR512, AVR512}, ++ {"at90s8535", AVR8K, AVR512, AVR512}, ++ {"at90usb82", AVR8K, AVR512, AVR512}, ++ {"ata6289", AVR8K, AVR512, 320UL}, ++ {"atmega8", AVR8K, AVR1K, AVR512}, ++ {"atmega8515", AVR8K, AVR512, AVR512}, ++ {"atmega8535", AVR8K, AVR512, AVR512}, ++ {"atmega88", AVR8K, AVR1K, AVR512}, ++ {"atmega88a", AVR8K, AVR1K, AVR512}, ++ {"atmega88p", AVR8K, AVR1K, AVR512}, ++ {"atmega88pa", AVR8K, AVR1K, AVR512}, ++ {"atmega8hva", AVR8K, 768UL, AVR256}, ++ {"atmega8u2", AVR8K, AVR512, AVR512}, ++ {"attiny84", AVR8K, AVR512, AVR512}, ++ {"attiny84a", AVR8K, AVR512, AVR512}, ++ {"attiny85", AVR8K, AVR512, AVR512}, ++ {"attiny861", AVR8K, AVR512, AVR512}, ++ {"attiny861a", AVR8K, AVR512, AVR512}, ++ {"attiny87", AVR8K, AVR512, AVR512}, ++ {"attiny88", AVR8K, AVR512, AVR64}, ++ ++ {"at90s4414", AVR4K, 352UL, AVR256}, ++ {"at90s4433", AVR4K, AVR128, AVR256}, ++ {"at90s4434", AVR4K, 352UL, AVR256}, ++ {"atmega48", AVR4K, AVR512, AVR256}, ++ {"atmega48a", AVR4K, AVR512, AVR256}, ++ {"atmega48p", AVR4K, AVR512, AVR256}, ++ {"attiny4313", AVR4K, AVR256, AVR256}, ++ {"attiny43u", AVR4K, AVR256, AVR64}, ++ {"attiny44", AVR4K, AVR256, AVR256}, ++ {"attiny44a", AVR4K, AVR256, AVR256}, ++ {"attiny45", AVR4K, AVR256, AVR256}, ++ {"attiny461", AVR4K, AVR256, AVR256}, ++ {"attiny461a", AVR4K, AVR256, AVR256}, ++ {"attiny48", AVR4K, AVR256, AVR64}, ++ ++ {"at86rf401", AVR2K, 224UL, AVR128}, ++ {"at90s2313", AVR2K, AVR128, AVR128}, ++ {"at90s2323", AVR2K, AVR128, AVR128}, ++ {"at90s2333", AVR2K, 224UL, AVR128}, ++ {"at90s2343", AVR2K, AVR128, AVR128}, ++ {"attiny20", AVR2K, AVR128, 0UL}, ++ {"attiny22", AVR2K, 224UL, AVR128}, ++ {"attiny2313", AVR2K, AVR128, AVR128}, ++ {"attiny2313a", AVR2K, AVR128, AVR128}, ++ {"attiny24", AVR2K, AVR128, AVR128}, ++ {"attiny24a", AVR2K, AVR128, AVR128}, ++ {"attiny25", AVR2K, AVR128, AVR128}, ++ {"attiny26", AVR2K, AVR128, AVR128}, ++ {"attiny261", AVR2K, AVR128, AVR128}, ++ {"attiny261a", AVR2K, AVR128, AVR128}, ++ {"attiny28", AVR2K, 0UL, 0UL}, ++ {"attiny40", AVR2K, AVR256, 0UL}, ++ ++ {"at90s1200", AVR1K, 0UL, AVR64}, ++ {"attiny9", AVR1K, 32UL, 0UL}, ++ {"attiny10", AVR1K, 32UL, 0UL}, ++ {"attiny11", AVR1K, 0UL, AVR64}, ++ {"attiny12", AVR1K, 0UL, AVR64}, ++ {"attiny13", AVR1K, AVR64, AVR64}, ++ {"attiny13a", AVR1K, AVR64, AVR64}, ++ {"attiny15", AVR1K, 0UL, AVR64}, ++ ++ {"attiny4", AVR512, 32UL, 0UL}, ++ {"attiny5", AVR512, 32UL, 0UL}, ++}; ++ ++static char *avrmcu = NULL; ++ ++ + static char *target = NULL; + + /* Forward declarations. */ +@@ -89,7 +330,8 @@ usage (FILE *stream, int status) + fprintf (stream, _(" Displays the sizes of sections inside binary files\n")); + fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n")); + fprintf (stream, _(" The options are:\n\ +- -A|-B|-G --format={sysv|berkeley|gnu} Select output style (default is %s)\n\ ++ -A|-B|-G|-C --format={sysv|berkeley|gnu|avr} Select output style (default is %s)\n\ ++ --mcu=<avrmcu> MCU name for AVR format only\n\ + -o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\ + -t --totals Display the total sizes (Berkeley only)\n\ + --common Display total size for *COM* syms\n\ +@@ -113,6 +355,7 @@ usage (FILE *stream, int status) + #define OPTION_FORMAT (200) + #define OPTION_RADIX (OPTION_FORMAT + 1) + #define OPTION_TARGET (OPTION_RADIX + 1) ++#define OPTION_MCU (OPTION_TARGET + 1) + + static struct option long_options[] = + { +@@ -120,6 +363,7 @@ static struct option long_options[] = + {"format", required_argument, 0, OPTION_FORMAT}, + {"radix", required_argument, 0, OPTION_RADIX}, + {"target", required_argument, 0, OPTION_TARGET}, ++ {"mcu", required_argument, 0, 203}, + {"totals", no_argument, &show_totals, 1}, + {"version", no_argument, &show_version, 1}, + {"help", no_argument, &show_help, 1}, +@@ -153,7 +397,7 @@ main (int argc, char **argv) + fatal (_("fatal error: libbfd ABI mismatch")); + set_default_bfd_target (); + +- while ((c = getopt_long (argc, argv, "ABGHhVvdfotx", long_options, ++ while ((c = getopt_long (argc, argv, "ABCGHhVvdfotx", long_options, + (int *) 0)) != EOF) + switch (c) + { +@@ -172,12 +416,20 @@ main (int argc, char **argv) + case 'g': + selected_output_format = FORMAT_GNU; + break; ++ case 'A': ++ case 'a': ++ selected_output_format = FORMAT_AVR; ++ break; + default: + non_fatal (_("invalid argument to --format: %s"), optarg); + usage (stderr, 1); + } + break; + ++ case OPTION_MCU: ++ avrmcu = optarg; ++ break; ++ + case OPTION_TARGET: + target = optarg; + break; +@@ -214,6 +466,9 @@ main (int argc, char **argv) + case 'G': + selected_output_format = FORMAT_GNU; + break; ++ case 'C': ++ selected_output_format = FORMAT_AVR; ++ break; + case 'v': + case 'V': + show_version = 1; +@@ -656,6 +911,98 @@ print_sysv_format (bfd *file) + printf ("\n\n"); + } + ++static avr_device_t * ++avr_find_device (void) ++{ ++ unsigned int i; ++ if (avrmcu != NULL) ++ { ++ for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++) ++ { ++ if (strcmp(avr[i].name, avrmcu) == 0) ++ { ++ /* Match found */ ++ return (&avr[i]); ++ } ++ } ++ } ++ return (NULL); ++} ++ ++static void ++print_avr_format (bfd *file) ++{ ++ char *avr_name = "Unknown"; ++ int flashmax = 0; ++ int rammax = 0; ++ int eeprommax = 0; ++ asection *section; ++ bfd_size_type my_datasize = 0; ++ bfd_size_type my_textsize = 0; ++ bfd_size_type my_bsssize = 0; ++ bfd_size_type bootloadersize = 0; ++ bfd_size_type noinitsize = 0; ++ bfd_size_type eepromsize = 0; ++ ++ avr_device_t *avrdevice = avr_find_device(); ++ if (avrdevice != NULL) ++ { ++ avr_name = avrdevice->name; ++ flashmax = avrdevice->flash; ++ rammax = avrdevice->ram; ++ eeprommax = avrdevice->eeprom; ++ } ++ ++ if ((section = bfd_get_section_by_name (file, ".data")) != NULL) ++ my_datasize = bfd_section_size (section); ++ if ((section = bfd_get_section_by_name (file, ".text")) != NULL) ++ my_textsize = bfd_section_size (section); ++ if ((section = bfd_get_section_by_name (file, ".bss")) != NULL) ++ my_bsssize = bfd_section_size (section); ++ if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL) ++ bootloadersize = bfd_section_size (section); ++ if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL) ++ noinitsize = bfd_section_size (section); ++ if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL) ++ eepromsize = bfd_section_size (section); ++ ++ bfd_size_type text = my_textsize + my_datasize + bootloadersize; ++ bfd_size_type data = my_datasize + my_bsssize + noinitsize; ++ bfd_size_type eeprom = eepromsize; ++ ++ printf ("AVR Memory Usage\n" ++ "----------------\n" ++ "Device: %s\n\n", avr_name); ++ ++ /* Text size */ ++ printf ("Program:%8ld bytes", text); ++ if (flashmax > 0) ++ { ++ printf (" (%2.1f%% Full)", ((float)text / flashmax) * 100); ++ } ++ printf ("\n(.text + .data + .bootloader)\n\n"); ++ ++ /* Data size */ ++ printf ("Data: %8ld bytes", data); ++ if (rammax > 0) ++ { ++ printf (" (%2.1f%% Full)", ((float)data / rammax) * 100); ++ } ++ printf ("\n(.data + .bss + .noinit)\n\n"); ++ ++ /* EEPROM size */ ++ if (eeprom > 0) ++ { ++ printf ("EEPROM: %8ld bytes", eeprom); ++ if (eeprommax > 0) ++ { ++ printf (" (%2.1f%% Full)", ((float)eeprom / eeprommax) * 100); ++ } ++ printf ("\n(.eeprom)\n\n"); ++ } ++} ++ ++ + static void + print_sizes (bfd *file) + { +@@ -663,6 +1010,8 @@ print_sizes (bfd *file) + calculate_common_size (file); + if (selected_output_format == FORMAT_SYSV) + print_sysv_format (file); ++ else if (selected_output_format == FORMAT_AVR) ++ print_avr_format (file); + else + print_berkeley_or_gnu_format (file); + } diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/default.nix b/nixpkgs/pkgs/development/tools/misc/binutils/default.nix new file mode 100644 index 000000000000..fe9ec6a865f9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/default.nix @@ -0,0 +1,281 @@ +let + withGold = platform: platform.parsed.kernel.execFormat.name == "elf" && !platform.isRiscV && !platform.isLoongArch64; +in + +{ stdenv +, autoreconfHook +, autoconf269, automake, libtool +, bison +, buildPackages +, fetchFromGitHub +, fetchurl +, flex +, gettext +, lib +, noSysDirs +, perl +, substitute +, zlib + +, enableGold ? withGold stdenv.targetPlatform +, enableGoldDefault ? false +, enableShared ? !stdenv.hostPlatform.isStatic + # WARN: Enabling all targets increases output size to a multiple. +, withAllTargets ? false +}: + +# WARN: configure silently disables ld.gold if it's unsupported, so we need to +# make sure that intent matches result ourselves. +assert enableGold -> withGold stdenv.targetPlatform; +assert enableGoldDefault -> enableGold; + + +let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + + version = "2.40"; + + srcs = { + normal = fetchurl { + url = "mirror://gnu/binutils/binutils-${version}.tar.bz2"; + hash = "sha256-+CmOsVOks30RLpRapcsoUAQLzyaj6mW1pxXIOv4F5Io="; + }; + vc4-none = fetchFromGitHub { + owner = "itszor"; + repo = "binutils-vc4"; + rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36"; + sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"; + }; + }; + + #INFO: The targetPrefix prepended to binary names to allow multiple binuntils + # on the PATH to both be usable. + targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; +in + +stdenv.mkDerivation (finalAttrs: { + pname = targetPrefix + "binutils"; + inherit version; + + # HACK: Ensure that we preserve source from bootstrap binutils to not rebuild LLVM + src = stdenv.__bootPackages.binutils-unwrapped.src + or srcs.${targetPlatform.system} + or srcs.normal; + + # WARN: this package is used for bootstrapping fetchurl, and thus cannot use + # fetchpatch! All mutable patches (generated by GitHub or cgit) that are + # needed here should be included directly in Nixpkgs as files. + patches = [ + # Make binutils output deterministic by default. + ./deterministic.patch + + + # Breaks nm BSD flag detection, heeds an upstream fix: + # https://sourceware.org/PR29547 + ./0001-Revert-libtool.m4-fix-the-NM-nm-over-here-B-option-w.patch + ./0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch + + # Required for newer macos versions + ./0001-libtool.m4-update-macos-version-detection-block.patch + + # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's + # not clear why this behavior was decided upon but it has the unfortunate + # consequence that the linker will fail to find transitive dependencies of + # shared objects when cross-compiling. Consequently, we are forced to + # override this behavior, forcing ld to search DT_RPATH even when + # cross-compiling. + ./always-search-rpath.patch + + # Avoid `lib -> out -> lib` reference. Normally `bfd-plugins` does + # not need to know binutils' BINDIR at all. It's an absolute path + # where libraries are stored. + ./plugins-no-BINDIR.patch + + # CVE-2023-1972 fix to bfd/elf.c from: + # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57 + ./CVE-2023-1972.patch + ] + ++ lib.optional targetPlatform.isiOS ./support-ios.patch + # Adds AVR-specific options to "size" for compatibility with Atmel's downstream distribution + # Patch from arch-community + # https://github.com/archlinux/svntogit-community/blob/c8d53dd1734df7ab15931f7fad0c9acb8386904c/trunk/avr-size.patch + ++ lib.optional targetPlatform.isAvr ./avr-size.patch + ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch + ++ lib.optional stdenv.targetPlatform.isMips64n64 + # this patch is from debian: + # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff + (if stdenv.targetPlatform.isMusl + then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; } + else ./mips64-default-n64.patch) + # This patch fixes a bug in 2.40 on MinGW, which breaks DXVK when cross-building from Darwin. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=30079 + ++ lib.optional stdenv.targetPlatform.isMinGW ./mingw-abort-fix.patch + ; + + outputs = [ "out" "info" "man" "dev" ] + # Ideally we would like to always install 'lib' into a separate + # target. Unfortunately cross-compiled binutils installs libraries + # across both `$lib/lib/` and `$out/$target/lib` with a reference + # from $out to $lib. Probably a binutils bug: all libraries should go + # to $lib as binutils does not build target libraries. Let's make our + # life slightly simpler by installing everything into $out for + # cross-binutils. + ++ lib.optionals (targetPlatform == hostPlatform) [ "lib" ]; + + strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + # texinfo was removed here in https://github.com/NixOS/nixpkgs/pull/210132 + # to reduce rebuilds during stdenv bootstrap. Please don't add it back without + # checking the impact there first. + nativeBuildInputs = [ + bison + perl + ] + ++ lib.optionals targetPlatform.isiOS [ autoreconfHook ] + ++ lib.optionals buildPlatform.isDarwin [ autoconf269 automake gettext libtool ] + ++ lib.optionals targetPlatform.isVc4 [ flex ] + ; + + buildInputs = [ zlib gettext ]; + + inherit noSysDirs; + + preConfigure = (lib.optionalString buildPlatform.isDarwin '' + for i in */configure.ac; do + pushd "$(dirname "$i")" + echo "Running autoreconf in $PWD" + # autoreconf doesn't work, don't know why + # autoreconf ''${autoreconfFlags:---install --force --verbose} + autoconf + popd + done + '') + '' + # Clear the default library search path. + if test "$noSysDirs" = "1"; then + echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt + fi + + # Use symlinks instead of hard links to save space ("strip" in the + # fixup phase strips each hard link separately). + for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in gold/Makefile.in; do + sed -i "$i" -e 's|ln |ln -s |' + done + + # autoreconfHook is not included for all targets. + # Call it here explicitly as well. + ${finalAttrs.postAutoreconf} + ''; + + postAutoreconf = '' + # As we regenerated configure build system tries hard to use + # texinfo to regenerate manuals. Let's avoid the dependency + # on texinfo in bootstrap path and keep manuals unmodified. + touch gas/doc/.dirstamp + touch gas/doc/asconfig.texi + touch gas/doc/as.1 + touch gas/doc/as.info + ''; + + # As binutils takes part in the stdenv building, we don't want references + # to the bootstrap-tools libgcc (as uses to happen on arm/mips) + env.NIX_CFLAGS_COMPILE = + if hostPlatform.isDarwin + then "-Wno-string-plus-int -Wno-deprecated-declarations" + else "-static-libgcc"; + + hardeningDisable = [ "format" "pie" ]; + + configurePlatforms = [ "build" "host" "target" ]; + + configureFlags = [ + "--enable-64-bit-bfd" + "--with-system-zlib" + + "--enable-deterministic-archives" + "--disable-werror" + "--enable-fix-loongson2f-nop" + + # Turn on --enable-new-dtags by default to make the linker set + # RUNPATH instead of RPATH on binaries. This is important because + # RUNPATH can be overridden using LD_LIBRARY_PATH at runtime. + "--enable-new-dtags" + + # force target prefix. Some versions of binutils will make it empty if + # `--host` and `--target` are too close, even if Nixpkgs thinks the + # platforms are different (e.g. because not all the info makes the + # `config`). Other versions of binutils will always prefix if `--target` is + # passed, even if `--host` and `--target` are the same. The easiest thing + # for us to do is not leave it to chance, and force the program prefix to be + # what we want it to be. + "--program-prefix=${targetPrefix}" + + # Unconditionally disable: + # - musl target needs porting: https://sourceware.org/PR29477 + "--disable-gprofng" + + # By default binutils searches $libdir for libraries. This brings in + # libbfd and libopcodes into a default visibility. Drop default lib + # path to force users to declare their use of these libraries. + "--with-lib-path=:" + ] + ++ lib.optionals withAllTargets [ "--enable-targets=all" ] + ++ lib.optionals enableGold [ + "--enable-gold${lib.optionalString enableGoldDefault "=default"}" + "--enable-plugins" + ] ++ (if enableShared + then [ "--enable-shared" "--disable-static" ] + else [ "--disable-shared" "--enable-static" ]) + ; + + # Fails + doCheck = false; + + # Break dependency on pkgsBuildBuild.gcc when building a cross-binutils + stripDebugList = if stdenv.hostPlatform != stdenv.targetPlatform then "bin lib ${stdenv.hostPlatform.config}" else null; + + # INFO: Otherwise it fails with: + # `./sanity.sh: line 36: $out/bin/size: not found` + doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform); + + enableParallelBuilding = true; + + # For the same reason we don't split "lib" output we undo the $target/ + # prefix for installed headers and libraries we link: + # $out/$host/$target/lib/* to $out/lib/ + # $out/$host/$target/include/* to $dev/include/* + # TODO(trofi): fix installation paths upstream so we could remove this + # code and have "lib" output unconditionally. + postInstall = lib.optionalString (hostPlatform.config != targetPlatform.config) '' + ln -s $out/${hostPlatform.config}/${targetPlatform.config}/lib/* $out/lib/ + ln -s $out/${hostPlatform.config}/${targetPlatform.config}/include/* $dev/include/ + ''; + + passthru = { + inherit targetPrefix; + hasGold = enableGold; + isGNU = true; + # Having --enable-plugins is not enough, system has to support + # dlopen() or equivalent. See config/plugins.m4 and configure.ac + # (around PLUGINS) for cases that support or not support plugins. + # No platform specific filters yet here. + hasPluginAPI = enableGold; + }; + + meta = with lib; { + description = "Tools for manipulating binaries (linker, assembler, etc.)"; + longDescription = '' + The GNU Binutils are a collection of binary tools. The main + ones are `ld' (the GNU linker) and `as' (the GNU assembler). + They also include the BFD (Binary File Descriptor) library, + `gprof', `nm', `strip', etc. + ''; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 lovesegfault ]; + platforms = platforms.unix; + + # INFO: Give binutils a lower priority than gcc-wrapper to prevent a + # collision due to the ld/as wrappers/symlinks in the latter. + priority = 10; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/deterministic.patch b/nixpkgs/pkgs/development/tools/misc/binutils/deterministic.patch new file mode 100644 index 000000000000..736e0aca6ce1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/deterministic.patch @@ -0,0 +1,12 @@ +diff -ur orig/binutils-2.23.1/ld/ldlang.c binutils-2.23.1/ld/ldlang.c +--- orig/ld/ldlang.c ++++ new/ld/ldlang.c +@@ -3095,6 +3095,8 @@ + ldfile_output_machine)) + einfo (_("%P%F:%s: can not set architecture: %E\n"), name); + ++ link_info.output_bfd->flags |= BFD_DETERMINISTIC_OUTPUT; ++ + link_info.hash = bfd_link_hash_table_create (link_info.output_bfd); + if (link_info.hash == NULL) + einfo (_("%P%F: can not create hash table: %E\n")); diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/libbfd.nix b/nixpkgs/pkgs/development/tools/misc/binutils/libbfd.nix new file mode 100644 index 000000000000..dca62b82eead --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/libbfd.nix @@ -0,0 +1,34 @@ +{ lib, stdenv +, binutils-unwrapped-all-targets +}: + +stdenv.mkDerivation { + pname = "libbfd"; + inherit (binutils-unwrapped-all-targets) version; + + dontUnpack = true; + dontBuild = true; + dontInstall = true; + propagatedBuildInputs = [ + binutils-unwrapped-all-targets.dev + binutils-unwrapped-all-targets.lib + ]; + + passthru = { + inherit (binutils-unwrapped-all-targets) dev hasPluginAPI; + }; + + meta = with lib; { + description = "A library for manipulating containers of machine code"; + longDescription = '' + BFD is a library which provides a single interface to read and write + object files, executables, archive files, and core files in any format. + It is associated with GNU Binutils, and elsewhere often distributed with + it. + ''; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/libopcodes.nix b/nixpkgs/pkgs/development/tools/misc/binutils/libopcodes.nix new file mode 100644 index 000000000000..e067282a0e5e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/libopcodes.nix @@ -0,0 +1,28 @@ +{ lib, stdenv +, binutils-unwrapped-all-targets +}: + +stdenv.mkDerivation { + pname = "libopcodes"; + inherit (binutils-unwrapped-all-targets) version; + + dontUnpack = true; + dontBuild = true; + dontInstall = true; + propagatedBuildInputs = [ + binutils-unwrapped-all-targets.dev + binutils-unwrapped-all-targets.lib + ]; + + passthru = { + inherit (binutils-unwrapped-all-targets) dev hasPluginAPI; + }; + + meta = with lib; { + description = "A library from binutils for manipulating machine code"; + homepage = "https://www.gnu.org/software/binutils/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/mingw-abort-fix.patch b/nixpkgs/pkgs/development/tools/misc/binutils/mingw-abort-fix.patch new file mode 100644 index 000000000000..b322d6ad7cd1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/mingw-abort-fix.patch @@ -0,0 +1,30 @@ +From b7eab2a9d4f4e92692daf14b09fc95ca11b72e30 Mon Sep 17 00:00:00 2001 +From: Michael Matz <matz@suse.de> +Date: Thu, 9 Feb 2023 15:29:00 +0100 +Subject: [PATCH 1/1] Fix PR30079: abort on mingw + +the early-out in wild_sort is not enough, it might still be +that filenames are equal _and_ the wildcard list doesn't specify +a sort order either. Don't call compare_section then. + +Tested on all targets. +--- + ld/ldlang.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ld/ldlang.c b/ld/ldlang.c +index 84a2914fc26..b5e0d026ae4 100644 +--- a/ld/ldlang.c ++++ b/ld/ldlang.c +@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wild, + looking at the sections for this file. */ + + /* Find the correct node to append this section. */ +- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0) ++ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none ++ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0) + tree = &((*tree)->left); + else + tree = &((*tree)->right); +-- +2.31.1 diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/mips64-default-n64.patch b/nixpkgs/pkgs/development/tools/misc/binutils/mips64-default-n64.patch new file mode 100644 index 000000000000..00581279f85e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/mips64-default-n64.patch @@ -0,0 +1,82 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -927,11 +927,21 @@ case "${targ}" in + targ_defvec=mips_elf32_be_vec + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; +- mips64*el-*-linux*) ++ mips*64*el-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec" ++ want64=true ++ ;; ++ mips*64*-*-linux*-gnuabi64) ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" ++ want64=true ++ ;; ++ mips*64*el-*-linux*) + targ_defvec=mips_elf32_ntrad_le_vec + targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" + ;; +- mips64*-*-linux*) ++ mips*64*-*-linux*) + targ_defvec=mips_elf32_ntrad_be_vec + targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" + ;; +--- a/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d ++++ b/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d +@@ -1,4 +1,5 @@ + #PROG: objcopy ++#as: -n32 + #readelf: --notes --wide + #objcopy: --merge-notes + #name: MIPS merge notes section (n32) +--- a/gas/configure ++++ b/gas/configure +@@ -12167,6 +12167,9 @@ _ACEOF + esac + # Decide which ABI to target by default. + case ${target} in ++ mips*64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ + | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) + mips_default_abi=N32_ABI +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -384,6 +384,9 @@ changequote([,])dnl + esac + # Decide which ABI to target by default. + case ${target} in ++ mips*64*-linux-gnuabi64) ++ mips_default_abi=N64_ABI ++ ;; + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ + | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) + mips_default_abi=N32_ABI +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -543,11 +543,19 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 ++mips*64*el-*-linux-gnuabi64) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" ++ targ_extra_libpath=$targ_extra_emuls ++ ;; ++mips*64*el-*-linux-*) targ_emul=elf32ltsmipn32 + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 ++mips*64*-*-linux-gnuabi64) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" ++ targ_extra_libpath=$targ_extra_emuls ++ ;; ++mips*64*-*-linux-*) targ_emul=elf32btsmipn32 + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/plugins-no-BINDIR.patch b/nixpkgs/pkgs/development/tools/misc/binutils/plugins-no-BINDIR.patch new file mode 100644 index 000000000000..562aad33eccd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/plugins-no-BINDIR.patch @@ -0,0 +1,25 @@ +Avoid `lib -> out -> lib` reference. Normally `bfd-plugins` does not +need to know binutils' BINDIR at all. It's an absolute path where +libraries are stored. +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -493,7 +493,7 @@ build_plugin_list (bfd *abfd) + when configuring binutils using --libdir. Search in the proper + path first, then the old one for backwards compatibility. */ + static const char *path[] +- = { LIBDIR "/bfd-plugins", BINDIR "/../lib/bfd-plugins" }; ++ = { LIBDIR "/bfd-plugins", }; + struct stat last_st; + unsigned int i; + +@@ -508,9 +508,7 @@ build_plugin_list (bfd *abfd) + last_st.st_ino = 0; + for (i = 0; i < sizeof (path) / sizeof (path[0]); i++) + { +- char *plugin_dir = make_relative_prefix (plugin_program_name, +- BINDIR, +- path[i]); ++ char *plugin_dir = xstrdup (path[i]); + if (plugin_dir) + { + struct stat st; diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/ppc-make-machine-less-strict.patch b/nixpkgs/pkgs/development/tools/misc/binutils/ppc-make-machine-less-strict.patch new file mode 100644 index 000000000000..c2452414fc7d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/ppc-make-machine-less-strict.patch @@ -0,0 +1,51 @@ +From cebc89b9328eab994f6b0314c263f94e7949a553 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Mon, 21 Feb 2022 10:58:57 +1030 +Subject: [PATCH] binutils 2.38 vs. ppc32 linux kernel + +Commit b25f942e18d6 made .machine more strict. Weaken it again. + + * config/tc-ppc.c (ppc_machine): Treat an early .machine specially, + keeping sticky options to work around gcc bugs. +--- + gas/config/tc-ppc.c | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c +index 054f9c72161..89bc7d3f9b9 100644 +--- a/gas/config/tc-ppc.c ++++ b/gas/config/tc-ppc.c +@@ -5965,7 +5965,30 @@ ppc_machine (int ignore ATTRIBUTE_UNUSED) + options do not count as a new machine, instead they add + to currently selected opcodes. */ + ppc_cpu_t machine_sticky = 0; +- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string); ++ /* Unfortunately, some versions of gcc emit a .machine ++ directive very near the start of the compiler's assembly ++ output file. This is bad because it overrides user -Wa ++ cpu selection. Worse, there are versions of gcc that ++ emit the *wrong* cpu, not even respecting the -mcpu given ++ to gcc. See gcc pr101393. And to compound the problem, ++ as of 20220222 gcc doesn't pass the correct cpu option to ++ gas on the command line. See gcc pr59828. Hack around ++ this by keeping sticky options for an early .machine. */ ++ asection *sec; ++ for (sec = stdoutput->sections; sec != NULL; sec = sec->next) ++ { ++ segment_info_type *info = seg_info (sec); ++ /* Are the frags for this section perturbed from their ++ initial state? Even .align will count here. */ ++ if (info != NULL ++ && (info->frchainP->frch_root != info->frchainP->frch_last ++ || info->frchainP->frch_root->fr_type != rs_fill ++ || info->frchainP->frch_root->fr_fix != 0)) ++ break; ++ } ++ new_cpu = ppc_parse_cpu (ppc_cpu, ++ sec == NULL ? &sticky : &machine_sticky, ++ cpu_string); + if (new_cpu != 0) + ppc_cpu = new_cpu; + else +-- +2.31.1 diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/support-ios.patch b/nixpkgs/pkgs/development/tools/misc/binutils/support-ios.patch new file mode 100644 index 000000000000..74e56d130ed5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/support-ios.patch @@ -0,0 +1,168 @@ +diff --git a/bfd/config.bfd b/bfd/config.bfd +index f04a993f06..1e24a9d030 100644 +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -238,7 +238,7 @@ case "${targ}" in + + # START OF targmatch.h + #ifdef BFD64 +- aarch64-*-darwin*) ++ aarch64-*-darwin* | aarch64-*-ios*) + targ_defvec=aarch64_mach_o_vec + targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec" + targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" +@@ -358,7 +358,7 @@ case "${targ}" in + targ_selvecs=arc_elf32_be_vec + ;; + +- arm-*-darwin*) ++ arm-*-darwin* | arm-*-ios*) + targ_defvec=arm_mach_o_vec + targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec" + targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" +@@ -678,7 +678,7 @@ case "${targ}" in + i[3-7]86-*-aix*) + targ_defvec=i386_coff_vec + ;; +- i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*) ++ i[3-7]86-*-darwin* | i[3-7]86-*-ios* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*) + targ_defvec=i386_mach_o_vec + targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ64_selvecs=x86_64_mach_o_vec +@@ -762,7 +762,7 @@ case "${targ}" in + targ_defvec=x86_64_elf64_cloudabi_vec + want64=true + ;; +- x86_64-*-darwin*) ++ x86_64-*-darwin* | x86_64-*-ios*) + targ_defvec=x86_64_mach_o_vec + targ_selvecs="i386_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch" +@@ -1402,7 +1402,7 @@ case "${targ}" in + targ_selvecs="powerpc_elf32_le_vec powerpc_boot_vec" + targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec" + ;; +- powerpc-*-darwin* | powerpc-*-macos10* | powerpc-*-rhapsody*) ++ powerpc-*-darwin* | powerpc-*-ios* | powerpc-*-macos10* | powerpc-*-rhapsody*) + targ_defvec=mach_o_be_vec + targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_archs="$targ_archs bfd_i386_arch" +diff --git a/configure.ac b/configure.ac +index aae94501e4..2cceb4dad4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -510,7 +510,7 @@ if test x$enable_libgomp = x ; then + ;; + *-*-solaris2* | *-*-hpux11*) + ;; +- *-*-darwin* | *-*-aix*) ++ *-*-darwin* | *-*-ios* | *-*-aix*) + ;; + nvptx*-*-*) + ;; +@@ -700,13 +700,13 @@ esac + + # Disable libffi for some systems. + case "${target}" in +- powerpc-*-darwin*) ++ powerpc-*-darwin* | powerpc-*-ios*) + ;; +- i[[3456789]]86-*-darwin*) ++ i[[3456789]]86-*-darwin* | i[[3456789]]86-*-ios*) + ;; +- x86_64-*-darwin[[912]]*) ++ x86_64-*-darwin[[912]]* | x86_64-*-ios[[912]]*) + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + noconfigdirs="$noconfigdirs target-libffi" + ;; + *-*-netware*) +@@ -788,7 +788,7 @@ esac + # Disable the go frontend on systems where it is known to not work. Please keep + # this in sync with contrib/config-list.mk. + case "${target}" in +-*-*-darwin* | *-*-cygwin* | *-*-mingw*) ++*-*-darwin* | *-*-ios* | *-*-cygwin* | *-*-mingw*) + unsupported_languages="$unsupported_languages go" + ;; + esac +@@ -797,7 +797,7 @@ esac + # For testing, you can easily override this with --enable-libgo. + if test x$enable_libgo = x; then + case "${target}" in +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + # PR 46986 + noconfigdirs="$noconfigdirs target-libgo" + ;; +@@ -916,27 +916,27 @@ esac + case "${target}" in + *-*-chorusos) + ;; +- aarch64-*-darwin*) ++ aarch64-*-darwin* | aarch64-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- arm-*-darwin*) ++ arm-*-darwin* | arm-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- powerpc-*-darwin*) ++ powerpc-*-darwin* | powerpc-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- i[[3456789]]86-*-darwin*) ++ i[[3456789]]86-*-darwin* | i[[3456789]]86-*-ios*) + noconfigdirs="$noconfigdirs ld gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- x86_64-*-darwin[[912]]*) ++ x86_64-*-darwin[[912]]* | x86_64-*-ios[[912]]*) + noconfigdirs="$noconfigdirs ld gas gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + noconfigdirs="$noconfigdirs ld gas gdb gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +@@ -1226,7 +1226,7 @@ case "${host}" in + hppa*-*) + host_makefile_frag="config/mh-pa" + ;; +- *-*-darwin*) ++ *-*-darwin* | *-*-ios*) + host_makefile_frag="config/mh-darwin" + ;; + powerpc-*-aix*) +@@ -1697,7 +1697,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + build_lto_plugin=yes + ],[if test x"$default_enable_lto" = x"yes" ; then + case $target in +- *-apple-darwin[[912]]* | *-cygwin* | *-mingw* | *djgpp*) ;; ++ *-apple-darwin[[912]]* | *-apple-ios[[912]]* | *-cygwin* | *-mingw* | *djgpp*) ;; + # On other non-ELF platforms, LTO has yet to be validated. + *) enable_lto=no ;; + esac +@@ -1708,7 +1708,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in +- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;; ++ *-cygwin* | *-mingw* | *-apple-darwin* | *-apple-ios* | *djgpp*) ;; + *) if test x"$enable_lto" = x"yes"; then + AC_MSG_ERROR([LTO support is not enabled for this target.]) + fi +@@ -2590,7 +2590,7 @@ rm -f conftest* + # Decide which environment variable is used to find dynamic libraries. + case "${host}" in + *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; +- *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; ++ *-*-darwin* | *-*-ios* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; + *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; + *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; + esac diff --git a/nixpkgs/pkgs/development/tools/misc/binutils/windres-locate-gcc.patch b/nixpkgs/pkgs/development/tools/misc/binutils/windres-locate-gcc.patch new file mode 100644 index 000000000000..721667c62cec --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/binutils/windres-locate-gcc.patch @@ -0,0 +1,19 @@ +diff --git a/binutils/resrc.c b/binutils/resrc.c +index a875c3a4..0411d047 100644 +--- a/binutils/resrc.c ++++ b/binutils/resrc.c +@@ -521,7 +521,13 @@ read_rc_file (const char *filename, const char *preprocessor, + + cpp_pipe = 0; + +- if (dash) ++ /* Nixpkgs specific : look first at the prefixed path ++ ( there should be no gcc in the binutils folder ) */ ++ if (slash && dash) { ++ cpp_pipe = look_for_default(cmd, slash + 1, dash - slash, preprocargs, filename); ++ } ++ ++ if (dash && ! cpp_pipe) + { + /* First, try looking for a prefixed gcc in the windres + directory, with the same prefix as windres */ diff --git a/nixpkgs/pkgs/development/tools/misc/blackfire/default.nix b/nixpkgs/pkgs/development/tools/misc/blackfire/default.nix new file mode 100644 index 000000000000..85cc7fbc8335 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/blackfire/default.nix @@ -0,0 +1,105 @@ +{ stdenv +, lib +, fetchurl +, dpkg +, writeShellScript +, curl +, jq +, common-updater-scripts +}: + +stdenv.mkDerivation rec { + pname = "blackfire"; + version = "2.22.0"; + + src = passthru.sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform for blackfire: ${stdenv.hostPlatform.system}"); + + nativeBuildInputs = lib.optionals stdenv.isLinux [ + dpkg + ]; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + if ${ lib.boolToString stdenv.isLinux } + then + dpkg-deb -x $src $out + mv $out/usr/* $out + rmdir $out/usr + + # Fix ExecStart path and replace deprecated directory creation method, + # use dynamic user. + substituteInPlace "$out/lib/systemd/system/blackfire-agent.service" \ + --replace '/usr/' "$out/" \ + --replace 'ExecStartPre=/bin/mkdir -p /var/run/blackfire' 'RuntimeDirectory=blackfire' \ + --replace 'ExecStartPre=/bin/chown blackfire: /var/run/blackfire' "" \ + --replace 'User=blackfire' 'DynamicUser=yes' \ + --replace 'PermissionsStartOnly=true' "" + + # Modernize socket path. + substituteInPlace "$out/etc/blackfire/agent" \ + --replace '/var/run' '/run' + else + mkdir $out + + tar -zxvf $src + + mv etc $out + mv usr/* $out + fi + + runHook postInstall + ''; + + passthru = { + sources = { + "x86_64-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_amd64.deb"; + sha256 = "HvNf6yB6+ljTVJXV3l5Jr1/HTR8tmofgJ4fDPbM2k3M="; + }; + "i686-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_i386.deb"; + sha256 = "LvEUPcArVJV1sFFgvflzCQPyhl/q7cXqdwdvN9AsBho="; + }; + "aarch64-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_arm64.deb"; + sha256 = "48Twr/zkJVS3uSiAX0/FL7EDtbE9ZHKoQ+otzRo1w9A="; + }; + "aarch64-darwin" = fetchurl { + url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_arm64.pkg.tar.gz"; + sha256 = "k8YnRzSc6RuwBcJcRpjwZevCh2Tc9/j7BetivrMc1mM="; + }; + "x86_64-darwin" = fetchurl { + url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_amd64.pkg.tar.gz"; + sha256 = "PTSggxBfWtIXj8DX2bLmKXlFXWBE7q8FfYww4SCvWh0="; + }; + }; + + updateScript = writeShellScript "update-blackfire" '' + set -o errexit + export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}" + NEW_VERSION=$(curl -s https://blackfire.io/api/v1/releases | jq .cli --raw-output) + + if [[ "${version}" = "$NEW_VERSION" ]]; then + echo "The new version same as the old version." + exit 0 + fi + + for platform in ${lib.escapeShellArgs meta.platforms}; do + update-source-version "blackfire" "0" "${lib.fakeSha256}" --source-key="sources.$platform" + update-source-version "blackfire" "$NEW_VERSION" --source-key="sources.$platform" + done + ''; + }; + + meta = with lib; { + description = "Blackfire Profiler agent and client"; + homepage = "https://blackfire.io/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + maintainers = with maintainers; [ shyim ]; + platforms = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/blackfire/php-probe.nix b/nixpkgs/pkgs/development/tools/misc/blackfire/php-probe.nix new file mode 100644 index 000000000000..1e6c2b94f232 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/blackfire/php-probe.nix @@ -0,0 +1,154 @@ +{ stdenv +, lib +, fetchurl +, autoPatchelfHook +, php +, writeShellScript +, curl +, jq +, common-updater-scripts +}: + +let + phpMajor = lib.versions.majorMinor php.version; + + version = "1.90.0"; + + hashes = { + "x86_64-linux" = { + system = "amd64"; + hash = { + "8.1" = "sha256-Cq44SJXe8B/RtVGFDDljDBPVs85ELa1K8B7q1u5SEug="; + "8.2" = "sha256-YZ6rEYfssG8bF40wpEGvW5zb1aoIpo3pM+AEZ7yU74E="; + }; + }; + "i686-linux" = { + system = "i386"; + hash = { + "8.1" = "sha256-Gc0kin1z4WLT67lQjfQb1yxZ45bo/q9KV4RQN5zmnTc="; + "8.2" = "sha256-46OF4GMwHFG1CPQJfHI7OrMYGw2hJXgRIFLKcnaKnaI="; + }; + }; + "aarch64-linux" = { + system = "arm64"; + hash = { + "8.1" = "sha256-rV4YoqGOOQWK2WR5RY7SQ/xePpD54vA4+Km8rFNpv4g="; + "8.2" = "sha256-9NuJfa/n3/tyiSn7lcrOUhD+eYUuanJsrzVAJ9cYWhs="; + }; + }; + "aarch64-darwin" = { + system = "arm64"; + hash = { + "8.1" = "sha256-G9cep5apYGFEdTOka3QClteCmEUktLtV8I+oIBzsZ9U="; + "8.2" = "sha256-3wGiekRaGUEHdTpUniPz0Nay2AM0DOQfgFUAC1ezBCs="; + }; + }; + "x86_64-darwin" = { + system = "amd64"; + hash = { + "8.1" = "sha256-BKdngfG78U0lHa7MTW1kndeM2umyEn7ns5T4mglLWnA="; + "8.2" = "sha256-02kXdXqj8HuJG0NblkwYPvgiAmbxC19X0xQ7XU2anhg="; + }; + }; + }; + + makeSource = { system, phpMajor }: + let + isLinux = builtins.match ".+-linux" system != null; + in + assert !isLinux -> (phpMajor != null); + fetchurl { + url = "https://packages.blackfire.io/binaries/blackfire-php/${version}/blackfire-php-${if isLinux then "linux" else "darwin"}_${hashes.${system}.system}-php-${builtins.replaceStrings [ "." ] [ "" ] phpMajor}.so"; + hash = hashes.${system}.hash.${phpMajor}; + }; +in +stdenv.mkDerivation (finalAttrs: { + pname = "php-blackfire"; + extensionName = "blackfire"; + inherit version; + + src = makeSource { + system = stdenv.hostPlatform.system; + inherit phpMajor; + }; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ + autoPatchelfHook + ]; + + sourceRoot = "."; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + install -D ${finalAttrs.src} $out/lib/php/extensions/blackfire.so + + runHook postInstall + ''; + + passthru = { + updateScript = writeShellScript "update-${finalAttrs.pname}" '' + set -o errexit + export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}" + NEW_VERSION=$(curl --silent https://blackfire.io/api/v1/releases | jq .probe.php --raw-output) + + if [[ "${version}" = "$NEW_VERSION" ]]; then + echo "The new version same as the old version." + exit 0 + fi + + for source in ${lib.concatStringsSep " " (builtins.attrNames finalAttrs.passthru.updateables)}; do + update-source-version "$UPDATE_NIX_ATTR_PATH.updateables.$source" "0" "sha256-${lib.fakeSha256}" + update-source-version "$UPDATE_NIX_ATTR_PATH.updateables.$source" "$NEW_VERSION" + done + ''; + + # All sources for updating by the update script. + updateables = + let + createName = path: + builtins.replaceStrings [ "." ] [ "_" ] (lib.concatStringsSep "_" path); + + createSourceParams = path: + let + # The path will be either [«system» sha256], or [«system» sha256 «phpMajor» «zts»], + # Let’s skip the sha256. + rest = builtins.tail (builtins.tail path); + in + { + system = + builtins.head path; + phpMajor = + if builtins.length rest == 0 + then null + else builtins.head rest; + }; + + createUpdateable = path: _value: + lib.nameValuePair + (createName path) + (finalAttrs.finalPackage.overrideAttrs (attrs: { + src = makeSource (createSourceParams path); + })); + + # Filter out all attributes other than hashes. + hashesOnly = lib.filterAttrsRecursive (name: _value: name != "system") hashes; + in + builtins.listToAttrs + # Collect all leaf attributes (containing hashes). + (lib.collect + (attrs: attrs ? name) + (lib.mapAttrsRecursive createUpdateable hashesOnly)); + }; + + meta = { + description = "Blackfire Profiler PHP module"; + homepage = "https://blackfire.io/"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ shyim ]; + platforms = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/bonnmotion/default.nix b/nixpkgs/pkgs/development/tools/misc/bonnmotion/default.nix new file mode 100644 index 000000000000..cdd583bf4484 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/bonnmotion/default.nix @@ -0,0 +1,54 @@ +{ stdenv, lib, fetchzip, substituteAll, bash, jre }: + +stdenv.mkDerivation rec { + pname = "bonnmotion"; + version = "3.0.1"; + + src = fetchzip { + url = "https://sys.cs.uos.de/bonnmotion/src/bonnmotion-${version}.zip"; + sha256 = "16bjgr0hy6an892m5r3x9yq6rqrl11n91f9rambq5ik1cxjqarxw"; + }; + + patches = [ + # The software has a non-standard install bash script which kind of works. + # However, to make it fully functional, the automatically detection of the + # program paths must be substituted with full paths. + (substituteAll { + src = ./install.patch; + inherit bash jre; + }) + ]; + + installPhase = '' + runHook preInstall + + ./install + + mkdir -p $out/bin $out/share/bonnmotion + cp -r ./classes ./lib $out/share/bonnmotion/ + cp ./bin/bm $out/bin/ + + substituteInPlace $out/bin/bm \ + --replace /build/source $out/share/bonnmotion + + runHook postInstall + ''; + + meta = with lib; { + description = "A mobility scenario generation and analysis tool"; + longDescription = '' + BonnMotion is a Java software which creates and analyzes mobility + scenarios and is most commonly used as a tool for the investigation of + mobile ad hoc network characteristics. The scenarios can also be exported + for several network simulators, such as ns-2, ns-3, GloMoSim/QualNet, + COOJA, MiXiM, and ONE. + ''; + homepage = "https://sys.cs.uos.de/bonnmotion/"; + sourceProvenance = with sourceTypes; [ + fromSource + binaryBytecode # source bundles dependency jars + ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ oxzi ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/bonnmotion/install.patch b/nixpkgs/pkgs/development/tools/misc/bonnmotion/install.patch new file mode 100644 index 000000000000..86be99b3dd5e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/bonnmotion/install.patch @@ -0,0 +1,75 @@ +diff --git a/install b/install +index 95afa2c..70c5fca 100755 +--- a/install ++++ b/install +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!@bash@/bin/bash + + echo "BonnMotion - a mobility scenario generation and analysis tool" + echo "Copyright (C) 2002-2012 University of Bonn" +@@ -19,28 +19,11 @@ echo "along with this program; if not, write to the Free Software" + echo "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" + echo + +-OS=`uname -s | tr A-Z a-z | sed -e s/_.\*//` +- + PACKAGE=edu.bonn.cs.iv.bonnmotion +-JAVAPATH=`which java 2> /dev/null` +-if [ ! "$JAVAPATH" = "" ] +-then +- JAVAPATH=`dirname ${JAVAPATH}` +-fi +-echo -n Please enter your Java binary path \[$JAVAPATH\]:\ +-read KBDENTRY +-if [ ! "$KBDENTRY" = "" ] +-then +- JAVAPATH=$KBDENTRY +-fi ++JAVAPATH="@jre@/bin" + if [ -x "${JAVAPATH}/java" ] + then +- cd `dirname $0` +- BONNMOTION=`pwd` +- +- cd "${JAVAPATH}" +- JAVAPATH=`pwd` +- cd "${BONNMOTION}" ++ BONNMOTION="$(realpath .)" + + CLASSPATH="${BONNMOTION}/classes" + DOCPATH="${BONNMOTION}/javadoc" +@@ -52,14 +35,7 @@ then + then + mkdir "${DOCPATH}" + fi +- if [ $OS = "cygwin" ] +- then +- cd "${CLASSPATH}" +- CLASSPATH=`cmd.exe /c cd` +- cd "${DOCPATH}" +- DOCPATH=`cmd.exe /c cd` +- fi +- ++ + for l in $BONNMOTION/lib/*.jar + do + LIBRARYPATH=$LIBRARYPATH:$l +@@ -69,7 +45,7 @@ then + APPS=`ls` + cd "${BONNMOTION}/bin" + +- echo \#\!/bin/bash > .head ++ echo \#\!@bash@/bin/bash > .head + echo >> .head + echo BONNMOTION=\"$BONNMOTION\" >> .head + echo PACKAGE=\"$PACKAGE\" >> .head +@@ -103,8 +79,6 @@ then + fi + echo "done." + echo +- echo "$ ./bin/bm -h" +- ./bm + else + echo No executable \"$JAVAPATH/java\", aborting. + fi diff --git a/nixpkgs/pkgs/development/tools/misc/bsdbuild/default.nix b/nixpkgs/pkgs/development/tools/misc/bsdbuild/default.nix new file mode 100644 index 000000000000..e3bfc958437a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/bsdbuild/default.nix @@ -0,0 +1,68 @@ +{ lib, stdenv, fetchurl, perl, libtool, pkg-config, gettext, mandoc, ed }: + +stdenv.mkDerivation rec { + pname = "bsdbuild"; + version = "3.1"; + + src = fetchurl { + url = "http://stable.hypertriton.com/bsdbuild/${pname}-${version}.tar.gz"; + sha256 = "1zrdjh7a6z4khhfw9zrp490afq306cpl5v8wqz2z55ys7k1n5ifl"; + }; + + buildInputs = [ perl mandoc ed ]; + nativeBuildInputs = [ pkg-config libtool gettext ]; + + prePatch = '' + #ignore unfamiliar flags + substituteInPlace configure \ + --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*' + #same for packages using bsdbuild + substituteInPlace mkconfigure.pl \ + --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*' + #insert header for missing NULL macro + for f in db4.pm sdl_ttf.pm mysql.pm uim.pm strlcpy.pm getpwuid.pm \ + getaddrinfo.pm strtoll.pm free_null.pm getpwnam_r.pm \ + gettimeofday.pm gethostbyname.pm xinerama.pm strsep.pm \ + fontconfig.pm gettext.pm pthreads.pm strlcat.pm kqueue.pm wgl.pm \ + alsa.pm crypt.pm cracklib.pm freesg-rg.pm edacious.pm mmap.pm \ + agar.pm x11.pm x11.pm execvp.pm agar-core.pm dyld.pm getopt.pm \ + strtold.pm sdl_image.pm shl_load.pm glx.pm percgi.pm timerfd.pm \ + glob.pm dlopen.pm freesg.pm csidl.pm perl.pm select.pm \ + portaudio.pm etubestore.pm; + do +ed -s -v BSDBuild/$f << EOF +/#include +i +#include <stddef.h> +. +w +EOF + done + ''; + + configureFlags = [ + "--with-libtool=${libtool}/bin/libtool" + "--enable-nls=yes" + "--with-gettext=${gettext}" + "--with-manpages=yes" + ]; + + meta = { + homepage = "http://bsdbuild.hypertriton.com"; + description = "A cross-platform build system"; + + longDescription = '' + BSDBuild is a cross-platform build system. Derived from the + traditional 4.4BSD make libraries, BSDBuild allows BSD-style + Makefiles (without BSD make extensions), and works natively + under most operating systems and make flavors. Since BSDBuild + is implemented as a library (as opposed to a macro package), + Makefiles are edited directly, as opposed to being compiled + (however, if the build directory is separate from the source + directory, BSDBuild will produce the required Makefiles in place). + ''; + + license = lib.licenses.bsd3; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/c2ffi/default.nix b/nixpkgs/pkgs/development/tools/misc/c2ffi/default.nix new file mode 100644 index 000000000000..6db9557c6e1b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/c2ffi/default.nix @@ -0,0 +1,56 @@ +{ lib +, fetchFromGitHub +, cmake +, llvmPackages_11 +, unstableGitUpdater +}: + +let + c2ffiBranch = "llvm-11.0.0"; + llvmPackages = llvmPackages_11; +in + +llvmPackages.stdenv.mkDerivation { + pname = "c2ffi-${c2ffiBranch}"; + version = "unstable-2021-06-15"; + + src = fetchFromGitHub { + owner = "rpav"; + repo = "c2ffi"; + rev = "f50243926a0afb589de1078a073ac08910599582"; + sha256 = "UstGicFzFY0/Jge5HGYTPwYSnh9OUBY5346ObZYfR54="; + }; + + passthru.updateScript = unstableGitUpdater { + url = "https://github.com/rpav/c2ffi.git"; + branch = c2ffiBranch; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + llvmPackages.llvm + llvmPackages.clang + llvmPackages.libclang + ]; + + # This isn't much, but... + doInstallCheck = true; + installCheckPhase = '' + $out/bin/c2ffi --help 2>&1 >/dev/null + ''; + + # LLVM may be compiled with -fno-rtti, so let's just turn it off. + # A mismatch between lib{clang,LLVM}* and us can lead to the link time error: + # undefined reference to `typeinfo for clang::ASTConsumer' + CXXFLAGS="-fno-rtti"; + + meta = with lib; { + homepage = "https://github.com/rpav/c2ffi"; + description = "An LLVM based tool for extracting definitions from C, C++, and Objective C header files for use with foreign function call interfaces"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ attila-lendvai ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/catppuccin-catwalk/default.nix b/nixpkgs/pkgs/development/tools/misc/catppuccin-catwalk/default.nix new file mode 100644 index 000000000000..2abf3823269b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/catppuccin-catwalk/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, lib +, fetchFromGitHub +, rustPlatform +, installShellFiles +, pkg-config +, libwebp +}: + +rustPlatform.buildRustPackage { + pname = "catppuccin-catwalk"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "toolbox"; + rev = "b38153e94622bab574224bb24a6ae953b3a849da"; + hash = "sha256-zZRl6Xem41pBQmEoK24YR4TKiQ84nU5phBih2TF8G8g="; + }; + + buildAndTestSubdir = "catwalk"; + cargoHash = "sha256-KoxivYLzJEjWbxIkizrMpmVwUF7bfVxl13H774lzQRg="; + + nativeBuildInputs = [ installShellFiles pkg-config ]; + buildInputs = [ libwebp ]; + + postInstall = '' + installShellCompletion --cmd catwalk \ + --bash <("$out/bin/catwalk" completion bash) \ + --zsh <("$out/bin/catwalk" completion zsh) \ + --fish <("$out/bin/catwalk" completion fish) + ''; + + doInstallCheck = !stdenv.hostPlatform.isStatic && + stdenv.hostPlatform.parsed.kernel.execFormat == lib.systems.parse.execFormats.elf; + installCheckPhase = '' + runHook preInstallCheck + readelf -a $out/bin/catwalk | grep -F 'Shared library: [libwebp.so' + runHook postInstallCheck + ''; + + meta = with lib; { + homepage = "https://github.com/catppuccin/toolbox/tree/main/catwalk"; + description = "A CLI for Catppuccin that takes in four showcase images and displays them all at once"; + license = licenses.mit; + maintainers = with maintainers; [ ryanccn ]; + mainProgram = "catwalk"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff b/nixpkgs/pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff new file mode 100644 index 000000000000..cc42f0745da5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff @@ -0,0 +1,49 @@ +Based on this: +http://sourceforge.net/tracker/?func=detail&aid=1493886&group_id=5152&atid=305152 +fix the infinite loops in quote highlight - ID: 1493886 + +--- cbrowser-0.8-2/ftcllib.tcl 2000-07-04 01:17:43.000000000 +0200 ++++ cbrowser-0.8/ftcllib.tcl 2006-05-24 00:39:18.833762522 +0200 +@@ -1290,13 +1290,39 @@ + foreach {start end} [concat 1.0 [$widget tag ranges comment] end] { + + while {[set temp [$widget search -regexp -- $pattern $start $end]] != ""} { ++ set startquote [$widget index "$temp + 1chars"] + +- set endquote [$widget search -regexp -- {[^\\]\"} "$temp + 1chars" $end] ++ set temp [$widget index "$startquote + 1chars"] ++ while {1==1} { ++ set endquote [$widget search -regexp -- {\"} $temp $end] ++ ++ # The program will not break if a /*C comment*/ is between C quotes. ++ if { $endquote == "" } { ++ set endquote $startquote ++ break ++ } ++ ++ # look for double backslashes ++ if {[set temp2 [$widget search -regexp -- {\\\\} $temp $endquote]] != ""} { ++ set temp "$temp2 + 2chars" ++ continue ++ } ++ ++ # look for \" ++ if {[set temp2 [$widget search -regexp -- {\\\"} $temp $endquote]] != ""} { ++ set temp "$temp2 + 2chars" ++ continue ++ } ++ ++ break ++ } + + if {[strlen $endquote] > 0} { +- set start [$widget index "$endquote + 2chars"] ++ set start [$widget index "$endquote + 1chars"] + +- $widget tag add quote "$temp + 1chars" $start ++ $widget tag add quote $startquote $start ++ } else { ++ set start [$widget index "$start + 1chars"] + } + } + } diff --git a/nixpkgs/pkgs/development/tools/misc/cbrowser/default.nix b/nixpkgs/pkgs/development/tools/misc/cbrowser/default.nix new file mode 100644 index 000000000000..a8f6e32f1e08 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cbrowser/default.nix @@ -0,0 +1,36 @@ +{ fetchurl, lib, stdenv, tk, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "cbrowser"; + version = "0.8"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1050mirjab23qsnq3lp3a9vwcbavmh9kznzjm7dr5vkx8b7ffcji"; + }; + + patches = [ ./backslashes-quotes.diff ]; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ tk ]; + + installPhase = '' + mkdir -p $out/bin $out/share/${pname}-${version} + cp -R * $out/share/${pname}-${version}/ + + makeWrapper $out/share/${pname}-${version}/cbrowser $out/bin/cbrowser \ + --prefix PATH : ${tk}/bin + ''; + + meta = { + description = "Tcl/Tk GUI front-end to cscope"; + + license = lib.licenses.gpl2Plus; + + homepage = "https://sourceforge.net/projects/cbrowser/"; + + maintainers = with lib.maintainers; [viric]; + + platforms = with lib.platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ccache/default.nix b/nixpkgs/pkgs/development/tools/misc/ccache/default.nix new file mode 100644 index 000000000000..218444d1a810 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ccache/default.nix @@ -0,0 +1,142 @@ +{ lib +, stdenv +, fetchFromGitHub +, substituteAll +, binutils +, asciidoctor +, cmake +, perl +, zstd +, bashInteractive +, xcodebuild +, makeWrapper +, nix-update-script +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ccache"; + version = "4.8.3"; + + src = fetchFromGitHub { + owner = "ccache"; + repo = "ccache"; + rev = "refs/tags/v${finalAttrs.version}"; + sha256 = "sha256-fcstTjwwOh5SAe6+VT5MpBaD+AEFoQtHop99dOMr7/A="; + }; + + outputs = [ "out" "man" ]; + + patches = [ + # When building for Darwin, test/run uses dwarfdump, whereas on + # Linux it uses objdump. We don't have dwarfdump packaged for + # Darwin, so this patch updates the test to also use objdump on + # Darwin. + # Additionally, when cross compiling, the correct target prefix + # needs to be set. + (substituteAll { + src = ./fix-objdump-path.patch; + objdump = "${binutils.bintools}/bin/${binutils.targetPrefix}objdump"; + }) + ]; + + nativeBuildInputs = [ asciidoctor cmake perl ]; + buildInputs = [ zstd ]; + + cmakeFlags = [ + # Build system does not autodetect redis library presence. + # Requires explicit flag. + "-DREDIS_STORAGE_BACKEND=OFF" + ]; + + doCheck = true; + nativeCheckInputs = [ + # test/run requires the compgen function which is available in + # bashInteractive, but not bash. + bashInteractive + ] ++ lib.optional stdenv.isDarwin xcodebuild; + + checkPhase = + let + badTests = [ + "test.trim_dir" # flaky on hydra (possibly filesystem-specific?) + ] ++ lib.optionals stdenv.isDarwin [ + "test.basedir" + "test.fileclone" # flaky on hydra (possibly filesystem-specific?) + "test.multi_arch" + "test.nocpp2" + ]; + in + '' + runHook preCheck + export HOME=$(mktemp -d) + ctest --output-on-failure -E '^(${lib.concatStringsSep "|" badTests})$' + runHook postCheck + ''; + + passthru = { + # A derivation that provides gcc and g++ commands, but that + # will end up calling ccache for the given cacheDir + links = { unwrappedCC, extraConfig }: stdenv.mkDerivation { + pname = "ccache-links"; + inherit (finalAttrs) version; + passthru = { + isClang = unwrappedCC.isClang or false; + isGNU = unwrappedCC.isGNU or false; + isCcache = true; + }; + inherit (unwrappedCC) lib; + nativeBuildInputs = [ makeWrapper ]; + # Unwrapped clang does not have a targetPrefix because it is multi-target + # target is decided with argv0. + buildCommand = let + targetPrefix = if unwrappedCC.isClang or false + then + "" + else + (lib.optionalString (unwrappedCC ? targetConfig && unwrappedCC.targetConfig != null && unwrappedCC.targetConfig != "") "${unwrappedCC.targetConfig}-"); + in '' + mkdir -p $out/bin + + wrap() { + local cname="${targetPrefix}$1" + if [ -x "${unwrappedCC}/bin/$cname" ]; then + makeWrapper ${finalAttrs.finalPackage}/bin/ccache $out/bin/$cname \ + --run ${lib.escapeShellArg extraConfig} \ + --add-flags ${unwrappedCC}/bin/$cname + fi + } + + wrap cc + wrap c++ + wrap gcc + wrap g++ + wrap clang + wrap clang++ + + for executable in $(ls ${unwrappedCC}/bin); do + if [ ! -x "$out/bin/$executable" ]; then + ln -s ${unwrappedCC}/bin/$executable $out/bin/$executable + fi + done + for file in $(ls ${unwrappedCC} | grep -vw bin); do + ln -s ${unwrappedCC}/$file $out/$file + done + ''; + }; + + updateScript = nix-update-script { }; + }; + + meta = with lib; { + description = "Compiler cache for fast recompilation of C/C++ code"; + homepage = "https://ccache.dev"; + downloadPage = "https://ccache.dev/download.html"; + changelog = "https://ccache.dev/releasenotes.html#_ccache_${ + builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version + }"; + license = licenses.gpl3Plus; + mainProgram = "ccache"; + maintainers = with maintainers; [ kira-bruneau r-burns ]; + platforms = platforms.unix; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/ccache/fix-objdump-path.patch b/nixpkgs/pkgs/development/tools/misc/ccache/fix-objdump-path.patch new file mode 100644 index 000000000000..04c431aafb74 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ccache/fix-objdump-path.patch @@ -0,0 +1,29 @@ +diff --git a/test/run b/test/run +index 43a57312..398be8d8 100755 +--- a/test/run ++++ b/test/run +@@ -148,21 +148,17 @@ file_size() { + objdump_cmd() { + local file="$1" + +- if $HOST_OS_APPLE; then +- xcrun dwarfdump -r 0 "$file" +- elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then ++ if $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then + # For some reason objdump only shows the basename of the file, so fall + # back to brute force and ignorance. + strings "$1" + else +- objdump -W "$file" ++ @objdump@ -W "$file" + fi + } + + objdump_grep_cmd() { +- if $HOST_OS_APPLE; then +- grep -Fq "\"$1\"" +- elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then ++ if $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then + grep -Fq "$1" + else + grep -Fq ": $1" diff --git a/nixpkgs/pkgs/development/tools/misc/cflow/default.nix b/nixpkgs/pkgs/development/tools/misc/cflow/default.nix new file mode 100644 index 000000000000..ab9966c6fca6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cflow/default.nix @@ -0,0 +1,51 @@ +{ lib, stdenv, fetchurl, gettext, emacs }: + +stdenv.mkDerivation rec { + pname = "cflow"; + version = "1.7"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-0BFGyvkAHiZhM0F8KoJYpktfwW/LCCoU9lKCBNDJcIY="; + }; + + patchPhase = '' + substituteInPlace "src/cflow.h" \ + --replace "/usr/bin/cpp" \ + "$(cat ${stdenv.cc}/nix-support/orig-cc)/bin/cpp" + ''; + + buildInputs = [ gettext ] ++ + # We don't have Emacs/GTK/etc. on {Dar,Cyg}win. + lib.optional + (! (lib.lists.any (x: stdenv.hostPlatform.system == x) + [ "i686-cygwin" ])) + emacs; + + doCheck = true; + + meta = with lib; { + description = "Tool to analyze the control flow of C programs"; + + longDescription = '' + GNU cflow analyzes a collection of C source files and prints a + graph, charting control flow within the program. + + GNU cflow is able to produce both direct and inverted flowgraphs + for C sources. Optionally a cross-reference listing can be + generated. Two output formats are implemented: POSIX and GNU + (extended). + + The package also provides Emacs major mode for examining the + produced flowcharts in Emacs. + ''; + + license = licenses.gpl3Plus; + + homepage = "https://www.gnu.org/software/cflow/"; + + maintainers = [ maintainers.vrthra ]; + + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cgdb/default.nix b/nixpkgs/pkgs/development/tools/misc/cgdb/default.nix new file mode 100644 index 000000000000..62d26c09e514 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cgdb/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchurl, ncurses, readline, flex, texinfo }: + +stdenv.mkDerivation rec { + pname = "cgdb"; + version = "0.8.0"; + + src = fetchurl { + url = "https://cgdb.me/files/${pname}-${version}.tar.gz"; + sha256 = "sha256-DTi1JNN3JXsQa61thW2K4zBBQOHuJAhTQ+bd8bZYEfE="; + }; + + buildInputs = [ ncurses readline flex texinfo ]; + + meta = with lib; { + description = "A curses interface to gdb"; + + homepage = "https://cgdb.github.io/"; + + license = licenses.gpl2Plus; + + platforms = with platforms; linux ++ cygwin; + maintainers = with maintainers; [ vrthra ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/checkbashisms/default.nix b/nixpkgs/pkgs/development/tools/misc/checkbashisms/default.nix new file mode 100644 index 000000000000..b648a082fa3f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/checkbashisms/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchurl, perl, installShellFiles }: +stdenv.mkDerivation rec { + version = "2.22.1"; + pname = "checkbashisms"; + + src = fetchurl { + url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz"; + hash = "sha256-Nd1eYCnSe+NblujG44uKpvunkaITcdrC3g+M3uX+M9U="; + }; + + nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ perl ]; + + buildPhase = '' + runHook preBuild + + substituteInPlace ./scripts/checkbashisms.pl \ + --replace '###VERSION###' "$version" + + runHook postBuild + ''; + installPhase = '' + runHook preInstall + + installManPage scripts/$pname.1 + installShellCompletion --bash --name $pname scripts/$pname.bash_completion + install -D -m755 scripts/$pname.pl $out/bin/$pname + + runHook postInstall + ''; + + meta = { + homepage = "https://sourceforge.net/projects/checkbaskisms/"; + description = "Check shell scripts for non-portable syntax"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ kaction ]; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/chrpath/default.nix b/nixpkgs/pkgs/development/tools/misc/chrpath/default.nix new file mode 100644 index 000000000000..97da80cc7339 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/chrpath/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "chrpath"; + version = "0.16"; + + src = fetchurl { + url = "https://alioth-archive.debian.org/releases/${pname}/${pname}/${version}/${pname}-${version}.tar.gz"; + sha256 = "0yvfq891mcdkf8g18gjjkn2m5rvs8z4z4cl1vwdhx6f2p9a4q3dv"; + }; + + meta = with lib; { + description = "Command line tool to adjust the RPATH or RUNPATH of ELF binaries"; + longDescription = '' + chrpath changes, lists or removes the rpath or runpath setting in a + binary. The rpath, or runpath if it is present, is where the runtime + linker should look for the libraries needed for a program. + ''; + homepage = "https://tracker.debian.org/pkg/chrpath"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/chruby-fish/default.nix b/nixpkgs/pkgs/development/tools/misc/chruby-fish/default.nix new file mode 100644 index 000000000000..6268c740e212 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/chruby-fish/default.nix @@ -0,0 +1,28 @@ +{ stdenv, lib, fetchFromGitHub, chruby }: + +stdenv.mkDerivation rec { + pname = "chruby-fish"; + version = "0.8.2"; + + src = fetchFromGitHub { + owner = "JeanMertz"; + repo = "chruby-fish"; + rev = "v${version}"; + sha256 = "15q0ywsn9pcypbpvlq0wb41x4igxm9bsvhg9a05dqw1n437qjhyb"; + }; + + postInstall = '' + sed -i -e '1iset CHRUBY_ROOT ${chruby}' $out/share/chruby/auto.fish + sed -i -e '1iset CHRUBY_ROOT ${chruby}' $out/share/chruby/chruby.fish + ''; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = { + description = "Thin wrapper around chruby to make it work with the Fish shell"; + homepage = "https://github.com/JeanMertz/chruby-fish"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = [ lib.maintainers.cohei ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/chruby/default.nix b/nixpkgs/pkgs/development/tools/misc/chruby/default.nix new file mode 100644 index 000000000000..31e7134e7e87 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/chruby/default.nix @@ -0,0 +1,44 @@ +{ stdenv, lib, fetchFromGitHub, runCommand, rubies ? null }: + +let + rubiesEnv = runCommand "chruby-env" { preferLocalBuild = true; } '' + mkdir $out + ${lib.concatStrings + (lib.mapAttrsToList (name: path: "ln -s ${path} $out/${name}\n") rubies)} + ''; + +in stdenv.mkDerivation rec { + pname = "chruby"; + + version = "0.3.9"; + + src = fetchFromGitHub { + owner = "postmodern"; + repo = "chruby"; + rev = "v${version}"; + sha256 = "1894g6fymr8kra9vwhbmnrcr58l022mcd7g9ans4zd3izla2j3gx"; + }; + + patches = lib.optionalString (rubies != null) [ + ./env.patch + ]; + + postPatch = lib.optionalString (rubies != null) '' + substituteInPlace share/chruby/chruby.sh --replace "@rubiesEnv@" ${rubiesEnv} + ''; + + installPhase = '' + mkdir $out + cp -r bin $out + cp -r share $out + ''; + + meta = with lib; { + description = "Changes the current Ruby"; + homepage = "https://github.com/postmodern/chruby"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + mainProgram = "chruby-exec"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/chruby/env.patch b/nixpkgs/pkgs/development/tools/misc/chruby/env.patch new file mode 100644 index 000000000000..6a4ef8b73497 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/chruby/env.patch @@ -0,0 +1,12 @@ +diff --git a/share/chruby/chruby.sh b/share/chruby/chruby.sh +--- a/share/chruby/chruby.sh ++++ b/share/chruby/chruby.sh +@@ -1,7 +1,7 @@ + CHRUBY_VERSION="0.3.8" + RUBIES=() + +-for dir in "$PREFIX/opt/rubies" "$HOME/.rubies"; do ++for dir in @rubiesEnv@; do + [[ -d "$dir" && -n "$(ls -A "$dir")" ]] && RUBIES+=("$dir"/*) + done + unset dir diff --git a/nixpkgs/pkgs/development/tools/misc/circleci-cli/default.nix b/nixpkgs/pkgs/development/tools/misc/circleci-cli/default.nix new file mode 100644 index 000000000000..5fb7386b08d4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/circleci-cli/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, buildGoModule, installShellFiles }: + +buildGoModule rec { + pname = "circleci-cli"; + version = "0.1.29041"; + + src = fetchFromGitHub { + owner = "CircleCI-Public"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-MEprN5I9ZWz4xTVdl4qZQHfbLbp4Khh63m37ZBq8pgA="; + }; + + vendorHash = "sha256-EcQ5/zp041P4qi8nenrWuVItV3mFI3EHHRhKm/tqpfA="; + + nativeBuildInputs = [ installShellFiles ]; + + doCheck = false; + + ldflags = [ "-s" "-w" "-X github.com/CircleCI-Public/circleci-cli/version.Version=${version}" "-X github.com/CircleCI-Public/circleci-cli/version.Commit=${src.rev}" "-X github.com/CircleCI-Public/circleci-cli/version.packageManager=nix" ]; + + postInstall = '' + mv $out/bin/circleci-cli $out/bin/circleci + + installShellCompletion --cmd circleci \ + --bash <(HOME=$TMPDIR $out/bin/circleci completion bash --skip-update-check) \ + --zsh <(HOME=$TMPDIR $out/bin/circleci completion zsh --skip-update-check) + ''; + + meta = with lib; { + # Box blurb edited from the AUR package circleci-cli + description = '' + Command to enable you to reproduce the CircleCI environment locally and + run jobs as if they were running on the hosted CirleCI application. + ''; + maintainers = with maintainers; [ synthetica ]; + mainProgram = "circleci"; + license = licenses.mit; + homepage = "https://circleci.com/"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cl-launch/default.nix b/nixpkgs/pkgs/development/tools/misc/cl-launch/default.nix new file mode 100644 index 000000000000..35cfd01ff925 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cl-launch/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl }: +stdenv.mkDerivation rec { + pname = "cl-launch"; + version = "4.1.4.1"; + + src = fetchurl { + url = "http://common-lisp.net/project/xcvb/cl-launch/cl-launch-${version}.tar.gz"; + sha256 = "sha256-v5aURs2Verhn2HmGiijvY9br20OTPFrOGBWsb6cHhSQ="; + }; + + preConfigure = '' + export makeFlags="$makeFlags PREFIX='$out'" + mkdir -p "$out/bin" + ''; + + preBuild = '' + sed -e 's/\t\t@/\t\t/g' -i Makefile + ''; + + meta = with lib; { + description = "Common Lisp launcher script"; + license = licenses.llgpl21; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cli11/default.nix b/nixpkgs/pkgs/development/tools/misc/cli11/default.nix new file mode 100644 index 000000000000..8c4c58c052b0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cli11/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, boost +, catch2 +, cmake +, gtest +, python3 +}: + +stdenv.mkDerivation rec { + pname = "cli11"; + version = "2.3.2"; + + src = fetchFromGitHub { + owner = "CLIUtils"; + repo = "CLI11"; + rev = "v${version}"; + sha256 = "sha256-x3/kBlf5LdzkTO4NYOKanZBfcU4oK+fJw9L7cf88LsY="; + }; + + nativeBuildInputs = [ cmake ]; + + nativeCheckInputs = [ boost python3 catch2 ]; + + doCheck = true; + + meta = with lib; { + description = "Command line parser for C++11"; + homepage = "https://github.com/CLIUtils/CLI11"; + platforms = platforms.unix; + maintainers = with maintainers; [ ]; + license = licenses.bsd3; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/clojure-lsp/default.nix b/nixpkgs/pkgs/development/tools/misc/clojure-lsp/default.nix new file mode 100644 index 000000000000..5102c8deed00 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/clojure-lsp/default.nix @@ -0,0 +1,65 @@ +{ lib, stdenv, buildGraalvmNativeImage, babashka, fetchurl, fetchFromGitHub, clojure, writeScript }: + +buildGraalvmNativeImage rec { + pname = "clojure-lsp"; + version = "2023.08.06-00.28.06"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "sha256-wc7M2cPRtdaRzZn3GNu/aCbQ2VqxiDxvu/b7qnBVUBo="; + }; + + jar = fetchurl { + url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/clojure-lsp-standalone.jar"; + sha256 = "c301821ac6914999a44f5c1cd371d46b248fe9a2e31d43a666d0bc2656cfdd78"; + }; + + extraNativeImageBuildArgs = [ + "--no-fallback" + "--native-image-info" + ]; + + doCheck = true; + checkPhase = '' + runHook preCheck + + export HOME="$(mktemp -d)" + ./${pname} --version | fgrep -q '${version}' + '' + # TODO: fix classpath issue per https://github.com/NixOS/nixpkgs/pull/153770 + #${babashka}/bin/bb integration-test ./${pname} + + '' + runHook postCheck + ''; + + passthru.updateScript = writeScript "update-clojure-lsp" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl common-updater-scripts gnused jq nix + + set -eu -o pipefail + + latest_version=$(curl -s https://api.github.com/repos/clojure-lsp/clojure-lsp/releases/latest | jq --raw-output .tag_name) + + old_jar_hash=$(nix-instantiate --eval --strict -A "clojure-lsp.jar.drvAttrs.outputHash" | tr -d '"' | sed -re 's|[+]|\\&|g') + + curl -o clojure-lsp-standalone.jar -sL https://github.com/clojure-lsp/clojure-lsp/releases/download/$latest_version/clojure-lsp-standalone.jar + new_jar_hash=$(nix-hash --flat --type sha256 clojure-lsp-standalone.jar | sed -re 's|[+]|\\&|g') + + rm -f clojure-lsp-standalone.jar + + nixFile=$(nix-instantiate --eval --strict -A "clojure-lsp.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/') + + sed -i "$nixFile" -re "s|\"$old_jar_hash\"|\"$new_jar_hash\"|" + update-source-version clojure-lsp "$latest_version" + ''; + + meta = with lib; { + description = "Language Server Protocol (LSP) for Clojure"; + homepage = "https://github.com/clojure-lsp/clojure-lsp"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.mit; + maintainers = with maintainers; [ ericdallo babariviere ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cmake-language-server/default.nix b/nixpkgs/pkgs/development/tools/misc/cmake-language-server/default.nix new file mode 100644 index 000000000000..9c2641487df4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cmake-language-server/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, cmake-format +, pygls +, cmake +, pdm-pep517 +, pytest-datadir +, pytestCheckHook +}: + +buildPythonApplication rec { + pname = "cmake-language-server"; + version = "0.1.7"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "regen100"; + repo = "cmake-language-server"; + rev = "refs/tags/v${version}"; + hash = "sha256-ExEAi47hxxEJeoT3FCwpRwJrf3URnI47/5FDL7fS5sY="; + }; + + PDM_PEP517_SCM_VERSION = version; + + patches = [ + # Test timeouts occasionally cause the build to fail + ./disable-test-timeouts.patch + ]; + + nativeBuildInputs = [ + pdm-pep517 + ]; + + propagatedBuildInputs = [ + cmake-format + pygls + ]; + + nativeCheckInputs = [ + cmake + cmake-format + pytest-datadir + pytestCheckHook + ]; + + dontUseCmakeConfigure = true; + + pythonImportsCheck = [ + "cmake_language_server" + ]; + + meta = with lib; { + description = "CMake LSP Implementation"; + homepage = "https://github.com/regen100/cmake-language-server"; + license = licenses.mit; + maintainers = with maintainers; [ kira-bruneau ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cmake-language-server/disable-test-timeouts.patch b/nixpkgs/pkgs/development/tools/misc/cmake-language-server/disable-test-timeouts.patch new file mode 100644 index 000000000000..237558bb6603 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cmake-language-server/disable-test-timeouts.patch @@ -0,0 +1,13 @@ +diff --git a/tests/test_server.py b/tests/test_server.py +index f349329..d130a2e 100644 +--- a/tests/test_server.py ++++ b/tests/test_server.py +@@ -27,7 +27,7 @@ from pygls.server import LanguageServer + + from cmake_language_server.server import CMakeLanguageServer + +-CALL_TIMEOUT = 2 ++CALL_TIMEOUT = None + + + def _init(client: LanguageServer, root: Path) -> None: diff --git a/nixpkgs/pkgs/development/tools/misc/coccinelle/default.nix b/nixpkgs/pkgs/development/tools/misc/coccinelle/default.nix new file mode 100644 index 000000000000..6eca9b7f8fa9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/coccinelle/default.nix @@ -0,0 +1,108 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, ocamlPackages +, pkg-config +, autoreconfHook +}: + +stdenv.mkDerivation rec { + pname = "coccinelle"; + version = "1.1.1"; + + src = fetchFromGitHub { + repo = pname; + rev = version; + owner = "coccinelle"; + hash = "sha256-rS9Ktp/YcXF0xUtT4XZtH5F9huvde0vRztY7vGtyuqY="; + }; + + patches = [ + # Fix data path lookup. + # https://github.com/coccinelle/coccinelle/pull/270 + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/540888ff426e0b1f7907b63ce26e712d1fc172cc.patch"; + sha256 = "sha256-W8RNIWDAC3lQ5bG+gD50r7x919JIcZRpt3QSOSMWpW4="; + }) + + # Fix attaching code before declarations. + # https://github.com/coccinelle/coccinelle/issues/282 + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/cd33db143416d820f547bf5869482cfcfc0ea9d0.patch"; + sha256 = "q7wbxbB9Ob0fSJwCjRtDPO3Xg4RO9yrQZG9G0/LGunI="; + }) + + # Fix attaching declaration metavariables. + # https://github.com/coccinelle/coccinelle/issues/281 + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/df71c5c0fe2a73c7358f73f45a550b57a7e30d85.patch"; + sha256 = "qrYfligJnXP7J5G/hfzyaKg9aFn74VExtc/Rs/DI2gc="; + }) + + # Support GLib’s autocleanup macros. + # https://github.com/coccinelle/coccinelle/issues/275 + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/6d5602aca8775c3c5c503939c3dcf0637649d09b.patch"; + sha256 = "NACf8joOOvN32H/sIfI+oqiT3289zXXQVVfXbRfbIe8="; + }) + + # Exit with non-zero status on failure. + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/6c0a855af14d41864e1e522b93dc39646a3b83c7.patch"; + sha256 = "6yfK8arB0GDW7o4cXsv0Y9TMvqgGf3/P1ebXrFFUC80="; + }) + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9.patch"; + sha256 = "fyyxw2BNZUpyLBieIhOKeWbLFGP1tjULH70w/hU+jKw="; + }) + (fetchpatch { + url = "https://github.com/coccinelle/coccinelle/commit/b8b1937657765e991195a10fcd7b8f7a300fc60b.patch"; + sha256 = "ergWJF6BKrhmJhx1aiVYDHztgjaQvaJ5iZRAmC9i22s="; + }) + ]; + + nativeBuildInputs = with ocamlPackages; [ + autoreconfHook + pkg-config + ocaml + findlib + menhir + ]; + + buildInputs = with ocamlPackages; [ + ocaml_pcre + parmap + pyml + stdcompat + ]; + + strictDeps = true; + + postPatch = '' + # Ensure dependencies from Nixpkgs are picked up. + rm -rf bundles/ + ''; + + meta = { + description = "Program to apply semantic patches to C code"; + longDescription = '' + Coccinelle is a program matching and transformation engine which + provides the language SmPL (Semantic Patch Language) for + specifying desired matches and transformations in C code. + Coccinelle was initially targeted towards performing collateral + evolutions in Linux. Such evolutions comprise the changes that + are needed in client code in response to evolutions in library + APIs, and may include modifications such as renaming a function, + adding a function argument whose value is somehow + context-dependent, and reorganizing a data structure. Beyond + collateral evolutions, Coccinelle is successfully used (by us + and others) for finding and fixing bugs in systems code. + ''; + + homepage = "https://coccinelle.gitlabpages.inria.fr/website/"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.thoughtpolice ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/complexity/default.nix b/nixpkgs/pkgs/development/tools/misc/complexity/default.nix new file mode 100644 index 000000000000..6e70fbcfcde5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/complexity/default.nix @@ -0,0 +1,32 @@ +{ fetchurl, lib, stdenv, autogen }: + +stdenv.mkDerivation rec { + pname = "complexity"; + version = "1.10"; + + src = fetchurl { + url = "mirror://gnu/complexity/${pname}-${version}.tar.gz"; + sha256 = "1vfns9xm7w0wrz12a3w15slrqnrfh6qxk15nv7qkj3irll3ff522"; + }; + + buildInputs = [ autogen ]; + + doCheck = true; + + meta = { + description = "C code complexity measurement tool"; + + longDescription = + '' GNU Complexity is a tool designed for analyzing the complexity of C + program functions. It is very similar to the McCabe scoring, but + addresses several issues not considered in that scoring scheme. + ''; + + license = lib.licenses.gpl3Plus; + + homepage = "https://www.gnu.org/software/complexity/"; + + platforms = lib.platforms.gnu ++ lib.platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/complgen/default.nix b/nixpkgs/pkgs/development/tools/misc/complgen/default.nix new file mode 100644 index 000000000000..f69b36fc4bc1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/complgen/default.nix @@ -0,0 +1,26 @@ +{ lib +, rustPlatform +, fetchFromGitHub +}: + +rustPlatform.buildRustPackage rec { + pname = "complgen"; + version = "0.1.5"; + + src = fetchFromGitHub { + owner = "adaszko"; + repo = "complgen"; + rev = "v${version}"; + hash = "sha256-zNYNwPPVlsvQiHy28rWB7OlnriJVktoFrDkJaIO9z8E="; + }; + + cargoHash = "sha256-BkflZ/d4TAZjjkQB5f0+rL4Zt7uWBLM3gM2UNKYZz+Q="; + + meta = with lib; { + description = "Generate {bash,fish,zsh} completions from a single EBNF-like grammar"; + homepage = "https://github.com/adaszko/complgen"; + changelog = "https://github.com/adaszko/complgen/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/default.nix b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/default.nix new file mode 100644 index 000000000000..6591651ee65b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/default.nix @@ -0,0 +1,81 @@ +{ stdenv, lib, callPackage }: +let + common = arch: callPackage ( + { bison + , callPackage + , curl + , fetchgit + , flex + , getopt + , git + , gnat + , gcc + , lib + , perl + , stdenvNoCC + , zlib + , withAda ? true + }: + + stdenvNoCC.mkDerivation { + pname = "coreboot-toolchain-${arch}"; + version = "4.21"; + + src = fetchgit { + url = "https://review.coreboot.org/coreboot"; + rev = "c1386ef6128922f49f93de5690ccd130a26eecf2"; + hash = "sha256-tFGyI170vbhRgJZDix69DfOD5nIY8T4chSP+qTt3kC8="; + fetchSubmodules = false; + leaveDotGit = true; + postFetch = '' + PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version + rm -rf $out/.git + ''; + allowedRequisites = [ ]; + }; + + nativeBuildInputs = [ bison curl git perl ]; + buildInputs = [ flex zlib (if withAda then gnat else gcc) ]; + + enableParallelBuilding = true; + dontConfigure = true; + dontInstall = true; + + postPatch = '' + patchShebangs util/crossgcc/buildgcc + + mkdir -p util/crossgcc/tarballs + + ${lib.concatMapStringsSep "\n" ( + file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}" + ) (callPackage ./stable.nix { }) + } + + patchShebangs util/genbuild_h/genbuild_h.sh + ''; + + buildPhase = '' + export CROSSGCC_VERSION=$(cat .crossgcc_version) + make crossgcc-${arch} CPUS=$NIX_BUILD_CORES DEST=$out + ''; + + meta = with lib; { + homepage = "https://www.coreboot.org"; + description = "coreboot toolchain for ${arch} targets"; + license = with licenses; [ bsd2 bsd3 gpl2 lgpl2Plus gpl3Plus ]; + maintainers = with maintainers; [ felixsinger ]; + platforms = platforms.linux; + }; + } + ); +in + +lib.listToAttrs (map (arch: lib.nameValuePair arch (common arch { })) [ + "i386" + "x64" + "arm" + "aarch64" + "riscv" + "ppc64" + "nds32le" +]) diff --git a/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/stable.nix b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/stable.nix new file mode 100644 index 000000000000..d4419687ebee --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/stable.nix @@ -0,0 +1,51 @@ +{ fetchurl }: [ + { + name = "gmp-6.2.1.tar.xz"; + archive = fetchurl { + sha256 = "1wml97fdmpcynsbw9yl77rj29qibfp652d0w3222zlfx5j8jjj7x"; + url = "mirror://gnu/gmp/gmp-6.2.1.tar.xz"; + }; + } + { + name = "mpfr-4.2.0.tar.xz"; + archive = fetchurl { + sha256 = "14yr4sf4mys64nzbgnd997l6l4n8l9vsjnnvnb0lh4jh2ggpi8q6"; + url = "mirror://gnu/mpfr/mpfr-4.2.0.tar.xz"; + }; + } + { + name = "mpc-1.3.1.tar.gz"; + archive = fetchurl { + sha256 = "1f2rqz0hdrrhx4y1i5f8pv6yv08a876k1dqcm9s2p26gyn928r5b"; + url = "mirror://gnu/mpc/mpc-1.3.1.tar.gz"; + }; + } + { + name = "gcc-11.4.0.tar.xz"; + archive = fetchurl { + sha256 = "1ncd7akww0hl5kkmw1dj3qgqp3phdrr5dfnm7jia9s07n0ib4b9z"; + url = "mirror://gnu/gcc/gcc-11.4.0/gcc-11.4.0.tar.xz"; + }; + } + { + name = "binutils-2.40.tar.xz"; + archive = fetchurl { + sha256 = "1qfqr7gw9k5hhaj6sllmis109qxq5354l2nivrlz65vz5lklr2hg"; + url = "mirror://gnu/binutils/binutils-2.40.tar.xz"; + }; + } + { + name = "R06_28_23.tar.gz"; + archive = fetchurl { + sha256 = "0cadxihshyrjplrx01vna13r1m2f6lj1klw7mh8pg2m0gjdpjj12"; + url = "https://github.com/acpica/acpica/archive/refs/tags/R06_28_23.tar.gz"; + }; + } + { + name = "nasm-2.16.01.tar.bz2"; + archive = fetchurl { + sha256 = "0bmv8xbzck7jim7fzm6jnwiahqkprbpz6wzhg53irm28w0pavdim"; + url = "https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.bz2"; + }; + } +] diff --git a/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/update.sh b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/update.sh new file mode 100755 index 000000000000..fc758e4ab021 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/coreboot-toolchain/update.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env nix-shell +#!nix-shell --pure -i bash -p nix cacert git getopt + +# shellcheck shell=bash + +if [ ! -d .git ]; then + echo "This script needs to be run from the root directory of nixpkgs. Exiting." + exit 1 +fi + +pkg_dir="$(dirname "$0")" + +src="$(nix-build . --no-out-link -A coreboot-toolchain.i386.src)" +urls=$("${src}/util/crossgcc/buildgcc" -u) + +tmp=$(mktemp) +echo '{ fetchurl }: [' >"$tmp" + +for url in $urls; do + name="$(basename "$url")" + hash="$(nix-prefetch-url "$url")" + + cat <<EOF >>"$tmp" + { + name = "$name"; + archive = fetchurl { + sha256 = "$hash"; + url = "$url"; + }; + } +EOF +done + +echo ']' >>"$tmp" + +sed -ie 's/https\:\/\/ftpmirror\.gnu\.org/mirror\:\/\/gnu/g' "$tmp" + +mv "$tmp" "${pkg_dir}/sources.nix" diff --git a/nixpkgs/pkgs/development/tools/misc/cppi/default.nix b/nixpkgs/pkgs/development/tools/misc/cppi/default.nix new file mode 100644 index 000000000000..b0dcfc6aa5ca --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cppi/default.nix @@ -0,0 +1,32 @@ +{ fetchurl, lib, stdenv }: + +stdenv.mkDerivation rec { + pname = "cppi"; + version = "1.18"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; + sha256 = "1jk42cjaggk71rimjnx3qpmb6hivps0917vl3z7wbxk3i2whb98j"; + }; + + doCheck = true; + + meta = { + homepage = "https://savannah.gnu.org/projects/cppi/"; + + description = "A C preprocessor directive indenter"; + + longDescription = + '' GNU cppi indents C preprocessor directives to reflect their nesting + and ensure that there is exactly one space character between each #if, + #elif, #define directive and the following token. The number of + spaces between the `#' and the following directive must correspond + to the level of nesting of that directive. + ''; + + license = lib.licenses.gpl3Plus; + + maintainers = [ ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cproto/cproto.patch b/nixpkgs/pkgs/development/tools/misc/cproto/cproto.patch new file mode 100644 index 000000000000..3743fef977b0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cproto/cproto.patch @@ -0,0 +1,11 @@ +diff -Naur cproto-4.6-old/cproto.h cproto-4.6/cproto.h +--- cproto-4.6-old/cproto.h 1998-01-18 19:49:16.000000000 -0500 ++++ cproto-4.6/cproto.h 2004-03-14 00:02:32.148070032 -0500 +@@ -117,6 +117,7 @@ + Declarator *declarator; + DeclaratorList decl_list; + } YYSTYPE; ++#define YYSTYPE_IS_DECLARED 1 + + /* Prototype styles */ + #if OPT_LINTLIBRARY diff --git a/nixpkgs/pkgs/development/tools/misc/cproto/default.nix b/nixpkgs/pkgs/development/tools/misc/cproto/default.nix new file mode 100644 index 000000000000..9131a1795a25 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cproto/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchurl, flex, bison }: + +stdenv.mkDerivation rec { + pname = "cproto"; + version = "4.7v"; + + src = fetchurl { + urls = [ + "mirror://debian/pool/main/c/cproto/cproto_${version}.orig.tar.gz" + # No version listings and apparently no versioned tarball over http(s). + "ftp://ftp.invisible-island.net/cproto/cproto-${version}.tgz" + ]; + sha256 = "sha256-897D9hAncBlpdkWcS0SsJzVfYSDaduUjHsEyPjedFRE="; + }; + + # patch made by Joe Khoobyar copied from gentoo bugs + patches = [ ./cproto.patch ]; + + nativeBuildInputs = [ flex bison ]; + + doCheck = true; + + doInstallCheck = true; + installCheckPhase = '' + [ "$("$out/bin/cproto" -V 2>&1)" = '${version}' ] + ''; + + meta = with lib; { + description = "Tool to generate C function prototypes from C source code"; + homepage = "https://invisible-island.net/cproto/"; + license = licenses.publicDomain; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/creduce/default.nix b/nixpkgs/pkgs/development/tools/misc/creduce/default.nix new file mode 100644 index 000000000000..77493bd16647 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/creduce/default.nix @@ -0,0 +1,54 @@ +{ lib, stdenv, fetchurl, cmake, makeWrapper +, llvm, libclang +, flex +, zlib +, perlPackages +, util-linux +}: + +stdenv.mkDerivation rec { + pname = "creduce"; + version = "2.10.0"; + + src = fetchurl { + url = "https://embed.cs.utah.edu/${pname}/${pname}-${version}.tar.gz"; + sha256 = "2xwPEjln8k1iCwQM69UwAb89zwPkAPeFVqL/LhH+oGM="; + }; + + nativeBuildInputs = [ cmake makeWrapper llvm.dev ]; + buildInputs = [ + # Ensure stdenv's CC is on PATH before clang-unwrapped + stdenv.cc + # Actual deps: + llvm libclang + flex zlib + ] ++ (with perlPackages; [ perl ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey ]); + + # On Linux, c-reduce's preferred way to reason about + # the cpu architecture/topology is to use 'lscpu', + # so let's make sure it knows where to find it: + postPatch = lib.optionalString stdenv.isLinux '' + substituteInPlace creduce/creduce_utils.pm --replace \ + lscpu ${util-linux}/bin/lscpu + ''; + + postInstall = '' + wrapProgram $out/bin/creduce --prefix PERL5LIB : "$PERL5LIB" + ''; + + meta = with lib; { + description = "A C program reducer"; + homepage = "https://embed.cs.utah.edu/creduce"; + # Officially, the license is: https://github.com/csmith-project/creduce/blob/master/COPYING + license = licenses.ncsa; + longDescription = '' + C-Reduce is a tool that takes a large C or C++ program that has a + property of interest (such as triggering a compiler bug) and + automatically produces a much smaller C/C++ program that has the same + property. It is intended for use by people who discover and report + bugs in compilers and other tools that process C/C++ code. + ''; + maintainers = [ maintainers.dtzWill ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cscope/default.nix b/nixpkgs/pkgs/development/tools/misc/cscope/default.nix new file mode 100644 index 000000000000..432f689d64dd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cscope/default.nix @@ -0,0 +1,54 @@ +{ fetchurl, lib, stdenv, ncurses +, emacsSupport ? true, emacs +}: + +stdenv.mkDerivation rec { + pname = "cscope"; + version = "15.9"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65"; + }; + + configureFlags = [ "--with-ncurses=${ncurses.dev}" ]; + + buildInputs = [ ncurses ]; + nativeBuildInputs = lib.optional emacsSupport emacs; + + postInstall = lib.optionalString emacsSupport '' + cd "contrib/xcscope" + + sed -i "cscope-indexer" \ + -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g" + sed -i "xcscope.el" \ + -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g"; + + mkdir -p "$out/libexec/cscope" + cp "cscope-indexer" "$out/libexec/cscope" + + mkdir -p "$out/share/emacs/site-lisp" + emacs --batch --eval '(byte-compile-file "xcscope.el")' + cp xcscope.el{,c} "$out/share/emacs/site-lisp" + ''; + + meta = { + description = "A developer's tool for browsing source code"; + + longDescription = '' + Cscope is a developer's tool for browsing source code. It has + an impeccable Unix pedigree, having been originally developed at + Bell Labs back in the days of the PDP-11. Cscope was part of + the official AT&T Unix distribution for many years, and has been + used to manage projects involving 20 million lines of code! + ''; + + license = "BSD-style"; + + homepage = "https://cscope.sourceforge.net/"; + + maintainers = with lib.maintainers; [viric]; + + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/csmith/default.nix b/nixpkgs/pkgs/development/tools/misc/csmith/default.nix new file mode 100644 index 000000000000..0643e81edf99 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/csmith/default.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchurl, m4, makeWrapper, libbsd, perlPackages }: + +stdenv.mkDerivation rec { + pname = "csmith"; + version = "2.3.0"; + + src = fetchurl { + url = "https://embed.cs.utah.edu/csmith/${pname}-${version}.tar.gz"; + sha256 = "1mb5zgixsyf86slggs756k8a5ddmj980md3ic9sa1y75xl5cqizj"; + }; + + nativeBuildInputs = [ m4 makeWrapper ]; + buildInputs = [ libbsd ] ++ (with perlPackages; [ perl SysCPU ]); + + postInstall = '' + substituteInPlace $out/bin/compiler_test.pl \ + --replace '$CSMITH_HOME/runtime' $out/include/${pname}-${version} \ + --replace ' ''${CSMITH_HOME}/runtime' " $out/include/${pname}-${version}" \ + --replace '$CSMITH_HOME/src/csmith' $out/bin/csmith + + substituteInPlace $out/bin/launchn.pl \ + --replace '../compiler_test.pl' $out/bin/compiler_test.pl \ + --replace '../$CONFIG_FILE' '$CONFIG_FILE' + + wrapProgram $out/bin/launchn.pl \ + --prefix PERL5LIB : "$PERL5LIB" + + mkdir -p $out/share/csmith + mv $out/bin/compiler_test.in $out/share/csmith/ + ''; + + enableParallelBuilding = true; + + meta = with lib; { + description = "A random generator of C programs"; + homepage = "https://embed.cs.utah.edu/csmith"; + # Officially, the license is this: https://github.com/csmith-project/csmith/blob/master/COPYING + license = licenses.bsd2; + longDescription = '' + Csmith is a tool that can generate random C programs that statically and + dynamically conform to the C99 standard. It is useful for stress-testing + compilers, static analyzers, and other tools that process C code. + Csmith has found bugs in every tool that it has tested, and has been used + to find and report more than 400 previously unknown compiler bugs. + ''; + maintainers = [ maintainers.dtzWill ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ctags/default.nix b/nixpkgs/pkgs/development/tools/misc/ctags/default.nix new file mode 100644 index 000000000000..b33d6cafbe4a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ctags/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchsvn, autoreconfHook }: + +stdenv.mkDerivation rec { + pname = "ctags"; + version = "816"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/ctags/code/trunk"; + rev = version; + sha256 = "0jmbkrmscbl64j71qffcc39x005jrmphx8kirs1g2ws44wil39hf"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + # don't use $T(E)MP which is set to the build directory + configureFlags= [ "--enable-tmpdir=/tmp" ]; + + patches = [ + # Library defines an `__unused__` which is a reserved name, and may + # conflict with the standard library definition. One such conflict is with + # macOS headers. + ./unused-collision.patch + ]; + + meta = with lib; { + description = "A tool for fast source code browsing (exuberant ctags)"; + longDescription = '' + Ctags generates an index (or tag) file of language objects found + in source files that allows these items to be quickly and easily + located by a text editor or other utility. A tag signifies a + language object for which an index entry is available (or, + alternatively, the index entry created for that object). Many + programming languages are supported. + ''; + homepage = "https://ctags.sourceforge.net/"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + + # So that Exuberant ctags is preferred over emacs's ctags + priority = 1; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/ctags/unused-collision.patch b/nixpkgs/pkgs/development/tools/misc/ctags/unused-collision.patch new file mode 100644 index 000000000000..595f67a01b5a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ctags/unused-collision.patch @@ -0,0 +1,246 @@ +--- a/c.c (revision 816) ++++ b/c.c (working copy) +@@ -619,7 +619,7 @@ + return name; + } + +-static void __unused__ pt (tokenInfo *const token) ++static void UNUSED pt (tokenInfo *const token) + { + if (isType (token, TOKEN_NAME)) + printf ("type: %-12s: %-13s line: %lu\n", +@@ -634,7 +634,7 @@ + tokenString (token->type), token->lineNumber); + } + +-static void __unused__ ps (statementInfo *const st) ++static void UNUSED ps (statementInfo *const st) + { + unsigned int i; + printf ("scope: %s decl: %s gotName: %s gotParenName: %s\n", +--- a/eiffel.c (revision 816) ++++ b/eiffel.c (working copy) +@@ -807,7 +807,7 @@ + + static boolean parseType (tokenInfo *const token); + +-static void parseGeneric (tokenInfo *const token, boolean declaration __unused__) ++static void parseGeneric (tokenInfo *const token, boolean declaration UNUSED) + { + unsigned int depth = 0; + #ifdef TYPE_REFERENCE_TOOL +--- a/general.h (revision 816) ++++ b/general.h (working copy) +@@ -57,10 +57,10 @@ + * to prevent warnings about unused variables. + */ + #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !defined (__GNUG__) +-# define __unused__ __attribute__((unused)) ++# define UNUSED __attribute__((unused)) + # define __printf__(s,f) __attribute__((format (printf, s, f))) + #else +-# define __unused__ ++# define UNUSED + # define __printf__(s,f) + #endif + +--- a/lregex.c (revision 816) ++++ b/lregex.c (working copy) +@@ -538,11 +538,11 @@ + #endif /* HAVE_REGEX */ + + extern void addTagRegex ( +- const langType language __unused__, +- const char* const regex __unused__, +- const char* const name __unused__, +- const char* const kinds __unused__, +- const char* const flags __unused__) ++ const langType language UNUSED, ++ const char* const regex UNUSED, ++ const char* const name UNUSED, ++ const char* const kinds UNUSED, ++ const char* const flags UNUSED) + { + #ifdef HAVE_REGEX + Assert (regex != NULL); +@@ -564,10 +564,10 @@ + } + + extern void addCallbackRegex ( +- const langType language __unused__, +- const char* const regex __unused__, +- const char* const flags __unused__, +- const regexCallback callback __unused__) ++ const langType language UNUSED, ++ const char* const regex UNUSED, ++ const char* const flags UNUSED, ++ const regexCallback callback UNUSED) + { + #ifdef HAVE_REGEX + Assert (regex != NULL); +@@ -581,7 +581,7 @@ + } + + extern void addLanguageRegex ( +- const langType language __unused__, const char* const regex __unused__) ++ const langType language UNUSED, const char* const regex UNUSED) + { + #ifdef HAVE_REGEX + if (! regexBroken) +@@ -602,7 +602,7 @@ + */ + + extern boolean processRegexOption (const char *const option, +- const char *const parameter __unused__) ++ const char *const parameter UNUSED) + { + boolean handled = FALSE; + const char* const dash = strchr (option, '-'); +@@ -624,7 +624,7 @@ + return handled; + } + +-extern void disableRegexKinds (const langType language __unused__) ++extern void disableRegexKinds (const langType language UNUSED) + { + #ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) +@@ -639,8 +639,8 @@ + } + + extern boolean enableRegexKind ( +- const langType language __unused__, +- const int kind __unused__, const boolean mode __unused__) ++ const langType language UNUSED, ++ const int kind UNUSED, const boolean mode UNUSED) + { + boolean result = FALSE; + #ifdef HAVE_REGEX +@@ -660,7 +660,7 @@ + return result; + } + +-extern void printRegexKinds (const langType language __unused__, boolean indent __unused__) ++extern void printRegexKinds (const langType language UNUSED, boolean indent UNUSED) + { + #ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) +--- a/lua.c (revision 816) ++++ b/lua.c (working copy) +@@ -37,7 +37,7 @@ + */ + + /* for debugging purposes */ +-static void __unused__ print_string (char *p, char *q) ++static void UNUSED print_string (char *p, char *q) + { + for ( ; p != q; p++) + fprintf (errout, "%c", *p); +--- a/main.c (revision 816) ++++ b/main.c (working copy) +@@ -522,7 +522,7 @@ + * Start up code + */ + +-extern int main (int __unused__ argc, char **argv) ++extern int main (int UNUSED argc, char **argv) + { + cookedArgs *args; + #ifdef VMS +--- a/options.c (revision 816) ++++ b/options.c (working copy) +@@ -730,7 +730,7 @@ + } + + static void processExcludeOption ( +- const char *const option __unused__, const char *const parameter) ++ const char *const option UNUSED, const char *const parameter) + { + const char *const fileName = parameter + 1; + if (parameter [0] == '\0') +@@ -867,7 +867,7 @@ + } + + static void processFilterTerminatorOption ( +- const char *const option __unused__, const char *const parameter) ++ const char *const option UNUSED, const char *const parameter) + { + freeString (&Option.filterTerminator); + Option.filterTerminator = stringCopy (parameter); +@@ -930,8 +930,8 @@ + } + + static void processHelpOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option UNUSED, ++ const char *const parameter UNUSED) + { + printProgramIdentification (); + putchar ('\n'); +@@ -1139,8 +1139,8 @@ + } + + static void processLicenseOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option UNUSED, ++ const char *const parameter UNUSED) + { + printProgramIdentification (); + puts (""); +@@ -1166,8 +1166,8 @@ + } + + static void processListMapsOption ( +- const char *const __unused__ option, +- const char *const __unused__ parameter) ++ const char *const UNUSED option, ++ const char *const UNUSED parameter) + { + if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0) + printLanguageMaps (LANG_AUTO); +@@ -1183,8 +1183,8 @@ + } + + static void processListLanguagesOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option UNUSED, ++ const char *const parameter UNUSED) + { + printLanguageList (); + exit (0); +@@ -1358,8 +1358,8 @@ + } + + static void processVersionOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option UNUSED, ++ const char *const parameter UNUSED) + { + printProgramIdentification (); + exit (0); +--- a/parse.c (revision 816) ++++ b/parse.c (working copy) +@@ -376,7 +376,7 @@ + */ + + extern void processLanguageDefineOption ( +- const char *const option, const char *const parameter __unused__) ++ const char *const option, const char *const parameter UNUSED) + { + #ifdef HAVE_REGEX + if (parameter [0] == '\0') +--- a/routines.c (revision 816) ++++ b/routines.c (working copy) +@@ -526,7 +526,7 @@ + + #if ! defined (HAVE_STAT_ST_INO) + +-static void canonicalizePath (char *const path __unused__) ++static void canonicalizePath (char *const path UNUSED) + { + #if defined (MSDOS_STYLE_PATH) + char *p; diff --git a/nixpkgs/pkgs/development/tools/misc/ctags/wrapped.nix b/nixpkgs/pkgs/development/tools/misc/ctags/wrapped.nix new file mode 100644 index 000000000000..2bc3aa5ecf4f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ctags/wrapped.nix @@ -0,0 +1,78 @@ +{ pkgs, ctags }: + +with pkgs.lib; + +# define some ctags wrappers adding support for some not that common languages +# customization: +# a) add stuff here +# b) override asLang, phpLang, ... using packageOverrides +# c) use ctagsWrapped.override {args = [ your liste ];} + +# install using -iA ctagsWrapped.ctagsWrapped + +{ + + # the derivation. use language extensions specified by args + ctagsWrapped = makeOverridable ( {args, name} : pkgs.writeScriptBin name '' + #!${pkgs.runtimeShell} + exec ${pkgs.ctags}/bin/ctags ${concatStringsSep " " (map escapeShellArg args)} "$@" + '') { + args = let x = pkgs.ctagsWrapped; in concatLists [ + x.defaultArgs x.phpLang x.jsLang x.nixLang x.asLang x.rubyLang + ]; + name = "${ctags.name}-wrapped"; + }; + + ### language arguments + + # don't scan version control directories + defaultArgs = [ + "--exclude=.svn" + "--exclude=.hg" + "--exclude=.git" + "--exclude=_darcs" + "--sort=yes" + ]; + + # actionscript + asLang = [ + "--langdef=ActionScript" + "--langmap=ActionScript:.as" + "--regex-ActionScript=/function[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\\1/f,function,functions/" + "--regex-ActionScript=/function[ \\t]+(set|get)[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\\2/p,property,properties/" + "--regex-ActionScript=/interface[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/i,interface,interfaces/" + "--regex-ActionScript=/package[ \\t]+([^ \\t]*)/\\1/p/" + "--regex-ActionScript=/class[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/c,class,classes/" + ]; + + # PHP + phpLang = [ + "--langmap=PHP:.php" + "--regex-PHP=/abstract class ([^ ]*)/\\1/c/" + "--regex-PHP=/interface ([^ ]*)/\\1/i/" + "--regex-PHP=/function[ \\t]+([^ (]*)/\\1/f/" + ]; + + # Javascript: also find unnamed functions and functions being passed within a dict. + # the dict properties is used to implement duck typing in frameworks + # var foo = function () { ... } + # { + # a : function () {} + # only recognize names up 100 characters. Else you'll be in trouble scanning compressed .js files. + jsLang = [ + "--regex-JavaScript=/([^ \\t]{1,100})[ \\t]*:[ \\t]*function[ \\t]*\\(/\\1/f/" + ]; + + # find foo in "foo =", don't think we can do a lot better + nixLang = [ + "--langdef=NIX" + "--langmap=NIX:.nix" + "--regex-NIX=/([^ \\t*]*)[ \\t]*=/\\1/f/" + ]; + + rubyLang = [ + "--langmap=RUBY:.rb" + "--regex-RUBY=/class ([^ ]*)/\\1/c/" + "--regex-RUBY=/^[ ]*module[ ]*([^ ]*)/\\1/m/" + ]; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cvise/default.nix b/nixpkgs/pkgs/development/tools/misc/cvise/default.nix new file mode 100644 index 000000000000..bae63abbb733 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cvise/default.nix @@ -0,0 +1,85 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, bash +, cmake +, colordiff +, flex +, libclang +, llvm +, unifdef +, chardet +, pebble +, psutil +, pytestCheckHook +}: + +buildPythonApplication rec { + pname = "cvise"; + version = "2.8.0"; + format = "other"; + + src = fetchFromGitHub { + owner = "marxin"; + repo = "cvise"; + rev = "refs/tags/v${version}"; + hash = "sha256-9HFCFgpRXqefFJLulwvi6nx0fl0G6IXI9gSinekJXRU="; + }; + + patches = [ + # Refer to unifdef by absolute path. + ./unifdef.patch + ]; + + postPatch = '' + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + substituteInPlace CMakeLists.txt \ + --replace " -Werror " " " + + # 'cvise --command=...' generates a script with hardcoded shebang. + substituteInPlace cvise.py \ + --replace "#!/bin/bash" "#!${bash}/bin/bash" + + substituteInPlace cvise/utils/testing.py \ + --replace "'colordiff --version'" "'${colordiff}/bin/colordiff --version'" \ + --replace "'colordiff'" "'${colordiff}/bin/colordiff'" + ''; + + nativeBuildInputs = [ + cmake + flex + llvm.dev + ]; + + buildInputs = [ + libclang + llvm + llvm.dev + unifdef + ]; + + propagatedBuildInputs = [ + chardet + pebble + psutil + ]; + + nativeCheckInputs = [ + pytestCheckHook + unifdef + ]; + + disabledTests = [ + # Needs gcc, fails when run noninteractively (without tty). + "test_simple_reduction" + ]; + + meta = with lib; { + homepage = "https://github.com/marxin/cvise"; + description = "Super-parallel Python port of C-Reduce"; + license = licenses.ncsa; + maintainers = with maintainers; [ orivej ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/cvise/unifdef.patch b/nixpkgs/pkgs/development/tools/misc/cvise/unifdef.patch new file mode 100644 index 000000000000..d15ca6dce0bd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cvise/unifdef.patch @@ -0,0 +1,8 @@ +--- a/cvise.py ++++ b/cvise.py +@@ -93,4 +93,5 @@ def find_external_programs(): + # Special case for clang-format + programs['clang-format'] = '@CLANG_FORMAT_PATH@' ++ programs['unifdef'] = '@UNIFDEF@' + + return programs diff --git a/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix b/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix new file mode 100644 index 000000000000..055a24f3fe0a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix @@ -0,0 +1,59 @@ +{ lib, stdenv, fetchFromGitHub, fetchurl, tie }: + +stdenv.mkDerivation rec { + pname = "cwebbin"; + version = "22p"; + + src = fetchFromGitHub { + owner = "ascherer"; + repo = "cwebbin"; + rev = "2016-05-20-22p"; + sha256 = "0zf93016hm9i74i2v384rwzcw16y3hg5vc2mibzkx1rzvqa50yfr"; + }; + + cweb = fetchurl { + url = "https://www.ctan.org/tex-archive/web/c_cpp/cweb/cweb-3.64ah.tgz"; + sha256 = "1hdzxfzaibnjxjzgp6d2zay8nsarnfy9hfq55hz1bxzzl23n35aj"; + }; + + # Remove references to __DATE__ and __TIME__ + postPatch = '' + substituteInPlace wmerg-patch.ch --replace ' ("__DATE__", "__TIME__")' "" + substituteInPlace ctang-patch.ch --replace ' ("__DATE__", "__TIME__")' "" + substituteInPlace ctangle.cxx --replace ' ("__DATE__", "__TIME__")' "" + substituteInPlace cweav-patch.ch --replace ' ("__DATE__", "__TIME__")' "" + ''; + + nativeBuildInputs = [ tie ]; + + makeFlags = [ + "MACROSDIR=$(out)/share/texmf/tex/generic/cweb" + "CWEBINPUTS=$(out)/lib/cweb" + "DESTDIR=$(out)/bin/" + "MANDIR=$(out)/share/man/man1" + "EMACSDIR=$(out)/share/emacs/site-lisp" + "CP=cp" + "RM=rm" + "PDFTEX=echo" + "CC=${stdenv.cc.targetPrefix}c++" + ]; + + buildPhase = '' + zcat ${cweb} | tar -xvpf - + make -f Makefile.unix boot $makeFlags + make -f Makefile.unix cautiously $makeFlags + ''; + + installPhase = '' + mkdir -p $out/share/man/man1 $out/share/texmf/tex/generic $out/share/emacs $out/lib + make -f Makefile.unix install $makeFlags + ''; + + meta = with lib; { + inherit (src.meta) homepage; + description = "Literate Programming in C/C++"; + platforms = with platforms; unix; + maintainers = with maintainers; [ vrthra ]; + license = licenses.abstyles; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/d-feet/default.nix b/nixpkgs/pkgs/development/tools/misc/d-feet/default.nix new file mode 100644 index 000000000000..c59ed440b7c0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/d-feet/default.nix @@ -0,0 +1,90 @@ +{ lib +, pkg-config +, fetchurl +, fetchpatch +, meson +, ninja +, glib +, gtk3 +, python3 +, wrapGAppsHook +, gnome +, libwnck +, gobject-introspection +, gettext +, itstool +}: + +python3.pkgs.buildPythonApplication rec { + pname = "d-feet"; + version = "0.3.16"; + + format = "other"; + + src = fetchurl { + url = "mirror://gnome/sources/d-feet/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "hzPOS5qaVOwYWx2Fv02p2dEQUogqiAdg/2D5d5stHMs="; + }; + + patches = [ + # Fix build with meson 0.61 + # data/meson.build:15:0: ERROR: Function does not take positional arguments. + # data/meson.build:27:0: ERROR: Function does not take positional arguments. + # Patch taken from https://gitlab.gnome.org/GNOME/d-feet/-/merge_requests/32 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/d-feet/-/commit/05465d486afdba116dbc22fc22c1e6573aea4f22.patch"; + sha256 = "sFI3nd0YE/deGws/YcTpzC/em9QNgicyb4j7cTfOdhY="; + }) + ]; + + nativeBuildInputs = [ + gettext + gobject-introspection + itstool + meson + ninja + pkg-config + python3 + wrapGAppsHook + ]; + + buildInputs = [ + glib + gnome.adwaita-icon-theme + gtk3 + libwnck + ]; + + propagatedBuildInputs = with python3.pkgs; [ + pygobject3 + ]; + + mesonFlags = [ + "-Dtests=false" # needs dbus + ]; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "dfeet"; + versionPolicy = "none"; + }; + }; + + meta = with lib; { + description = "D-Feet is an easy to use D-Bus debugger"; + longDescription = '' + D-Feet can be used to inspect D-Bus interfaces of running programs + and invoke methods on those interfaces. + ''; + homepage = "https://wiki.gnome.org/Apps/DFeet"; + platforms = platforms.linux; + license = licenses.gpl2; + maintainers = teams.gnome.members; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/d-spy/default.nix b/nixpkgs/pkgs/development/tools/misc/d-spy/default.nix new file mode 100644 index 000000000000..e89bad9ce490 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/d-spy/default.nix @@ -0,0 +1,59 @@ +{ stdenv +, lib +, desktop-file-utils +, fetchurl +, glib +, gettext +, gtk4 +, libadwaita +, meson +, ninja +, pkg-config +, wrapGAppsHook4 +, gnome +}: + +stdenv.mkDerivation rec { + pname = "d-spy"; + version = "1.6.0"; + + outputs = [ "out" "lib" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/d-spy/${lib.versions.majorMinor version}/d-spy-${version}.tar.xz"; + sha256 = "otCiEFE7tGRw0A40VEeRIIMwFT9Ms0+FhxcpEaxPiv0="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + desktop-file-utils + wrapGAppsHook4 + gettext + glib + ]; + + buildInputs = [ + glib + gtk4 + libadwaita + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "d-spy"; + }; + }; + + meta = with lib; { + description = "D-Bus exploration tool"; + homepage = "https://gitlab.gnome.org/GNOME/d-spy"; + license = with licenses; [ + lgpl3Plus # library + gpl3Plus # app + ]; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dart-sass/default.nix b/nixpkgs/pkgs/development/tools/misc/dart-sass/default.nix new file mode 100644 index 000000000000..6737e791f952 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dart-sass/default.nix @@ -0,0 +1,82 @@ +{ lib +, fetchFromGitHub +, buildDartApplication +, buf +, protoc-gen-dart +, testers +, dart-sass +, runCommand +, writeText +}: + +let + sass-language = fetchFromGitHub { + owner = "sass"; + repo = "sass"; + rev = "refs/tags/embedded-protocol-2.3.0"; + hash = "sha256-J2heASfIwj4lxjsRs/0zRHSaF2tij9bO7IgXp0u/eiI="; + }; +in +buildDartApplication rec { + pname = "dart-sass"; + version = "1.69.0"; + + src = fetchFromGitHub { + owner = "sass"; + repo = pname; + rev = version; + hash = "sha256-kn3cwi1k2CkzbS+Q/JaYy8Nq3Ej0GyWifG1Bq5ZEVHA="; + }; + + pubspecLockFile = ./pubspec.lock; + depsListFile = ./deps.json; + vendorHash = "sha256-PQvY+qFXovSXH5wuc60wCrt5RiooKcaGKYzbjKSvqso="; + + nativeBuildInputs = [ + buf + protoc-gen-dart + ]; + + preConfigure = '' + mkdir -p build + ln -s ${sass-language} build/language + HOME="$TMPDIR" buf generate + ''; + + dartCompileFlags = [ "--define=version=${version}" ]; + + meta = with lib; { + homepage = "https://github.com/sass/dart-sass"; + description = "The reference implementation of Sass, written in Dart"; + mainProgram = "sass"; + license = licenses.mit; + maintainers = with maintainers; [ lelgenio ]; + }; + + passthru.tests = { + version = testers.testVersion { + package = dart-sass; + command = "dart-sass --version"; + }; + + simple = testers.testEqualContents { + assertion = "dart-sass compiles a basic scss file"; + expected = writeText "expected" '' + body h1{color:#123} + ''; + actual = runCommand "actual" { + nativeBuildInputs = [ dart-sass ]; + base = writeText "base" '' + body { + $color: #123; + h1 { + color: $color; + } + } + ''; + } '' + dart-sass --style=compressed $base > $out + ''; + }; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dart-sass/deps.json b/nixpkgs/pkgs/development/tools/misc/dart-sass/deps.json new file mode 100644 index 000000000000..75548f50d900 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dart-sass/deps.json @@ -0,0 +1,930 @@ +[ + { + "name": "sass", + "version": "1.69.0", + "kind": "root", + "source": "root", + "dependencies": [ + "args", + "async", + "charcode", + "cli_pkg", + "cli_repl", + "collection", + "http", + "js", + "meta", + "native_synchronization", + "node_interop", + "package_config", + "path", + "pool", + "protobuf", + "pub_semver", + "source_maps", + "source_span", + "stack_trace", + "stream_channel", + "stream_transform", + "string_scanner", + "term_glyph", + "typed_data", + "watcher", + "analyzer", + "archive", + "crypto", + "dart_style", + "dartdoc", + "grinder", + "node_preamble", + "lints", + "protoc_plugin", + "pub_api_client", + "pubspec_parse", + "test", + "test_descriptor", + "test_process", + "yaml", + "cli_util" + ] + }, + { + "name": "cli_util", + "version": "0.4.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "path", + "version": "1.8.3", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "meta", + "version": "1.10.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "yaml", + "version": "3.1.2", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner" + ] + }, + { + "name": "string_scanner", + "version": "1.2.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_span", + "version": "1.10.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "path", + "term_glyph" + ] + }, + { + "name": "term_glyph", + "version": "1.2.1", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "collection", + "version": "1.18.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "test_process", + "version": "2.1.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "async", + "meta", + "path", + "test" + ] + }, + { + "name": "test", + "version": "1.24.6", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "async", + "boolean_selector", + "collection", + "coverage", + "http_multi_server", + "io", + "js", + "matcher", + "node_preamble", + "package_config", + "path", + "pool", + "shelf", + "shelf_packages_handler", + "shelf_static", + "shelf_web_socket", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "test_core", + "typed_data", + "web_socket_channel", + "webkit_inspection_protocol", + "yaml" + ] + }, + { + "name": "webkit_inspection_protocol", + "version": "1.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "logging" + ] + }, + { + "name": "logging", + "version": "1.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "web_socket_channel", + "version": "2.4.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "crypto", + "stream_channel" + ] + }, + { + "name": "stream_channel", + "version": "2.1.2", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "async", + "version": "2.11.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "crypto", + "version": "3.0.3", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "typed_data", + "version": "1.3.2", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection" + ] + }, + { + "name": "test_core", + "version": "0.5.6", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "async", + "boolean_selector", + "collection", + "coverage", + "frontend_server_client", + "glob", + "io", + "meta", + "package_config", + "path", + "pool", + "source_map_stack_trace", + "source_maps", + "source_span", + "stack_trace", + "stream_channel", + "test_api", + "vm_service", + "yaml" + ] + }, + { + "name": "vm_service", + "version": "11.10.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "test_api", + "version": "0.6.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "boolean_selector", + "collection", + "meta", + "source_span", + "stack_trace", + "stream_channel", + "string_scanner", + "term_glyph" + ] + }, + { + "name": "stack_trace", + "version": "1.11.1", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "boolean_selector", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span", + "string_scanner" + ] + }, + { + "name": "source_maps", + "version": "0.10.12", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "source_map_stack_trace", + "version": "2.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "source_maps", + "stack_trace" + ] + }, + { + "name": "pool", + "version": "1.5.1", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "stack_trace" + ] + }, + { + "name": "package_config", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "path" + ] + }, + { + "name": "io", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path", + "string_scanner" + ] + }, + { + "name": "glob", + "version": "2.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "file", + "path", + "string_scanner" + ] + }, + { + "name": "file", + "version": "7.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta", + "path" + ] + }, + { + "name": "frontend_server_client", + "version": "3.2.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "coverage", + "version": "1.6.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "args", + "logging", + "package_config", + "path", + "source_maps", + "stack_trace", + "vm_service" + ] + }, + { + "name": "args", + "version": "2.4.2", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "analyzer", + "version": "5.13.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "_fe_analyzer_shared", + "collection", + "convert", + "crypto", + "glob", + "meta", + "package_config", + "path", + "pub_semver", + "source_span", + "watcher", + "yaml" + ] + }, + { + "name": "watcher", + "version": "1.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "path" + ] + }, + { + "name": "pub_semver", + "version": "2.1.4", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "meta" + ] + }, + { + "name": "convert", + "version": "3.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "typed_data" + ] + }, + { + "name": "_fe_analyzer_shared", + "version": "61.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "shelf_web_socket", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "shelf", + "stream_channel", + "web_socket_channel" + ] + }, + { + "name": "shelf", + "version": "1.4.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "http_parser", + "path", + "stack_trace", + "stream_channel" + ] + }, + { + "name": "http_parser", + "version": "4.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "source_span", + "string_scanner", + "typed_data" + ] + }, + { + "name": "shelf_static", + "version": "1.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "convert", + "http_parser", + "mime", + "path", + "shelf" + ] + }, + { + "name": "mime", + "version": "1.0.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "shelf_packages_handler", + "version": "3.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "shelf", + "shelf_static" + ] + }, + { + "name": "node_preamble", + "version": "2.0.2", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "matcher", + "version": "0.12.16", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async", + "meta", + "stack_trace", + "term_glyph", + "test_api" + ] + }, + { + "name": "js", + "version": "0.6.7", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "http_multi_server", + "version": "3.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "async" + ] + }, + { + "name": "test_descriptor", + "version": "2.0.1", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "async", + "collection", + "matcher", + "meta", + "path", + "term_glyph", + "test" + ] + }, + { + "name": "pubspec_parse", + "version": "1.2.3", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "checked_yaml", + "collection", + "json_annotation", + "pub_semver", + "yaml" + ] + }, + { + "name": "json_annotation", + "version": "4.8.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "checked_yaml", + "version": "2.0.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "json_annotation", + "source_span", + "yaml" + ] + }, + { + "name": "pub_api_client", + "version": "2.6.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "collection", + "http", + "oauth2", + "path", + "pubspec" + ] + }, + { + "name": "pubspec", + "version": "2.3.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "path", + "pub_semver", + "yaml", + "uri" + ] + }, + { + "name": "uri", + "version": "1.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "matcher", + "quiver" + ] + }, + { + "name": "quiver", + "version": "3.2.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "matcher" + ] + }, + { + "name": "oauth2", + "version": "2.0.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "crypto", + "http", + "http_parser" + ] + }, + { + "name": "http", + "version": "1.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "http_parser", + "meta" + ] + }, + { + "name": "protoc_plugin", + "version": "21.1.1", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "fixnum", + "path", + "protobuf" + ] + }, + { + "name": "protobuf", + "version": "3.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "collection", + "fixnum", + "meta" + ] + }, + { + "name": "fixnum", + "version": "1.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "lints", + "version": "2.1.1", + "kind": "dev", + "source": "hosted", + "dependencies": [] + }, + { + "name": "grinder", + "version": "0.9.4", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "cli_util", + "glob", + "meta", + "path", + "collection" + ] + }, + { + "name": "dartdoc", + "version": "6.3.0", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "cli_util", + "collection", + "crypto", + "glob", + "html", + "logging", + "markdown", + "meta", + "package_config", + "path", + "pub_semver", + "source_span", + "yaml" + ] + }, + { + "name": "markdown", + "version": "7.1.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "args", + "meta" + ] + }, + { + "name": "html", + "version": "0.15.4", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "csslib", + "source_span" + ] + }, + { + "name": "csslib", + "version": "1.0.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "source_span" + ] + }, + { + "name": "dart_style", + "version": "2.3.2", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "analyzer", + "args", + "path", + "pub_semver", + "source_span" + ] + }, + { + "name": "archive", + "version": "3.3.9", + "kind": "dev", + "source": "hosted", + "dependencies": [ + "crypto", + "path", + "pointycastle" + ] + }, + { + "name": "pointycastle", + "version": "3.7.3", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "convert", + "js" + ] + }, + { + "name": "stream_transform", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [] + }, + { + "name": "node_interop", + "version": "2.1.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "js" + ] + }, + { + "name": "native_synchronization", + "version": "0.2.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "ffi" + ] + }, + { + "name": "ffi", + "version": "2.1.0", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "cli_repl", + "version": "0.2.3", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "async", + "js" + ] + }, + { + "name": "cli_pkg", + "version": "2.5.0", + "kind": "direct", + "source": "hosted", + "dependencies": [ + "archive", + "async", + "charcode", + "cli_util", + "collection", + "crypto", + "glob", + "grinder", + "http", + "js", + "meta", + "node_interop", + "node_preamble", + "package_config", + "path", + "pool", + "pub_semver", + "pubspec_parse", + "retry", + "string_scanner", + "test", + "test_process", + "xml", + "yaml" + ] + }, + { + "name": "xml", + "version": "6.4.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "collection", + "meta", + "petitparser" + ] + }, + { + "name": "petitparser", + "version": "6.0.1", + "kind": "transitive", + "source": "hosted", + "dependencies": [ + "meta" + ] + }, + { + "name": "retry", + "version": "3.1.2", + "kind": "transitive", + "source": "hosted", + "dependencies": [] + }, + { + "name": "charcode", + "version": "1.3.1", + "kind": "direct", + "source": "hosted", + "dependencies": [] + } +] diff --git a/nixpkgs/pkgs/development/tools/misc/dart-sass/pubspec.lock b/nixpkgs/pkgs/development/tools/misc/dart-sass/pubspec.lock new file mode 100644 index 000000000000..295a1e9295bc --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dart-sass/pubspec.lock @@ -0,0 +1,637 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: "direct dev" + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + archive: + dependency: "direct dev" + description: + name: archive + sha256: e0902a06f0e00414e4e3438a084580161279f137aeb862274710f29ec10cf01e + url: "https://pub.dev" + source: hosted + version: "3.3.9" + args: + dependency: "direct main" + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: "direct main" + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + charcode: + dependency: "direct main" + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_pkg: + dependency: "direct main" + description: + name: cli_pkg + sha256: "009e19944bbfb07c3b97f2f8c9941aa01ca70a7d3d0018e813303b4c3905c9b9" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + cli_repl: + dependency: "direct main" + description: + name: cli_repl + sha256: a2ee06d98f211cb960c777519cb3d14e882acd90fe5e078668e3ab4baab0ddd4 + url: "https://pub.dev" + source: hosted + version: "0.2.3" + cli_util: + dependency: "direct dev" + description: + name: cli_util + sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + url: "https://pub.dev" + source: hosted + version: "0.4.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + url: "https://pub.dev" + source: hosted + version: "1.6.3" + crypto: + dependency: "direct dev" + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + dart_style: + dependency: "direct dev" + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + dartdoc: + dependency: "direct dev" + description: + name: dartdoc + sha256: d9bab893c9f42615f62bf2d3ff2b89d5905952d1d42cc7890003537249cb472e + url: "https://pub.dev" + source: hosted + version: "6.3.0" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + grinder: + dependency: "direct dev" + description: + name: grinder + sha256: "48495acdb3df702c55c952c6536faf11631b8401a292eb0d182ef332fc568b56" + url: "https://pub.dev" + source: hosted + version: "0.9.4" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: "direct main" + description: + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: "direct main" + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + lints: + dependency: "direct dev" + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd + url: "https://pub.dev" + source: hosted + version: "7.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + meta: + dependency: "direct main" + description: + name: meta + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" + source: hosted + version: "1.10.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + native_synchronization: + dependency: "direct main" + description: + name: native_synchronization + sha256: ff200fe0a64d733ff7d4dde2005271c297db81007604c8cd21037959858133ab + url: "https://pub.dev" + source: hosted + version: "0.2.0" + node_interop: + dependency: "direct main" + description: + name: node_interop + sha256: "3af2420c728173806f4378cf89c53ba9f27f7f67792b898561bff9d390deb98e" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + node_preamble: + dependency: "direct dev" + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + oauth2: + dependency: transitive + description: + name: oauth2 + sha256: c4013ef62be37744efdc0861878fd9e9285f34db1f9e331cc34100d7674feb42 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: "direct main" + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: "direct main" + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 + url: "https://pub.dev" + source: hosted + version: "6.0.1" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" + source: hosted + version: "3.7.3" + pool: + dependency: "direct main" + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + protoc_plugin: + dependency: "direct dev" + description: + name: protoc_plugin + sha256: a800528e47f6efd31a57213dd11b6036f36cbd6677785742a2121e96f7c7a2b9 + url: "https://pub.dev" + source: hosted + version: "21.1.1" + pub_api_client: + dependency: "direct dev" + description: + name: pub_api_client + sha256: d456816ef5142906a22dc56e37be6bef6cb0276f0a26c11d1f7d277868202e71 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + pub_semver: + dependency: "direct main" + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec: + dependency: transitive + description: + name: pubspec + sha256: f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e + url: "https://pub.dev" + source: hosted + version: "2.3.0" + pubspec_parse: + dependency: "direct dev" + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + quiver: + dependency: transitive + description: + name: quiver + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" + source: hosted + version: "3.2.1" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: "direct main" + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: "direct main" + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: "direct main" + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: "direct main" + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: "direct main" + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: "direct main" + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: "direct main" + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9" + url: "https://pub.dev" + source: hosted + version: "1.24.6" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + test_core: + dependency: transitive + description: + name: test_core + sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265" + url: "https://pub.dev" + source: hosted + version: "0.5.6" + test_descriptor: + dependency: "direct dev" + description: + name: test_descriptor + sha256: abe245e8b0d61245684127fe32343542c25dc2a1ce8f405531637241d98d07e4 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + test_process: + dependency: "direct dev" + description: + name: test_process + sha256: "217f19b538926e4922bdb2a01410100ec4e3beb4cc48eae5ae6b20037b07bbd6" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + typed_data: + dependency: "direct main" + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + uri: + dependency: transitive + description: + name: uri + sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + url: "https://pub.dev" + source: hosted + version: "11.10.0" + watcher: + dependency: "direct main" + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + xml: + dependency: transitive + description: + name: xml + sha256: af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556 + url: "https://pub.dev" + source: hosted + version: "6.4.2" + yaml: + dependency: "direct dev" + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.0.0 <4.0.0" diff --git a/nixpkgs/pkgs/development/tools/misc/dbench/default.nix b/nixpkgs/pkgs/development/tools/misc/dbench/default.nix new file mode 100644 index 000000000000..bb95f21f68d6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dbench/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchgit, autoconf, popt, zlib, rpcsvc-proto, libtirpc }: + +stdenv.mkDerivation rec { + pname = "dbench"; + version = "2013-01-01"; + + src = fetchgit { + url = "git://git.samba.org/sahlberg/${pname}.git"; + rev = "65b19870ed8d25bff14cafa1c30beb33f1fb6597"; + sha256 = "16lcbwmmx8z5i73k3dnf54yffrpx7ql3y9k3cpkss9dcyxb1p83i"; + }; + + nativeBuildInputs = [ autoconf rpcsvc-proto ]; + buildInputs = [ popt zlib libtirpc ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; + NIX_LDFLAGS = [ "-ltirpc" ]; + + patches = [ + # patch has been also sent upstream and might be included in future versions + ./fix-missing-stdint.patch + ]; + + preConfigure = '' + ./autogen.sh + configureFlagsArray+=("--datadir=$out/share/dbench") + ''; + + postInstall = '' + cp -R loadfiles/* $out/share/dbench/doc/dbench/loadfiles + + # dbench looks here for the file + ln -s doc/dbench/loadfiles/client.txt $out/share/dbench/client.txt + + # backwards compatible to older nixpkgs packaging introduced by + # 3f27be8e5d5861cd4b9487d6c5212d88bf24316d + ln -s dbench/doc/dbench/loadfiles $out/share/loadfiles + ''; + + meta = with lib; { + description = "Filesystem benchmark tool based on load patterns"; + homepage = "https://dbench.samba.org/"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch b/nixpkgs/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch new file mode 100644 index 000000000000..96cb28e9e55a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch @@ -0,0 +1,10 @@ +--- dbench-65b1987.org/libnfs.c 2017-11-08 12:25:39.652147989 +0000 ++++ dbench-65b1987/libnfs.c 2017-11-08 12:26:20.269897054 +0000 +@@ -23,6 +23,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> ++#include <stdint.h> + + #define discard_const(ptr) ((void *)((intptr_t)(ptr))) + diff --git a/nixpkgs/pkgs/development/tools/misc/ddd/default.nix b/nixpkgs/pkgs/development/tools/misc/ddd/default.nix new file mode 100644 index 000000000000..e3d55472faac --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ddd/default.nix @@ -0,0 +1,31 @@ +{lib, stdenv, fetchurl, motif, ncurses, libX11, libXt}: + +stdenv.mkDerivation rec { + pname = "ddd"; + version = "3.3.12"; + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + sha256 = "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis"; + }; + buildInputs = [motif ncurses libX11 libXt]; + configureFlags = [ "--with-x" ]; + + patches = [ + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 + ./gcc44.patch + ]; + + env.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.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ emilytrau ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ddd/gcc44.patch b/nixpkgs/pkgs/development/tools/misc/ddd/gcc44.patch new file mode 100644 index 000000000000..c4e4004b12e0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ddd/gcc44.patch @@ -0,0 +1,11 @@ +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 +--- a/ddd/strclass.C~ 2008-11-07 17:57:13.000000000 +0000 ++++ b/ddd/strclass.C 2008-11-07 17:57:27.000000000 +0000 +@@ -39,6 +39,7 @@ + #include <ctype.h> + #include <limits.h> + #include <new> ++#include <cstdio> + #include <stdlib.h> + + void string::error(const char* msg) const diff --git a/nixpkgs/pkgs/development/tools/misc/debugedit/default.nix b/nixpkgs/pkgs/development/tools/misc/debugedit/default.nix new file mode 100644 index 000000000000..8da0effe7be5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/debugedit/default.nix @@ -0,0 +1,30 @@ +#TODO@deliciouslytyped The tool seems to unnecessarily force mutable access for the debugedit `-l` feature +{fetchgit, lib, stdenv, autoreconfHook, pkg-config, elfutils, help2man, util-linux}: +stdenv.mkDerivation rec { + pname = "debugedit"; + version = "5.0"; + + nativeBuildInputs = [ autoreconfHook pkg-config help2man ]; + buildInputs = [ elfutils ]; + nativeCheckInputs = [ util-linux ]; # Tests use `rev` + + src = fetchgit { + url = "git://sourceware.org/git/debugedit.git"; + rev = "debugedit-${version}"; + sha256 = "VTZ7ybQT3DfKIfK0lH+JiehCJyJ+qpQ0bAn1/f+Pscs="; + }; + + preBuild = '' + patchShebangs scripts/find-debuginfo.in + ''; + + doCheck = true; + + meta = with lib; { + description = "Provides programs and scripts for creating debuginfo and source file distributions, collect build-ids and rewrite source paths in DWARF data for debugging, tracing and profiling"; + homepage = "https://sourceware.org/debugedit/"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ deliciouslytyped ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/deheader/default.nix b/nixpkgs/pkgs/development/tools/misc/deheader/default.nix new file mode 100644 index 000000000000..7847c29f67c5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/deheader/default.nix @@ -0,0 +1,68 @@ +{ lib +, stdenv +, python3 +, xmlto +, docbook-xsl-nons +, fetchFromGitLab +, installShellFiles +}: + +stdenv.mkDerivation rec { + pname = "deheader"; + version = "1.10"; + outputs = [ "out" "man" ]; + + src = fetchFromGitLab { + owner = "esr"; + repo = "deheader"; + rev = version; + sha256 = "sha256-dYTHvFWlt3aM/fdZFge7GBdd9bfCrEcp7ULJuBl71Xs="; + }; + + buildInputs = [ python3 ]; + + nativeBuildInputs = [ xmlto docbook-xsl-nons installShellFiles ]; + + # With upstream Makefile, xmlto is called without "--skip-validation". It + # makes it require a lot of dependencies, yet ultimately it fails + # nevertheless in attempt to fetch something from SourceForge. + # + # Need to set "foundMakefile" so "make check" tests are run. + buildPhase = '' + runHook preBuild + + xmlto man --skip-validation deheader.xml + patchShebangs ./deheader + foundMakefile=1 + + runHook postBuild + ''; + + doCheck = true; + + installPhase = '' + runHook preInstall + + install -Dm755 ./deheader -t $out/bin + installManPage ./deheader.1 + + runHook postInstall + ''; + + meta = with lib; { + description = "Tool to find and optionally remove unneeded includes in C or C++ source files"; + longDescription = '' + This tool takes a list of C or C++ sourcefiles and generates a report + on which #includes can be omitted from them -- the test, for each foo.c + or foo.cc or foo.cpp, is simply whether 'rm foo.o; make foo.o' returns a + zero status. Optionally, with the -r option, the unneeded headers are removed. + The tool also reports on headers required for strict portability. + ''; + homepage = "http://catb.org/~esr/deheader"; + changelog = "https://gitlab.com/esr/deheader/-/blob/master/NEWS.adoc"; + license = licenses.bsd2; + maintainers = with maintainers; [ kaction ]; + + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dejagnu/default.nix b/nixpkgs/pkgs/development/tools/misc/dejagnu/default.nix new file mode 100644 index 000000000000..5c7720a2024b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dejagnu/default.nix @@ -0,0 +1,66 @@ +{ fetchurl, lib, stdenv, expect, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "dejagnu"; + version = "1.6.3"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1qx2cv6qkxbiqg87jh217jb62hk3s7dmcs4cz1llm2wmsynfznl7"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ expect ]; + + # dejagnu-1.6.3 can't successfully run tests in source tree: + # https://wiki.linuxfromscratch.org/lfs/ticket/4871 + preConfigure = '' + mkdir build + cd build + ''; + configureScript = "../configure"; + + doCheck = !(with stdenv; isDarwin && isAarch64); + + # Note: The test-suite *requires* /dev/pts among the `build-chroot-dirs' of + # the build daemon when building in a chroot. See + # <https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01056.html> for + # details. + + # The test-suite needs to have a non-empty stdin: + # https://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html + checkPhase = '' + # Provide `runtest' with a log name, otherwise it tries to run + # `whoami', which fails when in a chroot. + LOGNAME="nix-build-daemon" make check < /dev/zero + ''; + + postInstall = '' + # 'runtest' and 'dejagnu' look up 'expect' in their 'bin' path + # first. We avoid use of 'wrapProgram' here because wrapping + # of shell scripts does not preserve argv[0] for schell scripts: + # https://sourceware.org/PR30052#c5 + ln -s ${expect}/bin/expect $out/bin/expect + ''; + + meta = with lib; { + description = "Framework for testing other programs"; + + longDescription = '' + DejaGnu is a framework for testing other programs. Its purpose + is to provide a single front end for all tests. Think of it as a + custom library of Tcl procedures crafted to support writing a + test harness. A test harness is the testing infrastructure that + is created to support a specific program or tool. Each program + can have multiple testsuites, all supported by a single test + harness. DejaGnu is written in Expect, which in turn uses Tcl -- + Tool command language. + ''; + + homepage = "https://www.gnu.org/software/dejagnu/"; + license = licenses.gpl2Plus; + + platforms = platforms.unix; + maintainers = with maintainers; [ vrthra ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/devspace/default.nix b/nixpkgs/pkgs/development/tools/misc/devspace/default.nix new file mode 100644 index 000000000000..4f657ff3b6d4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/devspace/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "devspace"; + version = "6.3.3"; + + src = fetchFromGitHub { + owner = "loft-sh"; + repo = "devspace"; + rev = "v${version}"; + sha256 = "sha256-xAK06bpl8BGsVUu6O1C2l+tzeiCQoRUMIUtwntUZVvU="; + }; + + vendorHash = null; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + ]; + + # Check are disable since they requiered a working K8S cluster + # TODO: add a nixosTest to be able to perform the package check + doCheck = false; + + meta = with lib; { + description = "DevSpace is an open-source developer tool for Kubernetes that lets you develop and deploy cloud-native software faster"; + homepage = "https://devspace.sh/"; + changelog = "https://github.com/loft-sh/devspace/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ darkonion0 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dfu-programmer/default.nix b/nixpkgs/pkgs/development/tools/misc/dfu-programmer/default.nix new file mode 100644 index 000000000000..062f68c83438 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dfu-programmer/default.nix @@ -0,0 +1,21 @@ +{ lib, stdenv, fetchurl, libusb-compat-0_1 }: +stdenv.mkDerivation rec { + pname = "dfu-programmer"; + version = "0.7.2"; + + buildInputs = [ libusb-compat-0_1 ]; + + src = fetchurl { + url = "mirror://sourceforge/dfu-programmer/${pname}-${version}.tar.gz"; + sha256 = "15gr99y1z9vbvhrkd25zqhnzhg6zjmaam3vfjzf2mazd39mx7d0x"; + }; + + configureFlags = [ "--disable-libusb_1_0" ]; + + meta = with lib; { + license = licenses.gpl2; + description = "A Device Firmware Update based USB programmer for Atmel chips with a USB bootloader"; + homepage = "http://dfu-programmer.sourceforge.net/"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dfu-util/default.nix b/nixpkgs/pkgs/development/tools/misc/dfu-util/default.nix new file mode 100644 index 000000000000..26610c2c78d7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dfu-util/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchurl, pkg-config, libusb1 }: + +stdenv.mkDerivation rec { + pname = "dfu-util"; + version = "0.11"; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libusb1 ]; + + src = fetchurl { + url = "https://dfu-util.sourceforge.net/releases/${pname}-${version}.tar.gz"; + sha256 = "sha256-tLU7ohqC7349TEffKVKt9fpJT0mbawtXxYxdBK6P8Z4="; + }; + + meta = with lib; { + description = "Device firmware update (DFU) USB programmer"; + longDescription = '' + dfu-util is a program that implements the host (PC) side of the USB + DFU 1.0 and 1.1 (Universal Serial Bus Device Firmware Upgrade) protocol. + + DFU is intended to download and upload firmware to devices connected over + USB. It ranges from small devices like micro-controller boards up to mobile + phones. With dfu-util you are able to download firmware to your device or + upload firmware from it. + ''; + homepage = "https://dfu-util.sourceforge.net"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = [ maintainers.fpletz ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/direvent/default.nix b/nixpkgs/pkgs/development/tools/misc/direvent/default.nix new file mode 100644 index 000000000000..79a238ad0c0c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/direvent/default.nix @@ -0,0 +1,21 @@ +{ lib, stdenv +, fetchurl +}: + +stdenv.mkDerivation rec { + pname = "direvent"; + version = "5.3"; + + src = fetchurl { + url = "mirror://gnu/direvent/direvent-${version}.tar.gz"; + sha256 = "sha256-lAWop32kn+krvkrxi/kl/5H20zdMELfXAKAxusuUxJc="; + }; + + meta = with lib; { + description = "Directory event monitoring daemon"; + homepage = "https://www.gnu.org.ua/software/direvent/"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ puffnfresh ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/distcc/default.nix b/nixpkgs/pkgs/development/tools/misc/distcc/default.nix new file mode 100644 index 000000000000..312f69328580 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/distcc/default.nix @@ -0,0 +1,84 @@ +{ lib, stdenv, fetchFromGitHub, popt, avahi, pkg-config, python3, gtk3, runCommand +, gcc, autoconf, automake, which, procps, libiberty_static +, runtimeShell +, sysconfDir ? "" # set this parameter to override the default value $out/etc +, static ? false +}: + +let + pname = "distcc"; + version = "2021-03-11"; + distcc = stdenv.mkDerivation { + inherit pname version; + src = fetchFromGitHub { + owner = "distcc"; + repo = "distcc"; + rev = "de21b1a43737fbcf47967a706dab4c60521dbbb1"; + sha256 = "0zjba1090awxkmgifr9jnjkxf41zhzc4f6mrnbayn3v6s77ca9x4"; + }; + + nativeBuildInputs = [ pkg-config autoconf automake ]; + buildInputs = [popt avahi python3 gtk3 which procps libiberty_static]; + preConfigure = + '' + export CPATH=$(ls -d ${gcc.cc}/lib/gcc/*/${gcc.cc.version}/plugin/include) + + configureFlagsArray=( CFLAGS="-O2 -fno-strict-aliasing" + CXXFLAGS="-O2 -fno-strict-aliasing" + --mandir=$out/share/man + ${lib.optionalString (sysconfDir != "") "--sysconfdir=${sysconfDir}"} + ${lib.optionalString static "LDFLAGS=-static"} + ${lib.withFeature (static == true || popt == null) "included-popt"} + ${lib.withFeature (avahi != null) "avahi"} + ${lib.withFeature (gtk3 != null) "gtk"} + --without-gnome + --enable-rfc2553 + --disable-Werror # a must on gcc 4.6 + ) + installFlags="sysconfdir=$out/etc"; + + ./autogen.sh + ''; + + # The test suite fails because it uses hard-coded paths, i.e. /usr/bin/gcc. + doCheck = false; + + passthru = { + # A derivation that provides gcc and g++ commands, but that + # will end up calling distcc for the given cacheDir + # + # extraConfig is meant to be sh lines exporting environment + # variables like DISTCC_HOSTS, DISTCC_DIR, ... + links = extraConfig: (runCommand "distcc-links" { passthru.gcc = gcc.cc; } + '' + mkdir -p $out/bin + if [ -x "${gcc.cc}/bin/gcc" ]; then + cat > $out/bin/gcc << EOF + #!${runtimeShell} + ${extraConfig} + exec ${distcc}/bin/distcc gcc "\$@" + EOF + chmod +x $out/bin/gcc + fi + if [ -x "${gcc.cc}/bin/g++" ]; then + cat > $out/bin/g++ << EOF + #!${runtimeShell} + ${extraConfig} + exec ${distcc}/bin/distcc g++ "\$@" + EOF + chmod +x $out/bin/g++ + fi + ''); + }; + + meta = { + description = "A fast, free distributed C/C++ compiler"; + homepage = "http://distcc.org"; + license = "GPL"; + + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ anderspapitto ]; + }; + }; +in + distcc diff --git a/nixpkgs/pkgs/development/tools/misc/distcc/masq.nix b/nixpkgs/pkgs/development/tools/misc/distcc/masq.nix new file mode 100644 index 000000000000..27840481a109 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/distcc/masq.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, gccRaw, binutils }: + +stdenv.mkDerivation { + name = "distcc-masq-${gccRaw.name}"; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/bin + + bin=${gccRaw}/bin + + shopt -s nullglob + if [ -f $bin/gcc ]; then + ln -s $bin/gcc $out/bin + else + for a in $bin/*-gcc; do + ln -s $bin/*-gcc $out/bin/gcc + ln -s $bin/*-gcc $out/bin/cc + done + fi + + if [ -f $bin/g++ ]; then + ln -s $bin/g++ $out/bin + else + for a in $bin/*-g++; do + ln -sf $bin/*-g++ $out/bin/g++ + ln -sf $bin/*-g++ $out/bin/c++ + done + fi + + bbin=${binutils}/bin + if [ -f $bbin/as ]; then + ln -s $bbin/as $out/bin + else + for a in $bbin/*-as; do + ln -sf $bbin/*-as $out/bin/as + done + fi + ''; + + meta = { + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/doclifter/default.nix b/nixpkgs/pkgs/development/tools/misc/doclifter/default.nix new file mode 100644 index 000000000000..d346f94b4784 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/doclifter/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, python3, makeWrapper, libxml2 }: + +stdenv.mkDerivation rec { + pname = "doclifter"; + version = "2.20"; + src = fetchurl { + url = "http://www.catb.org/~esr/${pname}/${pname}-${version}.tar.gz"; + sha256 = "sha256-BEuMbICJ8TD3+VjUr8rmhss7XlPNjxSy1P0SkmKLPsc="; + }; + buildInputs = [ python3 ]; + nativeBuildInputs = [ python3 makeWrapper ]; + + strictDeps = true; + + makeFlags = [ "PREFIX=$(out)" ]; + + preInstall = '' + mkdir -p $out/bin + mkdir -p $out/share/man/man1 + substituteInPlace manlifter \ + --replace '/usr/bin/env python2' '/usr/bin/env python3' + 2to3 -w manlifter + cp manlifter $out/bin + wrapProgram "$out/bin/manlifter" \ + --prefix PATH : "${libxml2}/bin:$out/bin" + cp manlifter.1 $out/share/man/man1 + ''; + + meta = { + description = "Lift documents in nroff markups to XML-DocBook"; + homepage = "http://www.catb.org/esr/doclifter"; + license = "BSD"; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/docopts/default.nix b/nixpkgs/pkgs/development/tools/misc/docopts/default.nix new file mode 100644 index 000000000000..1b7834318772 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/docopts/default.nix @@ -0,0 +1,31 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "docopts"; + version = "0.6.4-with-no-mangle-double-dash"; + + src = fetchFromGitHub { + owner = "docopt"; + repo = pname; + rev = "v${version}"; + sha256 = "0zxax0kl8wqpkzmw9ij4qgfhjbk4r7996pjyp9xf5icyk8knp00q"; + }; + + goPackagePath = "github.com/docopt/${pname}"; + + goDeps = ./deps.nix; + + subPackages = [ "./" ]; + + postInstall = '' + install -D -m 755 ./go/src/$goPackagePath/docopts.sh $out/bin/docopts.sh + ''; + + meta = with lib; { + homepage = "https://github.com/docopt/${pname}"; + description = "docopt CLI tool for shell scripting"; + license = licenses.mit; + maintainers = [ maintainers.confus ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/docopts/deps.nix b/nixpkgs/pkgs/development/tools/misc/docopts/deps.nix new file mode 100644 index 000000000000..8cc1686de7d6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/docopts/deps.nix @@ -0,0 +1,11 @@ +[ + { + goPackagePath = "github.com/docopt/docopt-go"; + fetch = { + type = "git"; + url = "https://github.com/docopt/docopt.go"; + rev = "ee0de3bc6815ee19d4a46c7eb90f829db0e014b1"; # "0.6.2"; + sha256 = "sha256-0mCKIC5x7aauBL8ahXB9ExMfoTJl55HaafWWWPNRmUI="; + }; + } +] diff --git a/nixpkgs/pkgs/development/tools/misc/doq/default.nix b/nixpkgs/pkgs/development/tools/misc/doq/default.nix new file mode 100644 index 000000000000..8322c7e2b49c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/doq/default.nix @@ -0,0 +1,44 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "doq"; + version = "0.10.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "heavenshell"; + repo = "py-doq"; + rev = "refs/tags/${version}"; + hash = "sha256-iVu+5o8pZ5OhIzNItWbzUzqC3VQ6HCD7nP5gW/PVAMM="; + }; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + setuptools-generate + ]; + + propagatedBuildInputs = with python3.pkgs; [ + jinja2 + parso + toml + ]; + + nativeCheckInputs = with python3.pkgs; [ + parameterized + pytestCheckHook + ]; + + pythonImportsCheck = [ "doq" ]; + + meta = with lib; { + description = "Docstring generator for Python"; + homepage = "https://github.com/heavenshell/py-doq"; + changelog = "https://github.com/heavenshell/py-doq/releases/tag/${src.rev}"; + license = licenses.bsd3; + maintainers = with maintainers; [ natsukium ]; + mainProgram = "doq"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/drush/default.nix b/nixpkgs/pkgs/development/tools/misc/drush/default.nix new file mode 100644 index 000000000000..bd1c71109963 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/drush/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }: + +stdenv.mkDerivation rec { + pname = "drush"; + version = "8.4.12"; + + src = fetchurl { + url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar"; + sha256 = "sha256-YtD9lD621LJJAM/ieL4KWvY4o4Uqo3+FWgjGYGdQQaw="; + }; + + dontUnpack = true; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + install -D $src $out/libexec/drush/drush.phar + makeWrapper ${php}/bin/php $out/bin/drush \ + --add-flags "$out/libexec/drush/drush.phar" \ + --prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}" + ''; + + meta = with lib; { + description = "Command-line shell and Unix scripting interface for Drupal"; + homepage = "https://github.com/drush-ops/drush"; + license = licenses.gpl2; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dura/Cargo.lock.patch b/nixpkgs/pkgs/development/tools/misc/dura/Cargo.lock.patch new file mode 100644 index 000000000000..48db9caaa291 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dura/Cargo.lock.patch @@ -0,0 +1,13 @@ +diff --git i/Cargo.lock w/Cargo.lock +index e037758..e039531 100644 +--- i/Cargo.lock ++++ w/Cargo.lock +@@ -106,7 +106,7 @@ dependencies = [ + + [[package]] + name = "dura" +-version = "0.2.0-snapshot" ++version = "0.2.0" + dependencies = [ + "chrono", + "clap", diff --git a/nixpkgs/pkgs/development/tools/misc/dura/default.nix b/nixpkgs/pkgs/development/tools/misc/dura/default.nix new file mode 100644 index 000000000000..eba3f16c3659 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dura/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, Security }: + +rustPlatform.buildRustPackage rec { + pname = "dura"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "tkellogg"; + repo = "dura"; + rev = "v${version}"; + sha256 = "sha256-xAcFk7z26l4BYYBEw+MvbG6g33MpPUvnpGvgmcqhpGM="; + }; + + cargoSha256 = "sha256-XOtPtOEKZMJzNeBZBT3Mc/KOjMOcz71byIv/ftcRP48="; + + cargoPatches = [ + ./Cargo.lock.patch + ]; + + doCheck = false; + + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + Security + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + meta = with lib; { + description = "A background process that saves uncommitted changes on git"; + longDescription = '' + Dura is a background process that watches your Git repositories and + commits your uncommitted changes without impacting HEAD, the current + branch, or the Git index (staged files). If you ever get into an + "oh snap!" situation where you think you just lost days of work, + checkout a "dura" branch and recover. + ''; + homepage = "https://github.com/tkellogg/dura"; + license = licenses.asl20; + maintainers = with maintainers; [ drupol ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/dwz/default.nix b/nixpkgs/pkgs/development/tools/misc/dwz/default.nix new file mode 100644 index 000000000000..0a13d4a68dd0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/dwz/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchurl, elfutils }: + +stdenv.mkDerivation rec { + pname = "dwz"; + version = "0.14"; + + src = fetchurl { + url = "https://www.sourceware.org/ftp/${pname}/releases/${pname}-${version}.tar.gz"; + sha256 = "07qdvzfk4mvbqj5z3aff7vc195dxqn1mi27w2dzs1w2zhymnw01k"; + }; + + nativeBuildInputs = [ elfutils ]; + + makeFlags = [ "prefix=${placeholder "out"}" ]; + + meta = with lib; { + homepage = "https://sourceware.org/dwz/"; + description = "DWARF optimization and duplicate removal tool"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ jbcrail ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/edb/default.nix b/nixpkgs/pkgs/development/tools/misc/edb/default.nix new file mode 100644 index 000000000000..2203863264f3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/edb/default.nix @@ -0,0 +1,44 @@ +{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, boost, capstone +, double-conversion, graphviz, qtxmlpatterns }: + +mkDerivation rec { + pname = "edb"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "eteran"; + repo = "edb-debugger"; + rev = "1.3.0"; + fetchSubmodules = true; + sha256 = "fFUau8XnsRFjC83HEsqyhrwCCBOfDmV6oACf3txm7O8="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ boost.dev capstone double-conversion graphviz qtxmlpatterns ]; + + postPatch = '' + # Remove CMAKE_INSTALL_PREFIX from DEFAULT_PLUGIN_PATH otherwise the nix store path will appear twice. + substituteInPlace ./src/CMakeLists.txt --replace \ + '-DDEFAULT_PLUGIN_PATH=\"''${CMAKE_INSTALL_PREFIX}/''${CMAKE_INSTALL_LIBDIR}/edb\"' \ + '-DDEFAULT_PLUGIN_PATH=\"''${CMAKE_INSTALL_LIBDIR}/edb\"' + + # The build script checks for the presence of .git to determine whether + # submodules were fetched and will throw an error if it's not there. + # Avoid using leaveDotGit in the fetchFromGitHub options as it is non-deterministic. + mkdir -p src/qhexview/.git + + # Change default optional terminal program path to one that is more likely to work on NixOS. + substituteInPlace ./src/Configuration.cpp --replace "/usr/bin/xterm" "xterm"; + + sed '1i#include <memory>' -i include/{RegisterViewModelBase,State,IState}.h # gcc12 + ''; + + meta = with lib; { + description = "Cross platform AArch32/x86/x86-64 debugger"; + homepage = "https://github.com/eteran/edb-debugger"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ lihop maxxk ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/editorconfig-checker/default.nix b/nixpkgs/pkgs/development/tools/misc/editorconfig-checker/default.nix new file mode 100644 index 000000000000..57e7e79dfd3d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/editorconfig-checker/default.nix @@ -0,0 +1,37 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, editorconfig-checker }: + +buildGoModule rec { + pname = "editorconfig-checker"; + version = "2.7.2"; + + src = fetchFromGitHub { + owner = "editorconfig-checker"; + repo = "editorconfig-checker"; + rev = version; + hash = "sha256-ktZeBj5feJMf4XR4hybKdNrNCIrQD6KPetZffAZjwqI="; + }; + + vendorHash = "sha256-dhvRZ+AYSmSzHsf3yOYBSvZbw7dfwQiILu+VSUX8N3s="; + + doCheck = false; + + nativeBuildInputs = [ installShellFiles ]; + + ldflags = [ "-X main.version=${version}" ]; + + postInstall = '' + installManPage docs/editorconfig-checker.1 + ''; + + passthru.tests.version = testers.testVersion { + package = editorconfig-checker; + }; + + meta = with lib; { + changelog = "https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/${src.rev}"; + description = "A tool to verify that your files are in harmony with your .editorconfig"; + homepage = "https://editorconfig-checker.github.io/"; + license = licenses.mit; + maintainers = with maintainers; [ uri-canva zowoq ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/editorconfig-core-c/default.nix b/nixpkgs/pkgs/development/tools/misc/editorconfig-core-c/default.nix new file mode 100644 index 000000000000..f46e840276ff --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/editorconfig-core-c/default.nix @@ -0,0 +1,56 @@ +{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, pcre2, doxygen }: + +stdenv.mkDerivation rec { + pname = "editorconfig-core-c"; + version = "0.12.5"; + + outputs = [ "out" "dev" ]; + + src = fetchFromGitHub { + owner = "editorconfig"; + repo = "editorconfig-core-c"; + rev = "v${version}"; + sha256 = "sha256-4p8bomeXtA+zJ3IvWW0UZixdMnjYWYu7yeA6JUwwRb8="; + fetchSubmodules = true; + }; + + patches = [ + # Fox broken paths in pkg-config. + # https://github.com/editorconfig/editorconfig-core-c/pull/81 + (fetchpatch { + url = "https://github.com/editorconfig/editorconfig-core-c/commit/e0ead79d3bb4179fe9bccd3e5598ed47cc0863a3.patch"; + sha256 = "t/DiPVyyYoMwFpNG6sD+rLWHheFCbMaILXyey6inGdc="; + }) + ]; + + nativeBuildInputs = [ + cmake + doxygen + ]; + + buildInputs = [ + pcre2 + ]; + + # Multiple doxygen can not generate man pages in the same base directory in + # parallel: https://github.com/doxygen/doxygen/issues/6293 + enableParallelBuilding = false; + + meta = with lib; { + homepage = "https://editorconfig.org/"; + description = "EditorConfig core library written in C"; + longDescription = '' + EditorConfig makes it easy to maintain the correct coding style when + switching between different text editors and between different + projects. The EditorConfig project maintains a file format and plugins + for various text editors which allow this file format to be read and used + by those editors. For information on the file format and supported text + editors, see the EditorConfig website. + ''; + downloadPage = "https://github.com/editorconfig/editorconfig-core-c"; + license = with licenses; [ bsd2 bsd3 ]; + maintainers = with maintainers; [ dochang ]; + platforms = platforms.unix; + mainProgram = "editorconfig"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/eggdbus/default.nix b/nixpkgs/pkgs/development/tools/misc/eggdbus/default.nix new file mode 100644 index 000000000000..c5ede8488511 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/eggdbus/default.nix @@ -0,0 +1,21 @@ +{ lib, stdenv, fetchurl, pkg-config, glib, dbus, dbus-glib }: + +stdenv.mkDerivation rec { + pname = "eggdbus"; + version = "0.6"; + + src = fetchurl { + url = "https://hal.freedesktop.org/releases/${pname}-${version}.tar.gz"; + sha256 = "118hj63ac65zlg71kydv4607qcg1qpdlql4kvhnwnnhar421jnq4"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ glib dbus dbus-glib ]; + + meta = with lib; { + homepage = "https://hal.freedesktop.org/releases/"; + description = "D-Bus bindings for GObject"; + platforms = platforms.linux; + license = licenses.lgpl2; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/elfinfo/default.nix b/nixpkgs/pkgs/development/tools/misc/elfinfo/default.nix new file mode 100644 index 000000000000..5ea97b77eeb8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/elfinfo/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "elfinfo"; + version = "1.2.2"; + + src = fetchFromGitHub { + owner = "xyproto"; + repo = "elfinfo"; + rev = version; + sha256 = "sha256-HnjHOjanStqmDXnc6Z9w0beCMJFf/ndWbYxoDEaOws4="; + }; + + vendorHash = null; + + meta = with lib; { + description = "Small utility for showing information about ELF files"; + homepage = "https://elfinfo.roboticoverlords.org/"; + changelog = "https://github.com/xyproto/elfinfo/releases/tag/${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ dtzWill ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/elfkickers/default.nix b/nixpkgs/pkgs/development/tools/misc/elfkickers/default.nix new file mode 100644 index 000000000000..7220ca31443a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/elfkickers/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "elfkickers"; + version = "3.2"; + + src = fetchurl { + url = "https://www.muppetlabs.com/~breadbox/pub/software/ELFkickers-${version}.tar.gz"; + sha256 = "sha256-m4HmxT4MlPwZjZiC63NxVvNtVlFS3DIRiJfHewaiaHw="; + }; + + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "prefix:=${placeholder "out"}" ]; + + enableParallelBuilding = true; + + meta = with lib; { + homepage = "https://www.muppetlabs.com/~breadbox/software/elfkickers.html"; + description = "A collection of programs that access and manipulate ELF files"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = [ maintainers.dtzWill ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/elfutils/debug-info-from-env.patch b/nixpkgs/pkgs/development/tools/misc/elfutils/debug-info-from-env.patch new file mode 100644 index 000000000000..409f1311c315 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/elfutils/debug-info-from-env.patch @@ -0,0 +1,27 @@ +Look up .build-id files relative to the directories in the +colon-separated environment variable NIX_DEBUG_INFO_DIRS, unless +overriden by --debuginfo-path. + +diff -ru elfutils-0.169-orig/libdwfl/argp-std.c elfutils-0.169/libdwfl/argp-std.c +--- elfutils-0.169-orig/libdwfl/argp-std.c 2017-05-02 23:05:52.000000000 +0200 ++++ elfutils-0.169/libdwfl/argp-std.c 2017-07-28 16:08:06.739558106 +0200 +@@ -376,5 +376,7 @@ + const struct argp * + dwfl_standard_argp (void) + { ++ debuginfo_path = getenv("NIX_DEBUG_INFO_DIRS"); ++ + return &libdwfl_argp; + } +diff -ru elfutils-0.169-orig/src/stack.c elfutils-0.169/src/stack.c +--- elfutils-0.169-orig/src/stack.c 2017-02-24 11:55:28.000000000 +0100 ++++ elfutils-0.169/src/stack.c 2017-07-28 15:50:06.743196696 +0200 +@@ -631,6 +631,8 @@ + /* Set locale. */ + (void) setlocale (LC_ALL, ""); + ++ debuginfo_path = getenv("NIX_DEBUG_INFO_DIRS"); ++ + const struct argp_option options[] = + { + { NULL, 0, NULL, 0, N_("Input selection options:"), 0 }, diff --git a/nixpkgs/pkgs/development/tools/misc/elfutils/default.nix b/nixpkgs/pkgs/development/tools/misc/elfutils/default.nix new file mode 100644 index 000000000000..83a30f3e6f17 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/elfutils/default.nix @@ -0,0 +1,102 @@ +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, musl-fts +, musl-obstack, m4, zlib, zstd, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs +, argp-standalone +, enableDebuginfod ? true, sqlite, curl, libmicrohttpd, libarchive +, gitUpdater +}: + +# TODO: Look at the hardcoded paths to kernel, modules etc. +stdenv.mkDerivation rec { + pname = "elfutils"; + version = "0.189"; + + src = fetchurl { + url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-Ob2PGjOOK3zUq8P/EaDt3G5pD2lXildHjYF5tBSHCMg="; + }; + + patches = [ + ./debug-info-from-env.patch + (fetchpatch { + name = "fix-aarch64_fregs.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/elfutils/fix-aarch64_fregs.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9"; + sha256 = "zvncoRkQx3AwPx52ehjA2vcFroF+yDC2MQR5uS6DATs="; + }) + (fetchpatch { + name = "musl-asm-ptrace-h.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-asm-ptrace-h.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9"; + sha256 = "8D1wPcdgAkE/TNBOgsHaeTZYhd9l+9TrZg8d5C7kG6k="; + }) + (fetchpatch { + name = "musl-macros.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9"; + sha256 = "tp6O1TRsTAMsFe8vw3LMENT/vAu6OmyA8+pzgThHeA8="; + }) + (fetchpatch { + name = "musl-strndupa.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9"; + sha256 = "sha256-7daehJj1t0wPtQzTv+/Rpuqqs5Ng/EYnZzrcf2o/Lb0="; + }) + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ ./musl-error_h.patch ]; + + postPatch = '' + patchShebangs tests/*.sh + '' + lib.optionalString stdenv.hostPlatform.isRiscV '' + # disable failing test: + # + # > dwfl_thread_getframes: No DWARF information found + sed -i s/run-backtrace-dwarf.sh//g tests/Makefile.in + ''; + + outputs = [ "bin" "dev" "out" "man" ]; + + # We need bzip2 in NativeInputs because otherwise we can't unpack the src, + # as the host-bzip2 will be in the path. + nativeBuildInputs = [ m4 bison flex gettext bzip2 ] + ++ lib.optional enableDebuginfod pkg-config; + buildInputs = [ zlib zstd bzip2 xz ] + ++ lib.optionals stdenv.hostPlatform.isMusl [ + argp-standalone + musl-fts + musl-obstack + ] ++ lib.optionals enableDebuginfod [ + sqlite + curl + libmicrohttpd + libarchive + ]; + + propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; + + configureFlags = [ + "--program-prefix=eu-" # prevent collisions with binutils + "--enable-deterministic-archives" + (lib.enableFeature enableDebuginfod "libdebuginfod") + (lib.enableFeature enableDebuginfod "debuginfod") + ]; + + enableParallelBuilding = true; + + # Backtrace unwinding tests rely on glibc-internal symbol names. + # Musl provides slightly different forms and fails. + # Let's disable tests there until musl support is fully upstreamed. + doCheck = !stdenv.hostPlatform.isMusl; + doInstallCheck = !stdenv.hostPlatform.isMusl; + + passthru.updateScript = gitUpdater { + url = "https://sourceware.org/git/elfutils.git"; + rev-prefix = "elfutils-"; + }; + + meta = with lib; { + homepage = "https://sourceware.org/elfutils/"; + description = "A set of utilities to handle ELF objects"; + platforms = platforms.linux; + # https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html + broken = stdenv.hostPlatform.isStatic; + # licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins, + # but since this package isn't split that way, all three are listed. + license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ]; + maintainers = with maintainers; [ eelco r-burns ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/elfutils/musl-error_h.patch b/nixpkgs/pkgs/development/tools/misc/elfutils/musl-error_h.patch new file mode 100644 index 000000000000..711928078d35 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/elfutils/musl-error_h.patch @@ -0,0 +1,66 @@ +diff -crb --new-file a/lib/error.h b/lib/error.h +*** a/lib/error.h 1969-12-31 19:00:00.000000000 -0500 +--- b/lib/error.h 2021-01-21 04:38:25.000000000 -0500 +*************** +*** 0 **** +--- 1,27 ---- ++ #ifndef _ERROR_H_ ++ #define _ERROR_H_ ++ ++ #include <stdarg.h> ++ #include <stdio.h> ++ #include <stdlib.h> ++ #include <string.h> ++ #include <errno.h> ++ ++ static unsigned int error_message_count = 0; ++ ++ static inline void error(int status, int errnum, const char* format, ...) ++ { ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++ } ++ ++ #endif /* _ERROR_H_ */ +diff -crb --new-file a/src/error.h b/src/error.h +*** a/src/error.h 1969-12-31 19:00:00.000000000 -0500 +--- b/src/error.h 2021-01-21 04:38:29.000000000 -0500 +*************** +*** 0 **** +--- 1,27 ---- ++ #ifndef _ERROR_H_ ++ #define _ERROR_H_ ++ ++ #include <stdarg.h> ++ #include <stdio.h> ++ #include <stdlib.h> ++ #include <string.h> ++ #include <errno.h> ++ ++ static unsigned int error_message_count = 0; ++ ++ static inline void error(int status, int errnum, const char* format, ...) ++ { ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++ } ++ ++ #endif /* _ERROR_H_ */ diff --git a/nixpkgs/pkgs/development/tools/misc/epm/default.nix b/nixpkgs/pkgs/development/tools/misc/epm/default.nix new file mode 100644 index 000000000000..b83bb8d33283 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/epm/default.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, rpm +}: + +stdenv.mkDerivation rec { + pname = "epm"; + version = "5.0.0"; + + src = fetchFromGitHub { + owner = "jimjag"; + repo = pname; + rev = "v${version}"; + hash = "sha256-o4B5lWBeve+U70FDgF1DrtNrXxaEY4etkPpwbqF7fmc="; + }; + + patches = [ + # Makefile fix: INSTALL command + (fetchpatch { + url = "https://github.com/jimjag/epm/commit/dc5fcd6fa6e3a74baa28be060769a2b47f9368e7.patch"; + sha256 = "1gfyz493w0larin841xx3xalb7m3sp1r2vv1xki6rz35ybrnb96c"; + }) + # Makefile fix: man pages filenames and docdir target + (fetchpatch { + url = "https://github.com/jimjag/epm/commit/96bb48d4d7b463a09d5a25debfb51c88dcd7398c.patch"; + sha256 = "11aws0qac6vyy3w5z39vkjy4symmfzxfq9qgbgkk74fvx9vax42a"; + }) + ]; + + buildInputs = [ rpm ]; + + meta = with lib; { + description = "The ESP Package Manager generates distribution archives for a variety of platforms"; + homepage = "https://jimjag.github.io/epm/"; + license = licenses.asl20; + maintainers = with maintainers; [ pSub ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ezno/default.nix b/nixpkgs/pkgs/development/tools/misc/ezno/default.nix new file mode 100644 index 000000000000..a31ab1560746 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ezno/default.nix @@ -0,0 +1,34 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "ezno"; + version = "0.0.8"; + + src = fetchFromGitHub { + owner = "kaleidawave"; + repo = "ezno"; + rev = "release/ezno-${version}"; + hash = "sha256-0yLEpNkl7KjBEGxNONtfMjVlWMSKGZ6TbYJMsCeQ3ms="; + }; + + cargoHash = "sha256-noMfKx6BsmWhAVI4r8LlC961Uwogv1JGMYSrNGlLGPQ="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ]; + + cargoBuildFlags = [ "--bin" "ezno" ]; + + meta = with lib; { + description = "A JavaScript compiler and TypeScript checker with a focus on static analysis and runtime performance"; + homepage = "https://github.com/kaleidawave/ezno"; + changelog = "https://github.com/kaleidawave/ezno/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/findnewest/default.nix b/nixpkgs/pkgs/development/tools/misc/findnewest/default.nix new file mode 100644 index 000000000000..6773e9bc0bd4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/findnewest/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation rec { + pname = "findnewest"; + version = "0.3"; + + src = fetchFromGitHub { + owner = "0-wiz-0"; + repo = pname; + rev = "${pname}-${version}"; + sha256 = "1x1cbn2b27h5r0ah5xc06fkalfdci2ngrgd4wibxjw0h88h0nvgq"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + meta = with lib; { + homepage = "https://github.com/0-wiz-0/findnewest"; + description = "Recursively find newest file in a hierarchy and print its timestamp"; + license = licenses.bsd2; + maintainers = with maintainers; [ bhipple ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/fsatrace/default.nix b/nixpkgs/pkgs/development/tools/misc/fsatrace/default.nix new file mode 100644 index 000000000000..408a88687e64 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/fsatrace/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "fsatrace"; + version = "0.0.5"; + + src = fetchFromGitHub { + owner = "jacereda"; + repo = "fsatrace"; + rev = "5af79511828ca6cea4e5dd9f28e1676fb0b705e9"; + "hash" = "sha256-pn07qlrRaM153znEviziuKWrkX9cLsNFCujovmE4UUA="; + }; + + installDir = "libexec/${pname}-${version}"; + + makeFlags = [ "INSTALLDIR=$(out)/$(installDir)" ]; + + preInstall = '' + mkdir -p $out/$installDir + ''; + + postInstall = '' + mkdir -p $out/bin + ln -s $out/$installDir/fsatrace $out/bin/fsatrace + ''; + + meta = with lib; { + homepage = "https://github.com/jacereda/fsatrace"; + description = "filesystem access tracer"; + license = licenses.isc; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/fswatch/default.nix b/nixpkgs/pkgs/development/tools/misc/fswatch/default.nix new file mode 100644 index 000000000000..7b8f9638b7b9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/fswatch/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv +, fetchFromGitHub +, autoreconfHook + # for xargs +, gettext +, libtool +, makeWrapper +, texinfo +, CoreServices +}: + +stdenv.mkDerivation rec { + pname = "fswatch"; + version = "1.17.1"; + + src = fetchFromGitHub { + owner = "emcrisostomo"; + repo = "fswatch"; + rev = version; + sha256 = "sha256-gVYDvda+6ZJkShJXUxUEVxq4enkRrhdvlTTxYWq4Aho="; + }; + + nativeBuildInputs = [ autoreconfHook makeWrapper ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; + buildInputs = [ gettext libtool texinfo ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "A cross-platform file change monitor with multiple backends"; + homepage = "https://github.com/emcrisostomo/fswatch"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ pSub ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/funzzy/default.nix b/nixpkgs/pkgs/development/tools/misc/funzzy/default.nix new file mode 100644 index 000000000000..cc70cbeaf955 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/funzzy/default.nix @@ -0,0 +1,32 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "funzzy"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "cristianoliveira"; + repo = "funzzy"; + rev = "v${version}"; + hash = "sha256-sgfMxSbOBn2Ps6hqrFDm3x9QOnMvtMgO7gAt6kk0cIs="; + }; + + cargoHash = "sha256-If8iBvwiaH1jK8z06ORY/lx+7HAT4InxbjoLe289kws="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ]; + + meta = with lib; { + description = "A lightweight watcher"; + homepage = "https://github.com/cristianoliveira/funzzy"; + changelog = "https://github.com/cristianoliveira/funzzy/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix b/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix new file mode 100644 index 000000000000..0ea3e9505e6a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix @@ -0,0 +1,42 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, makeBinaryWrapper +, runtimeShell +, bat +, gnugrep +, gnumake +}: + +rustPlatform.buildRustPackage rec { + pname = "fzf-make"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "kyu08"; + repo = "fzf-make"; + rev = "v${version}"; + hash = "sha256-VDPkucvp12pdnJkUxSTfU73X9CMvP/UU1ypBnN0Jp80="; + }; + + cargoHash = "sha256-mLbGV0hj571SiM1ZPiHnADYYICgP8ZfgnMTjo2npIgk="; + + nativeBuildInputs = [ + makeBinaryWrapper + ]; + + postInstall = '' + wrapProgram $out/bin/fzf-make \ + --set SHELL ${runtimeShell} \ + --suffix PATH : ${lib.makeBinPath [ bat gnugrep gnumake ]} + ''; + + meta = with lib; { + description = "Fuzzy finder for Makefile"; + homepage = "https://github.com/kyu08/fzf-make"; + changelog = "https://github.com/kyu08/fzf-make/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda sigmanificient ]; + mainProgram = "fzf-make"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gdb/32-bit-BFD_VMA-format.patch b/nixpkgs/pkgs/development/tools/misc/gdb/32-bit-BFD_VMA-format.patch new file mode 100644 index 000000000000..41ce4540d2dd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdb/32-bit-BFD_VMA-format.patch @@ -0,0 +1,68 @@ +Fix iWerror=format build for 32-bit systems. +https://sourceware.org/pipermail/gdb-patches/2022-May/189288.html +--- a/sim/cris/sim-if.c ++++ b/sim/cris/sim-if.c +@@ -257,7 +257,8 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) + + if (verbose) + sim_io_printf (sd, +- "Loading segment at 0x%" BFD_VMA_FMT "x, size 0x%lx\n", ++ "Loading segment at 0x%" BFD_VMA_FMT "x, " ++ "size 0x%" BFD_VMA_FMT "x\n", + lma, phdr[i].p_filesz); + + if (bfd_seek (abfd, phdr[i].p_offset, SEEK_SET) != 0 +@@ -265,7 +266,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) + { + sim_io_eprintf (sd, + "%s: could not read segment at 0x%" BFD_VMA_FMT "x, " +- "size 0x%lx\n", ++ "size 0x%" BFD_VMA_FMT "x\n", + STATE_MY_NAME (sd), lma, phdr[i].p_filesz); + free (buf); + return FALSE; +@@ -275,7 +276,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) + { + sim_io_eprintf (sd, + "%s: could not load segment at 0x%" BFD_VMA_FMT "x, " +- "size 0x%lx\n", ++ "size 0x%" BFD_VMA_FMT "x\n", + STATE_MY_NAME (sd), lma, phdr[i].p_filesz); + free (buf); + return FALSE; +@@ -572,7 +573,8 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd) + memory area, so we go via a temporary area. Luckily, the + interpreter is supposed to be small, less than 0x40000 + bytes. */ +- sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,0x%lx", ++ sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x," ++ "0x%" BFD_VMA_FMT "x", + interp_load_addr, interpsiz); + + /* Now that memory for the interpreter is defined, load it. */ +--- a/sim/m32c/syscalls.c ++++ b/sim/m32c/syscalls.c +@@ -299,8 +299,8 @@ m32c_syscall (int id) + + rv = gettimeofday (&tv, 0); + if (trace) +- printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec, +- tv.tv_usec, tvaddr); ++ printf ("gettimeofday: %lld sec %lld usec to 0x%x\n", ++ (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr); + mem_put_si (tvaddr, tv.tv_sec); + mem_put_si (tvaddr + 4, tv.tv_usec); + put_reg (r0, rv); +--- a/sim/rx/syscalls.c ++++ b/sim/rx/syscalls.c +@@ -270,8 +270,8 @@ rx_syscall (int id) + + rv = gettimeofday (&tv, 0); + if (trace) +- printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec, +- tv.tv_usec, tvaddr); ++ printf ("gettimeofday: %lld sec %lld usec to 0x%x\n", ++ (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr); + mem_put_si (tvaddr, tv.tv_sec); + mem_put_si (tvaddr + 4, tv.tv_usec); + put_reg (1, rv); diff --git a/nixpkgs/pkgs/development/tools/misc/gdb/darwin-target-match.patch b/nixpkgs/pkgs/development/tools/misc/gdb/darwin-target-match.patch new file mode 100644 index 000000000000..978a67950569 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdb/darwin-target-match.patch @@ -0,0 +1,11 @@ +--- a/configure 2017-06-05 00:51:26.000000000 +0900 ++++ b/configure 2018-03-06 23:12:58.000000000 +0900 +@@ -3644,7 +3644,7 @@ + noconfigdirs="$noconfigdirs ld gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; +- x86_64-*-darwin[912]*) ++ x86_64-*-darwin*) + noconfigdirs="$noconfigdirs ld gas gprof" + noconfigdirs="$noconfigdirs sim target-rda" + ;; diff --git a/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch b/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch new file mode 100644 index 000000000000..7a3d78da077e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch @@ -0,0 +1,17 @@ +--- a/gdb/main.c ++++ b/gdb/main.c +@@ -708,8 +708,12 @@ captured_main_1 (struct captured_main_args *context) + if (gdb_sysroot.empty ()) + gdb_sysroot = TARGET_SYSROOT_PREFIX; + +- debug_file_directory +- = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE); ++ const char * nix_debug = getenv ("NIX_DEBUG_INFO_DIRS"); ++ if (nix_debug != NULL) ++ debug_file_directory = nix_debug; ++ else ++ debug_file_directory ++ = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE); + + gdb_datadir = relocate_gdb_directory (GDB_DATADIR, + GDB_DATADIR_RELOCATABLE); diff --git a/nixpkgs/pkgs/development/tools/misc/gdb/default.nix b/nixpkgs/pkgs/development/tools/misc/gdb/default.nix new file mode 100644 index 000000000000..93d61b638bea --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdb/default.nix @@ -0,0 +1,159 @@ +{ lib, stdenv, targetPackages + +# Build time +, fetchurl, fetchpatch, pkg-config, perl, texinfo, setupDebugInfoDirs, buildPackages + +# Run time +, ncurses, readline, gmp, mpfr, expat, libipt, zlib, zstd, dejagnu, sourceHighlight, libiconv + +, pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python3 ? null +, enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform elfutils, elfutils +, guile ? null +, hostCpuOnly ? false +, enableSim ? false +, safePaths ? [ + # $debugdir:$datadir/auto-load are whitelisted by default by GDB + "$debugdir" "$datadir/auto-load" + # targetPackages so we get the right libc when cross-compiling and using buildPackages.gdb + targetPackages.stdenv.cc.cc.lib + ] +, writeScript +}: + +let + basename = "gdb"; + targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) + "${stdenv.targetPlatform.config}-"; +in + +assert pythonSupport -> python3 != null; + +stdenv.mkDerivation rec { + pname = targetPrefix + basename + lib.optionalString hostCpuOnly "-host-cpu-only"; + version = "13.2"; + + src = fetchurl { + url = "mirror://gnu/gdb/${basename}-${version}.tar.xz"; + hash = "sha256-/Vvrt74YM6vbbgI8L0mKNUSYKB350FUj2JFbq+uJPwo="; + }; + + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace gdb/darwin-nat.c \ + --replace '#include "bfd/mach-o.h"' '#include "mach-o.h"' + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace sim/erc32/erc32.c --replace sys/fcntl.h fcntl.h + substituteInPlace sim/erc32/interf.c --replace sys/fcntl.h fcntl.h + substituteInPlace sim/erc32/sis.c --replace sys/fcntl.h fcntl.h + substituteInPlace sim/ppc/emul_unix.c --replace sys/termios.h termios.h + ''; + + patches = [ + ./debug-info-from-env.patch + ] ++ lib.optionals stdenv.isDarwin [ + ./darwin-target-match.patch + ]; + + nativeBuildInputs = [ pkg-config texinfo perl setupDebugInfoDirs ]; + + buildInputs = [ ncurses readline gmp mpfr expat libipt zlib zstd guile sourceHighlight ] + ++ lib.optional pythonSupport python3 + ++ lib.optional doCheck dejagnu + ++ lib.optional enableDebuginfod (elfutils.override { enableDebuginfod = true; }) + ++ lib.optional stdenv.isDarwin libiconv; + + propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + enableParallelBuilding = true; + + # darwin build fails with format hardening since v7.12 + hardeningDisable = lib.optionals stdenv.isDarwin [ "format" ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; + + configurePlatforms = [ "build" "host" "target" ]; + + preConfigure = '' + # remove precompiled docs, required for man gdbinit to mention /etc/gdb/gdbinit + rm gdb/doc/*.info* + rm gdb/doc/*.5 + rm gdb/doc/*.1 + # fix doc build https://sourceware.org/bugzilla/show_bug.cgi?id=27808 + rm gdb/doc/GDBvn.texi + + # GDB have to be built out of tree. + mkdir _build + cd _build + ''; + configureScript = "../configure"; + + configureFlags = with lib; [ + # Set the program prefix to the current targetPrefix. + # This ensures that the prefix always conforms to + # nixpkgs' expectations instead of relying on the build + # system which only receives `config` which is merely a + # subset of the platform description. + "--program-prefix=${targetPrefix}" + + "--disable-werror" + ] ++ lib.optional (!hostCpuOnly) "--enable-targets=all" ++ [ + "--enable-64-bit-bfd" + "--disable-install-libbfd" + "--disable-shared" "--enable-static" + "--with-system-zlib" + "--with-system-readline" + + "--with-system-gdbinit=/etc/gdb/gdbinit" + "--with-system-gdbinit-dir=/etc/gdb/gdbinit.d" + + "--with-gmp=${gmp.dev}" + "--with-mpfr=${mpfr.dev}" + "--with-expat" "--with-libexpat-prefix=${expat.dev}" + "--with-auto-load-safe-path=${builtins.concatStringsSep ":" safePaths}" + ] ++ lib.optional (!pythonSupport) "--without-python" + ++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls" + ++ lib.optional stdenv.hostPlatform.isStatic "--disable-inprocess-agent" + ++ lib.optional enableDebuginfod "--with-debuginfod=yes" + ++ lib.optional (!enableSim) "--disable-sim"; + + postInstall = + '' # Remove Info files already provided by Binutils and other packages. + rm -v $out/share/info/bfd.info + ''; + + # TODO: Investigate & fix the test failures. + doCheck = false; + + passthru = { + updateScript = writeScript "update-gdb" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre common-updater-scripts + + set -eu -o pipefail + + # Expect the text in format of '<h3>GDB version 12.1</h3>' + new_version="$(curl -s https://www.sourceware.org/gdb/ | + pcregrep -o1 '<h3>GDB version ([0-9.]+)</h3>')" + update-source-version ${pname} "$new_version" + ''; + }; + + meta = with lib; { + description = "The GNU Project debugger"; + + longDescription = '' + GDB, the GNU Project debugger, allows you to see what is going + on `inside' another program while it executes -- or what another + program was doing at the moment it crashed. + ''; + + homepage = "https://www.gnu.org/software/gdb/"; + + license = lib.licenses.gpl3Plus; + + # GDB upstream does not support ARM darwin + platforms = with platforms; linux ++ cygwin ++ ["x86_64-darwin"]; + maintainers = with maintainers; [ pierron globin lsix ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gdbgui/default.nix b/nixpkgs/pkgs/development/tools/misc/gdbgui/default.nix new file mode 100644 index 000000000000..523cd85efb6a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdbgui/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonApplication +, fetchPypi +, gdb +, eventlet +, flask-compress +, flask-socketio +, pygdbmi +, pygments +, }: + +buildPythonApplication rec { + pname = "gdbgui"; + + version = "0.15.1.0"; + + buildInputs = [ gdb ]; + propagatedBuildInputs = [ + eventlet + flask-compress + flask-socketio + pygdbmi + pygments + ]; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-YcD3om7N6yddm02It6/fjXDsVHG0Cs46fdGof0PMJXM="; + }; + + postPatch = '' + echo ${version} > gdbgui/VERSION.txt + # relax version requirements + sed -i 's/==.*$//' requirements.txt + ''; + + postInstall = '' + wrapProgram $out/bin/gdbgui \ + --prefix PATH : ${lib.makeBinPath [ gdb ]} + ''; + + # tests do not work without stdout/stdin + doCheck = false; + + meta = with lib; { + description = "A browser-based frontend for GDB"; + homepage = "https://www.gdbgui.com/"; + license = licenses.gpl3; + platforms = platforms.unix; + maintainers = with maintainers; [ yrashk dump_stack ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gede/default.nix b/nixpkgs/pkgs/development/tools/misc/gede/default.nix new file mode 100644 index 000000000000..12fe5b19a986 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gede/default.nix @@ -0,0 +1,35 @@ +{ mkDerivation, lib, fetchurl, makeWrapper, python3, qmake, ctags, gdb }: + +mkDerivation rec { + pname = "gede"; + version = "2.18.3"; + + src = fetchurl { + url = "http://gede.dexar.se/uploads/source/${pname}-${version}.tar.xz"; + sha256 = "sha256-RUl60iPa4XSlUilpYKaYQbRmLqthKHAvYonnhufjPsE="; + }; + + nativeBuildInputs = [ qmake makeWrapper python3 ]; + + buildInputs = [ ctags ]; + + strictDeps = true; + + dontUseQmakeConfigure = true; + + dontBuild = true; + + installPhase = '' + python build.py install --verbose --prefix="$out" + wrapProgram $out/bin/gede \ + --prefix PATH : ${lib.makeBinPath [ ctags gdb ]} + ''; + + meta = with lib; { + description = "Graphical frontend (GUI) to GDB"; + homepage = "http://gede.dexar.se"; + license = licenses.bsd2; + platforms = platforms.linux; + maintainers = with maintainers; [ juliendehos ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gef/default.nix b/nixpkgs/pkgs/development/tools/misc/gef/default.nix new file mode 100644 index 000000000000..1893d7ef0b2e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gef/default.nix @@ -0,0 +1,83 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, gdb +, python3 +, bintools-unwrapped +, file +, ps +, git +, coreutils +}: + +let + pythonPath = with python3.pkgs; makePythonPath [ + keystone-engine + unicorn + capstone + ropper + ]; + +in stdenv.mkDerivation rec { + pname = "gef"; + version = "2023.08"; + + src = fetchFromGitHub { + owner = "hugsy"; + repo = "gef"; + rev = version; + sha256 = "sha256-MqpII3jhSc6aP/WQDktom2wxAvCkxCwfs1AFWij5J7A="; + }; + + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/share/gef + cp gef.py $out/share/gef + makeWrapper ${gdb}/bin/gdb $out/bin/gef \ + --add-flags "-q -x $out/share/gef/gef.py" \ + --set NIX_PYTHONPATH ${pythonPath} \ + --prefix PATH : ${lib.makeBinPath [ + python3 + bintools-unwrapped # for readelf + file + ps + ]} + ''; + + nativeCheckInputs = [ + gdb + file + ps + git + python3 + python3.pkgs.pytest + python3.pkgs.pytest-xdist + python3.pkgs.keystone-engine + python3.pkgs.unicorn + python3.pkgs.capstone + python3.pkgs.ropper + ]; + checkPhase = '' + # Skip some tests that require network access. + sed -i '/def test_cmd_shellcode_get(self):/i \ \ \ \ @unittest.skip(reason="not available in sandbox")' tests/runtests.py + sed -i '/def test_cmd_shellcode_search(self):/i \ \ \ \ @unittest.skip(reason="not available in sandbox")' tests/runtests.py + + # Patch the path to /bin/ls. + sed -i 's+/bin/ls+${coreutils}/bin/ls+g' tests/runtests.py + + # Run the tests. + make test + ''; + + meta = with lib; { + description = "A modern experience for GDB with advanced debugging features for exploit developers & reverse engineers"; + homepage = "https://github.com/hugsy/gef"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ freax13 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gengetopt/default.nix b/nixpkgs/pkgs/development/tools/misc/gengetopt/default.nix new file mode 100644 index 000000000000..d24d4b66d66c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gengetopt/default.nix @@ -0,0 +1,46 @@ +{ fetchurl, lib, stdenv, texinfo, help2man }: + +stdenv.mkDerivation rec { + pname = "gengetopt"; + version = "2.23"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; + sha256 = "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr"; + }; + + doCheck = true; + # attempts to open non-existent file + preCheck = '' + rm tests/test_conf_parser_save.sh + ''; + + # test suite is not thread safe + enableParallelBuilding = false; + + nativeBuildInputs = [ texinfo help2man ]; + + #Fix, see #28255 + postPatch = '' + substituteInPlace configure --replace \ + 'set -o posix' \ + 'set +o posix' + ''; + + meta = { + description = "Command-line option parser generator"; + + longDescription = + '' GNU Gengetopt program generates a C function that uses getopt_long + function to parse the command line options, to validate them and + fills a struct + ''; + + homepage = "https://www.gnu.org/software/gengetopt/"; + + license = lib.licenses.gpl3Plus; + + maintainers = [ ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gf/build-use-optional-freetype-with-pkg-config.patch b/nixpkgs/pkgs/development/tools/misc/gf/build-use-optional-freetype-with-pkg-config.patch new file mode 100644 index 000000000000..7e748dca244e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gf/build-use-optional-freetype-with-pkg-config.patch @@ -0,0 +1,13 @@ +diff --git a/build.sh b/build.sh +index e471563..32bdfab 100755 +--- a/build.sh ++++ b/build.sh +@@ -5,7 +5,7 @@ gdb --version > /dev/null 2>&1 || printf "\033[0;31mWarning\033[0m: GDB not dete + echo q | gdb | grep "(gdb)" > /dev/null 2>&1 || printf "\033[0;31mWarning\033[0m: Your copy of GDB appears to be non-standard or has been heavily reconfigured with .gdbinit.\nIf you are using GDB plugins like 'GDB Dashboard' you must remove them,\nas otherwise gf will be unable to communicate with GDB.\n" + + # Check if FreeType is available. +-if [ -d /usr/include/freetype2 ]; then extra_flags="$extra_flags -lfreetype -D UI_FREETYPE -I /usr/include/freetype2"; ++if pkg-config --cflags freetype2 > /dev/null; then extra_flags="$extra_flags -D UI_FREETYPE $(pkg-config --cflags --libs freetype2)"; + else printf "\033[0;31mWarning\033[0m: FreeType could not be found. The fallback font will be used.\n"; fi + + # Check if SSE2 is available. diff --git a/nixpkgs/pkgs/development/tools/misc/gf/default.nix b/nixpkgs/pkgs/development/tools/misc/gf/default.nix new file mode 100644 index 000000000000..47b20cfe92e5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gf/default.nix @@ -0,0 +1,65 @@ +{ lib +, stdenv +, makeWrapper +, fetchFromGitHub +, libX11 +, pkg-config +, gdb +, freetype +, freetypeSupport ? true +, extensions ? [ ] +}: + +stdenv.mkDerivation { + pname = "gf"; + version = "unstable-2023-08-09"; + + src = fetchFromGitHub { + repo = "gf"; + owner = "nakst"; + rev = "4190211d63c1e5378a9e841d22fa2b96a1099e68"; + hash = "sha256-28Xgw/KxwZ94r/TXsdISeUtXHSips4irB0D+tEefMYE="; + }; + + nativeBuildInputs = [ makeWrapper pkg-config ]; + buildInputs = [ libX11 gdb ] + ++ lib.optional freetypeSupport freetype; + + patches = [ + ./build-use-optional-freetype-with-pkg-config.patch + ]; + + postPatch = lib.forEach extensions (ext: '' + cp ${ext} ./${ext.name or (builtins.baseNameOf ext)} + ''); + + preConfigure = '' + patchShebangs build.sh + ''; + + buildPhase = '' + runHook preBuild + extra_flags=-DUI_FREETYPE_SUBPIXEL ./build.sh + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p "$out/bin" + cp gf2 "$out/bin/" + runHook postInstall + ''; + + postFixup = '' + wrapProgram $out/bin/gf2 --prefix PATH : ${lib.makeBinPath[ gdb ]} + ''; + + meta = with lib; { + description = "A GDB Frontend"; + homepage = "https://github.com/nakst/gf"; + license = licenses.mit; + platforms = platforms.linux; + mainProgram = "gf2"; + maintainers = with maintainers; [ _0xd61 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/global/default.nix b/nixpkgs/pkgs/development/tools/misc/global/default.nix new file mode 100644 index 000000000000..ed0596fef8a0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/global/default.nix @@ -0,0 +1,62 @@ +{ fetchurl, lib, stdenv, libtool, makeWrapper +, coreutils, ctags, ncurses, python3Packages, sqlite, universal-ctags +}: + +let + pygments = python3Packages.pygments; +in stdenv.mkDerivation rec { + pname = "global"; + version = "6.6.10"; + + src = fetchurl { + url = "mirror://gnu/global/${pname}-${version}.tar.gz"; + hash = "sha256-LdHmqUXpPAE5D7lBpOaU9McbvXVp1kFJwE6Se79NzOg="; + }; + + nativeBuildInputs = [ libtool makeWrapper ]; + + buildInputs = [ ncurses sqlite ]; + + propagatedBuildInputs = [ pygments ]; + + configureFlags = [ + "--with-ltdl-include=${libtool}/include" + "--with-ltdl-lib=${libtool.lib}/lib" + "--with-ncurses=${ncurses}" + "--with-sqlite3" + "--with-exuberant-ctags=${ctags}/bin/ctags" + "--with-universal-ctags=${universal-ctags}/bin/ctags" + "--with-posix-sort=${coreutils}/bin/sort" + ]; + + doCheck = true; + + postInstall = '' + mkdir -p "$out/share/emacs/site-lisp" + cp -v *.el "$out/share/emacs/site-lisp" + + wrapProgram $out/bin/gtags \ + --prefix PYTHONPATH : "$(toPythonPath ${pygments})" + wrapProgram $out/bin/global \ + --prefix PYTHONPATH : "$(toPythonPath ${pygments})" + ''; + + meta = with lib; { + description = "Source code tag system"; + longDescription = '' + GNU GLOBAL is a source code tagging system that works the same way + across diverse environments (Emacs, vi, less, Bash, web browser, etc). + You can locate specified objects in source files and move there easily. + It is useful for hacking a large project containing many + subdirectories, many #ifdef and many main() functions. It is similar + to ctags or etags but is different from them at the point of + independence of any editor. It runs on a UNIX (POSIX) compatible + operating system like GNU and BSD. + ''; + homepage = "https://www.gnu.org/software/global/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ pSub peterhoeg ]; + platforms = platforms.unix; + changelog = "https://cvs.savannah.gnu.org/viewvc/global/global/NEWS?view=markup&pathrev=VERSION-${lib.replaceStrings [ "." ] [ "_" ] version}"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gnum4/default.nix b/nixpkgs/pkgs/development/tools/misc/gnum4/default.nix new file mode 100644 index 000000000000..66de4ebf8b02 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gnum4/default.nix @@ -0,0 +1,57 @@ +{ lib, stdenv, fetchurl }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "gnum4"; + version = "1.4.19"; + + src = fetchurl { + url = "mirror://gnu/m4/m4-${version}.tar.bz2"; + sha256 = "sha256-swapHA/ZO8QoDPwumMt6s5gf91oYe+oyk4EfRSyJqMg="; + }; + + # https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/m4/m4-1.4.19-r1.ebuild + patches = lib.optional stdenv.hostPlatform.isLoongArch64 ./loong-fix-build.patch; + postPatch = if stdenv.hostPlatform.isLoongArch64 then '' + touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die + find . -name Makefile.in -exec touch {} + || die + '' else null; + + strictDeps = true; + enableParallelBuilding = true; + + doCheck = false; + + configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ] + ++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; + + meta = { + description = "GNU M4, a macro processor"; + longDescription = '' + GNU M4 is an implementation of the traditional Unix macro + processor. It is mostly SVR4 compatible although it has some + extensions (for example, handling more than 9 positional + parameters to macros). GNU M4 also has built-in functions for + including files, running shell commands, doing arithmetic, etc. + + GNU M4 is a macro processor in the sense that it copies its + input to the output expanding macros as it goes. Macros are + either builtin or user-defined and can take any number of + arguments. Besides just doing macro expansion, m4 has builtin + functions for including named files, running UNIX commands, + doing integer arithmetic, manipulating text in various ways, + recursion etc... m4 can be used either as a front-end to a + compiler or as a macro processor in its own right. + ''; + homepage = "https://www.gnu.org/software/m4/"; + + license = lib.licenses.gpl3Plus; + mainProgram = "m4"; + platforms = lib.platforms.unix ++ lib.platforms.windows; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/gnum4/loong-fix-build.patch b/nixpkgs/pkgs/development/tools/misc/gnum4/loong-fix-build.patch new file mode 100644 index 000000000000..d5243357928b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gnum4/loong-fix-build.patch @@ -0,0 +1,30 @@ +[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with line number tweak, and change to generated file added as well.] +From: Sun Haiyong <youbest@sina.com> +Date: Tue, 31 Aug 2021 11:11:52 +0800 +Subject: [PATCH] stack-direction: Add support for loongarch CPU + +* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch, +set "sv_cv_stack_direction" to "-1" . +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -31,6 +31,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +--- a/configure ++++ b/configure +@@ -46399,6 +46399,7 @@ else $as_nop + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +-- +2.17.2 + diff --git a/nixpkgs/pkgs/development/tools/misc/go-license-detector/default.nix b/nixpkgs/pkgs/development/tools/misc/go-license-detector/default.nix new file mode 100644 index 000000000000..cbef7ae0d9da --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/go-license-detector/default.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule, fetchFromGitHub, git }: + +buildGoModule rec { + pname = "go-license-detector"; + version = "4.3.1"; + + src = fetchFromGitHub { + owner = "go-enry"; + repo = pname; + rev = "v${version}"; + hash = "sha256-S9LKXjn5dL5FETOOAk+bs7bIVdu2x7MIhfjpZuXzuLo="; + }; + + vendorHash = "sha256-MtQsUsFd9zQGbP7NGZ4zcSoa6O2WSWvGig0GUwCc6uM="; + + nativeCheckInputs = [ git ]; + + meta = with lib; { + description = "Reliable project licenses detector"; + homepage = "https://github.com/go-enry/go-license-detector"; + license = licenses.asl20; + maintainers = with maintainers; [ dtzWill ]; + mainProgram = "license-detector"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/go-licenses/default.nix b/nixpkgs/pkgs/development/tools/misc/go-licenses/default.nix new file mode 100644 index 000000000000..c9bc25973a4e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/go-licenses/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: + +buildGoModule rec { + pname = "go-licenses"; + version = "1.6.0"; + + src = fetchFromGitHub { + owner = "google"; + repo = "go-licenses"; + rev = "refs/tags/v${version}"; + hash = "sha256-GAlwTVoVA+n9+EfhybmpKm16FoY9kFzrxy1ZQxS6A8E="; + }; + + vendorHash = "sha256-ToRn2wj7Yi+UDJwvAhV0ACEhqlcQjt4bRpz7abNRt9A="; + + patches = [ + # Without this, we get error messages like: + # vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) + # The patch was generated by changing "go 1.16" to "go 1.17" and executing `go mod tidy`. + ./fix-go-version-error.patch + ]; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installShellCompletion --cmd go-licenses \ + --bash <("$out/bin/go-licenses" completion bash) \ + --fish <("$out/bin/go-licenses" completion fish) \ + --zsh <("$out/bin/go-licenses" completion zsh) + ''; + + # Tests require internet connection + doCheck = false; + + meta = with lib; { + changelog = "https://github.com/google/go-licenses/releases/tag/v${version}"; + description = "Reports on the licenses used by a Go package and its dependencies"; + homepage = "https://github.com/google/go-licenses"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ Luflosi ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/go-licenses/fix-go-version-error.patch b/nixpkgs/pkgs/development/tools/misc/go-licenses/fix-go-version-error.patch new file mode 100644 index 000000000000..1e102636dd45 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/go-licenses/fix-go-version-error.patch @@ -0,0 +1,65 @@ +diff --git a/go.mod b/go.mod +index 7e3d596..d90b393 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,27 +1,50 @@ + module github.com/google/go-licenses + +-go 1.16 ++go 1.17 + + require ( +- cloud.google.com/go/iam v0.4.0 // indirect +- github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/go-cmp v0.5.8 + github.com/google/go-replayers/httpreplay v1.1.1 + github.com/google/licenseclassifier v0.0.0-20210722185704-3043a050f148 +- github.com/kr/text v0.2.0 // indirect +- github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/otiai10/copy v1.6.0 +- github.com/pkg/errors v0.9.1 // indirect +- github.com/sergi/go-diff v1.2.0 // indirect + github.com/spf13/cobra v1.6.0 +- github.com/stretchr/testify v1.8.0 // indirect + go.opencensus.io v0.23.0 +- golang.org/x/crypto v0.1.0 // indirect + golang.org/x/mod v0.7.0 + golang.org/x/net v0.5.0 + golang.org/x/text v0.6.0 + golang.org/x/tools v0.5.0 +- gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/src-d/go-git.v4 v4.13.1 + k8s.io/klog/v2 v2.80.1 + ) ++ ++require ( ++ cloud.google.com/go v0.102.1 // indirect ++ cloud.google.com/go/iam v0.4.0 // indirect ++ cloud.google.com/go/storage v1.22.1 // indirect ++ github.com/emirpasic/gods v1.12.0 // indirect ++ github.com/go-logr/logr v1.2.0 // indirect ++ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect ++ github.com/google/martian/v3 v3.3.2 // indirect ++ github.com/inconshreveable/mousetrap v1.0.1 // indirect ++ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect ++ github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect ++ github.com/kr/text v0.2.0 // indirect ++ github.com/mitchellh/go-homedir v1.1.0 // indirect ++ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect ++ github.com/pkg/errors v0.9.1 // indirect ++ github.com/sergi/go-diff v1.2.0 // indirect ++ github.com/spf13/pflag v1.0.5 // indirect ++ github.com/src-d/gcfg v1.4.0 // indirect ++ github.com/stretchr/testify v1.8.0 // indirect ++ github.com/xanzy/ssh-agent v0.2.1 // indirect ++ golang.org/x/crypto v0.1.0 // indirect ++ golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect ++ golang.org/x/sys v0.4.0 // indirect ++ google.golang.org/api v0.93.0 // indirect ++ google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 // indirect ++ google.golang.org/grpc v1.48.0 // indirect ++ google.golang.org/protobuf v1.28.1 // indirect ++ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect ++ gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect ++ gopkg.in/warnings.v0 v0.1.2 // indirect ++) diff --git a/nixpkgs/pkgs/development/tools/misc/go-md2man/default.nix b/nixpkgs/pkgs/development/tools/misc/go-md2man/default.nix new file mode 100644 index 000000000000..e569009f273d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/go-md2man/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "go-md2man"; + version = "2.0.3"; + + vendorHash = null; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "cpuguy83"; + repo = "go-md2man"; + sha256 = "sha256-bgAuN+pF9JekCQ/Eg4ph3WDv3RP8MB/10GDp1JMp9Kg="; + }; + + meta = with lib; { + description = "Go tool to convert markdown to man pages"; + license = licenses.mit; + homepage = "https://github.com/cpuguy83/go-md2man"; + maintainers = with maintainers; [offline]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gob2/default.nix b/nixpkgs/pkgs/development/tools/misc/gob2/default.nix new file mode 100644 index 000000000000..06487845fb3d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gob2/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, pkg-config, glib, bison, flex, gnome }: + +stdenv.mkDerivation rec { + pname = "gob2"; + version = "2.0.20"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "5fe5d7990fd65b0d4b617ba894408ebaa6df453f2781c15a1cfdf2956c0c5428"; + }; + + # configure script looks for d-bus but it is only needed for tests + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ glib bison flex ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + versionPolicy = "none"; + }; + }; + + meta = { + description = "Preprocessor for making GObjects with inline C code"; + homepage = "https://www.jirka.org/gob.html"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gopatch/default.nix b/nixpkgs/pkgs/development/tools/misc/gopatch/default.nix new file mode 100644 index 000000000000..162f60cb30c1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gopatch/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, gopatch +}: + +buildGoModule rec { + pname = "gopatch"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "uber-go"; + repo = "gopatch"; + rev = "v${version}"; + hash = "sha256-iiVp/Aa4usShTQD/15zYk7/WQoQL/ZxVDPWYoi3JLW4="; + }; + + vendorHash = "sha256-Pm5RNOx54IW7L9atfVTiMkvvzFt7yjqnYu99YiWFhPA="; + + subPackages = [ + "." + ]; + + ldflags = [ + "-s" + "-w" + "-X=main._version=${version}" + ]; + + passthru.tests = { + version = testers.testVersion { + package = gopatch; + }; + }; + + meta = with lib; { + description = "Refactoring and code transformation tool for Go"; + homepage = "https://github.com/uber-go/gopatch"; + changelog = "https://github.com/uber-go/gopatch/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gperf/3.0.x.nix b/nixpkgs/pkgs/development/tools/misc/gperf/3.0.x.nix new file mode 100644 index 000000000000..8a2fdf6ec4b3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gperf/3.0.x.nix @@ -0,0 +1,47 @@ +{ lib, stdenv, fetchurl, autoreconfHook }: + +stdenv.mkDerivation rec { + pname = "gperf"; + version = "3.0.4"; + + src = fetchurl { + url = "mirror://gnu/gperf/gperf-${version}.tar.gz"; + sha256 = "0gnnm8iqcl52m8iha3sxrzrl9mcyhg7lfrhhqgdn4zj00ji14wbn"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + patches = [ + ./gperf-ar-fix.patch + # Clang 16 defaults to C++17, which does not allow `register` as a storage class specifier. + ./gperf-c++17-register-fix.patch + ]; + + # Replace the conditional inclusion of `string.h` on VMS with unconditional inclusion on all + # platforms. Otherwise, clang 16 fails to build gperf due to use of undeclared library functions. + postPatch = '' + sed '/#ifdef VMS/{N;N;N;N;N;s/.*/#include <string.h>/}' -i lib/getopt.c + ''; + + meta = { + description = "Perfect hash function generator"; + + longDescription = '' + GNU gperf is a perfect hash function generator. For a given + list of strings, it produces a hash function and hash table, in + form of C or C++ code, for looking up a value depending on the + input string. The hash function is perfect, which means that + the hash table has no collisions, and the hash table lookup + needs a single string comparison only. + + GNU gperf is highly customizable. There are options for + generating C or C++ code, for emitting switch statements or + nested ifs instead of a hash table, and for tuning the algorithm + employed by gperf. + ''; + + license = lib.licenses.gpl3Plus; + + homepage = "https://www.gnu.org/software/gperf/"; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gperf/default.nix b/nixpkgs/pkgs/development/tools/misc/gperf/default.nix new file mode 100644 index 000000000000..c6b6e89495c0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gperf/default.nix @@ -0,0 +1,41 @@ +{lib, stdenv, fetchurl}: + +stdenv.mkDerivation rec { + pname = "gperf"; + version = "3.1"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1qispg6i508rq8pkajh26cznwimbnj06wq9sd85vg95v8nwld1aq"; + }; + + patches = [ + # Clang 16 defaults to C++17, which does not allow `register` as a storage class specifier. + ./gperf-c++17-register-fix.patch + ]; + + enableParallelBuilding = true; + + meta = { + description = "Perfect hash function generator"; + + longDescription = '' + GNU gperf is a perfect hash function generator. For a given + list of strings, it produces a hash function and hash table, in + form of C or C++ code, for looking up a value depending on the + input string. The hash function is perfect, which means that + the hash table has no collisions, and the hash table lookup + needs a single string comparison only. + + GNU gperf is highly customizable. There are options for + generating C or C++ code, for emitting switch statements or + nested ifs instead of a hash table, and for tuning the algorithm + employed by gperf. + ''; + + license = lib.licenses.gpl3Plus; + + homepage = "https://www.gnu.org/software/gperf/"; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gperf/gperf-ar-fix.patch b/nixpkgs/pkgs/development/tools/misc/gperf/gperf-ar-fix.patch new file mode 100644 index 000000000000..942d726d76ea --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gperf/gperf-ar-fix.patch @@ -0,0 +1,46 @@ +--- gperf-3.0.4/lib/configure.ac 2009-01-15 02:24:31.000000000 +0200 ++++ gperf-3.0.4.patched/lib/configure.ac 2018-11-29 06:37:20.968627533 +0300 +@@ -21,10 +21,12 @@ + + AC_PREREQ([2.60]) + AC_INIT([hash.cc]) ++m4_include([../aclocal.m4]) + AC_PROG_MAKE_SET + dnl + dnl checks for programs + dnl ++AC_SUBST([AR]) + AC_PROG_CC + dnl sets variable CC + AC_PROG_CPP +--- gperf-3.0.4/lib/Makefile.in 2008-08-23 21:52:48.000000000 +0300 ++++ gperf-3.0.4.patched/lib/Makefile.in 2018-11-29 06:36:43.161998888 +0300 +@@ -41,7 +41,7 @@ + # Both C and C++ compiler + OBJEXT = @OBJEXT@ + # Other +-AR = ar ++AR = @AR@ + AR_FLAGS = rc + RANLIB = @RANLIB@ + MV = mv +--- gperf-3.0.4/doc/configure.ac 2009-01-15 02:24:31.000000000 +0200 ++++ gperf-3.0.4.patched/doc/configure.ac 2018-11-29 06:36:00.961288421 +0300 +@@ -21,6 +21,7 @@ + + AC_PREREQ([2.60]) + AC_INIT([gperf.1]) ++m4_include([../aclocal.m4]) + PACKAGE=gperf + AC_SUBST([PACKAGE]) + AC_PROG_MAKE_SET +--- gperf-3.0.4/src/configure.ac 2009-01-15 02:24:30.000000000 +0200 ++++ gperf-3.0.4.patched/src/configure.ac 2018-11-29 06:34:21.718576658 +0300 +@@ -21,6 +21,7 @@ + + AC_PREREQ([2.60]) + AC_INIT([main.cc]) ++m4_include([../aclocal.m4]) + AC_CONFIG_HEADER([config.h]) + AC_PROG_MAKE_SET + dnl diff --git a/nixpkgs/pkgs/development/tools/misc/gperf/gperf-c++17-register-fix.patch b/nixpkgs/pkgs/development/tools/misc/gperf/gperf-c++17-register-fix.patch new file mode 100644 index 000000000000..bb8c414a1a26 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gperf/gperf-c++17-register-fix.patch @@ -0,0 +1,13 @@ +diff --git a/lib/getline.cc b/lib/getline.cc +index c57c633..0984a7c 100644 +--- a/lib/getline.cc ++++ b/lib/getline.cc +@@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset) + + for (;;) + { +- register int c = getc (stream); ++ int c = getc (stream); + + /* We always want at least one char left in the buffer, since we + always (unless we get an error while reading the first char) diff --git a/nixpkgs/pkgs/development/tools/misc/gpuvis/default.nix b/nixpkgs/pkgs/development/tools/misc/gpuvis/default.nix new file mode 100644 index 000000000000..83c04495f8cc --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gpuvis/default.nix @@ -0,0 +1,41 @@ +{ fetchFromGitHub +, freetype +, gtk3 +, lib +, meson +, ninja +, pkg-config +, SDL2 +, stdenv +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "gpuvis"; + version = "20211204"; + + src = fetchFromGitHub { + owner = "mikesart"; + repo = pname; + rev = "7f47419470687c7ecbdf086b81f5bafdb05d1bef"; + sha256 = "sha256-29Bv+y0zWzn7QtpsjRV6hr19bCeyVJusPcYiAIEIluk="; + }; + + # patch dlopen path for gtk3 + postPatch = '' + substituteInPlace src/hook_gtk3.h \ + --replace "libgtk-3.so" "${lib.getLib gtk3}/lib/libgtk-3.so" + ''; + + nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook ]; + + buildInputs = [ SDL2 gtk3 freetype ]; + + meta = with lib; { + description = "GPU Trace Visualizer"; + homepage = "https://github.com/mikesart/gpuvis"; + license = licenses.mit; + maintainers = with maintainers; [ emantor ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/grcov/default.nix b/nixpkgs/pkgs/development/tools/misc/grcov/default.nix new file mode 100644 index 000000000000..c40fea7f397e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/grcov/default.nix @@ -0,0 +1,38 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "grcov"; + version = "0.8.19"; + + src = fetchFromGitHub { + owner = "mozilla"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-1t+hzB9sSApLScCkjBnLk9i2dsoEwZmWCFukEOvHhZI="; + }; + + cargoHash = "sha256-4KzFbfUqnGmle2fwSaHMPIJHQFDq8H2Qzm4FdYdqpuM="; + + # tests do not find grcov path correctly + checkFlags = let + skipList = [ + "test_coveralls_service_job_id_is_not_sufficient" + "test_coveralls_service_name_is_not_sufficient" + "test_coveralls_works_with_just_service_name_and_job_id_args" + "test_coveralls_works_with_just_token_arg" + "test_integration" + "test_integration_guess_single_file" + "test_integration_zip_dir" + "test_integration_zip_zip" + ]; + skipFlag = test: "--skip " + test; + in builtins.concatStringsSep " " (builtins.map skipFlag skipList); + + meta = with lib; { + description = + "Rust tool to collect and aggregate code coverage data for multiple source files"; + homepage = "https://github.com/mozilla/grcov"; + license = licenses.mpl20; + maintainers = with maintainers; [ DieracDelta ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/grpc-client-cli/default.nix b/nixpkgs/pkgs/development/tools/misc/grpc-client-cli/default.nix new file mode 100644 index 000000000000..9a8384c01f1c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/grpc-client-cli/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "grpc-client-cli"; + version = "1.19.0"; + + src = fetchFromGitHub { + owner = "vadimi"; + repo = "grpc-client-cli"; + rev = "v${version}"; + sha256 = "sha256-cSQDQlc8LgKc9wfJIzXcuaC2GJf46wSwYnmIwMo5ra0="; + }; + + vendorHash = "sha256-laAqRfu1PIheoGksiM3aZHUdmLpDGsTGBmoenh7Yh9w="; + + meta = with lib; { + description = "generic gRPC command line client"; + maintainers = with maintainers; [ Philipp-M ]; + homepage = "https://github.com/vadimi/grpc-client-cli"; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/grpc-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/grpc-tools/default.nix new file mode 100644 index 000000000000..5c21f8a0f415 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/grpc-tools/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, cmake +, fetchFromGitHub +, gitUpdater +}: + +stdenv.mkDerivation rec { + pname = "grpc-tools"; + version = "1.12.4"; + + src = fetchFromGitHub { + owner = "grpc"; + repo = "grpc-node"; + rev = "grpc-tools@${version}"; + hash = "sha256-708lBIGW5+vvSTrZHl/kc+ck7JKNXElrghIGDrMSyx8="; + fetchSubmodules = true; + }; + + sourceRoot = "${src.name}/packages/grpc-tools"; + + nativeBuildInputs = [ cmake ]; + + installPhase = '' + install -Dm755 -t $out/bin grpc_node_plugin + install -Dm755 -t $out/bin deps/protobuf/protoc + ''; + + passthru.updateScript = gitUpdater { + url = "https://github.com/grpc/grpc-node.git"; + rev-prefix = "grpc-tools@"; + }; + + meta = with lib; { + description = "Distribution of protoc and the gRPC Node protoc plugin for ease of installation with npm"; + longDescription = '' + This package distributes the Protocol Buffers compiler protoc along with + the plugin for generating client and service objects for use with the Node + gRPC libraries. + ''; + homepage = "https://github.com/grpc/grpc-node/tree/master/packages/grpc-tools"; + license = licenses.asl20; + platforms = platforms.all; + maintainers = [ maintainers.nzhang-zh ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gtkdialog/default.nix b/nixpkgs/pkgs/development/tools/misc/gtkdialog/default.nix new file mode 100644 index 000000000000..995a6bb9cdb9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gtkdialog/default.nix @@ -0,0 +1,30 @@ +{lib, stdenv, fetchurl, fetchpatch, gtk2, pkg-config }: + +stdenv.mkDerivation rec { + pname = "gtkdialog"; + version = "0.8.3"; + + src = fetchurl { + url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${pname}/${pname}-${version}.tar.gz"; + sha256 = "ff89d2d7f1e6488e5df5f895716ac1d4198c2467a2a5dc1f51ab408a2faec38e"; + }; + patches = [ + # Pull Gentoo patch for -fno-common toolchain fix. + (fetchpatch { + name = "fno-common.patch"; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/x11-misc/gtkdialog/files/gtkdialog-0.8.3-fno-common.patch?id=98692e4c4ad494b88c4902ca1ab3e6541190bbe8"; + sha256 = "1mh01krzpfy7lbbqx3xm71xsiqqgg67w4snv794wspfqkk2hicvz"; + }) + ]; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gtk2 ]; + + meta = { + homepage = "https://code.google.com/archive/p/gtkdialog/"; + # community links: http://murga-linux.com/puppy/viewtopic.php?t=111923 -> https://github.com/01micko/gtkdialog + description = "Small utility for fast and easy GUI building from many scripted and compiled languages"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/gtkperf/bench.patch b/nixpkgs/pkgs/development/tools/misc/gtkperf/bench.patch new file mode 100644 index 000000000000..3d00a03e9a58 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gtkperf/bench.patch @@ -0,0 +1,60 @@ +--- gtkperf/src/callbacks.c 2005-10-30 11:33:42.000000000 +0000 ++++ gtkperf-patched/src/callbacks.c 2008-05-23 23:41:17.000000000 +0100 +@@ -219,6 +219,13 @@ + } + + ++void ++on_cmdline_test(char *optarg) ++{ ++ appdata->test_type = atoi(optarg); ++} ++ ++ + /* Initialize appdata */ + void + setup_appdata(AppData * appdata_in) +@@ -398,7 +405,7 @@ + appdata->pixbuf_drawing = gdk_pixbuf_new_from_file (filename, NULL); + + gtk_combo_box_set_active (GTK_COMBO_BOX (appdata->combobox_testtype), +- 0); ++ appdata->test_type); + + /* create end mark to info textview */ + GtkTextIter iter; +--- gtkperf/src/callbacks.h 2005-10-30 10:21:23.000000000 +0000 ++++ gtkperf-patched/src/callbacks.h 2008-05-23 23:22:30.000000000 +0100 +@@ -13,6 +13,7 @@ + void on_cmdline_run_all (); + void on_cmdline_help () ; + void on_cmdline_count (char *optarg) ; ++void on_cmdline_test (char *optarg) ; + void on_window_main_show (AppData * data); + + gboolean +--- gtkperf/src/main.c 2005-10-30 11:26:42.000000000 +0000 ++++ gtkperf-patched/src/main.c 2008-05-23 23:44:02.000000000 +0100 +@@ -65,9 +65,10 @@ + {"help", 0, 0, 0}, + {"automatic", 0, 0, 0}, + {"count", 1, 0, 0}, ++ {"test", 1, 0, 0}, + {0, 0, 0, 0} + }; +- c = getopt_long (argc, argv, "hac:", ++ c = getopt_long (argc, argv, "hac:t:", + long_options, &option_index); + if (c == -1) + break; +@@ -104,6 +105,10 @@ + on_cmdline_count(optarg); + break; + ++ case 't': ++ on_cmdline_test(optarg); ++ break; ++ + default: + case 'h': + on_cmdline_help (); diff --git a/nixpkgs/pkgs/development/tools/misc/gtkperf/default.nix b/nixpkgs/pkgs/development/tools/misc/gtkperf/default.nix new file mode 100644 index 000000000000..c977ca3070e4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gtkperf/default.nix @@ -0,0 +1,25 @@ +{ lib, stdenv, fetchurl, gtk2, pkg-config, libintl }: + +stdenv.mkDerivation rec { + pname = "gtkperf"; + version = "0.40.0"; + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}_${lib.versions.majorMinor version}.tar.gz"; + sha256 = "0yxj3ap3yfi76vqg6xjvgc16nfi9arm9kp87s35ywf10fd73814p"; + }; + + hardeningDisable = [ "format" ]; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gtk2 libintl ]; + + # https://openbenchmarking.org/innhold/7e9780c11550d09aa67bdba71248facbe2d781db + patches = [ ./bench.patch ]; + + meta = with lib; { + description = "Application designed to test GTK performance"; + homepage = "https://gtkperf.sourceforge.net/"; + license = with licenses; [ gpl2 ]; + maintainers = with maintainers; [ dtzWill ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/help2man/1.40.4-cygwin-nls.patch b/nixpkgs/pkgs/development/tools/misc/help2man/1.40.4-cygwin-nls.patch new file mode 100644 index 000000000000..82f8cf1cb37b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/help2man/1.40.4-cygwin-nls.patch @@ -0,0 +1,165 @@ +LD_PRELOAD by itself only works with Cygwin builtin functions, but +textdomain() and friends come from libintl. In order to override +those functions, we have to "replace" cygintl-?.dll since functions are +bound to a DLL name at link time. Our replacement will be used since +it is loaded first by LD_PRELOAD. + +But as we are making this *the* libintl, we need to provide +pass-throughs for the other functions which we're not overriding, +otherwise Locale::gettext won't load (not to mention the program +that we're trying to help2man). + +--- help2man-1.46.5/Makefile.in 2014-10-09 13:03:01.000000000 +0200 ++++ help2man-1.46.5/Makefile.in 2015-05-12 14:46:52.995521900 +0200 +@@ -76,7 +76,8 @@ + fi + + install_preload: install_dirs preload +- $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(pkglibdir) ++ $(INSTALL_PROGRAM) lib/cygintl-9.dll $(DESTDIR)$(pkglibdir) ++ ln -sf cygintl-9.dll $(DESTDIR)$(pkglibdir)/$(preload).so + + install_l10n: install_dirs msg_l10n man_l10n info_l10n + set -e; \ +@@ -144,7 +146,9 @@ + + preload: $(preload).so + $(preload).so: $(srcdir)/$(preload).c +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS) ++ mkdir -p lib ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-9.dll -shared $? $(LIBS) ++ ln -sf lib/cygintl-9.dll $@ + + man: $(target).1 + $(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL +--- help2man-1.46.5/bindtextdomain.c 2009-11-13 00:01:34.000000000 -0600 ++++ help2man-1.46.5/bindtextdomain.c 2011-12-29 00:24:33.608078600 -0600 +@@ -27,12 +27,34 @@ static char *(*r_textdomain)(char const + static char *(*r_bindtextdomain)(char const *, char const *) = 0; + static char *(*r_bind_textdomain_codeset)(char const *, char const *) = 0; + ++#ifdef __CYGWIN__ ++static void *RTLD_NEXT = 0; ++static char *(*r_gettext)(const char *) = 0; ++static char *(*r_dgettext)(const char *, const char *) = 0; ++static char *(*r_dcgettext)(const char *, const char *, int) = 0; ++static char *(*r_ngettext)(const char *, const char *, unsigned long int) = 0; ++static char *(*r_dngettext)(const char *, const char *, const char *, ++ unsigned long int) = 0; ++static char *(*r_dcngettext)(const char *, const char *, const char *, ++ unsigned long int, int) = 0; ++static char *(*r_setlocale)(int, const char *) = 0; ++ ++#define SYM(sym) libintl_ ## sym ++#else ++#define SYM(sym) sym ++#endif ++ + void setup() + { + static int done = 0; + if (done++) + return; + ++#ifdef __CYGWIN__ ++ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-9.dll", RTLD_LAZY))) ++ die("libintl8 not found"); ++#endif ++ + if (!(e_textdomain = getenv("TEXTDOMAIN"))) + die("TEXTDOMAIN not set"); + +@@ -48,9 +70,19 @@ void setup() + if (!(r_bind_textdomain_codeset = dlsym(RTLD_NEXT, + "bind_textdomain_codeset"))) + die("can't find symbol \"bind_textdomain_codeset\""); ++ ++#ifdef __CYGWIN__ ++ r_gettext = dlsym(RTLD_NEXT, "libintl_gettext"); ++ r_dgettext = dlsym(RTLD_NEXT, "libintl_dgettext"); ++ r_dcgettext = dlsym(RTLD_NEXT, "libintl_dcgettext"); ++ r_ngettext = dlsym(RTLD_NEXT, "libintl_ngettext"); ++ r_dngettext = dlsym(RTLD_NEXT, "libintl_dngettext"); ++ r_dcngettext = dlsym(RTLD_NEXT, "libintl_dcngettext"); ++ r_setlocale = dlsym(RTLD_NEXT, "libintl_setlocale"); ++#endif + } + +-char *textdomain(char const *domainname) ++char *SYM(textdomain)(char const *domainname) + { + char *r; + setup(); +@@ -61,7 +93,7 @@ char *textdomain(char const *domainname) + return r; + } + +-char *bindtextdomain(char const *domainname, char const *dirname) ++char *SYM(bindtextdomain)(char const *domainname, char const *dirname) + { + char const *dir = dirname; + setup(); +@@ -71,7 +103,7 @@ char *bindtextdomain(char const *domainn + return r_bindtextdomain(domainname, dir); + } + +-char *bind_textdomain_codeset(char const *domainname, char const *codeset) ++char *SYM(bind_textdomain_codeset)(char const *domainname, char const *codeset) + { + char *r; + setup(); +@@ -81,3 +113,54 @@ char *bind_textdomain_codeset(char const + + return r; + } ++ ++#ifdef __CYGWIN__ ++ ++char *libintl_gettext(const char *msgid) ++{ ++ setup(); ++ return r_gettext(msgid); ++} ++ ++char *libintl_dgettext (const char *domainname, const char *msgid) ++{ ++ setup(); ++ return r_dgettext(domainname, msgid); ++} ++ ++char *libintl_dcgettext (const char *domainname, const char *msgid, ++ int category) ++{ ++ setup(); ++ return r_dcgettext (domainname, msgid, category); ++} ++ ++char *libintl_ngettext (const char *msgid1, const char *msgid2, ++ unsigned long int n) ++{ ++ setup(); ++ return r_ngettext (msgid1, msgid2, n); ++} ++ ++char *libintl_dngettext (const char *domainname, const char *msgid1, ++ const char *msgid2, unsigned long int n) ++{ ++ setup(); ++ return r_dngettext (domainname, msgid1, msgid2, n); ++} ++ ++char *libintl_dcngettext (const char *domainname, ++ const char *msgid1, const char *msgid2, ++ unsigned long int n, int category) ++{ ++ setup(); ++ return r_dcngettext (domainname, msgid1, msgid2, n, category); ++} ++ ++char *libintl_setlocale (int i, const char *s) ++{ ++ setup(); ++ return r_setlocale (i, s); ++} ++ ++#endif diff --git a/nixpkgs/pkgs/development/tools/misc/help2man/default.nix b/nixpkgs/pkgs/development/tools/misc/help2man/default.nix new file mode 100644 index 000000000000..5c54941b9077 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/help2man/default.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, fetchurl, perlPackages, gettext, libintl }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "help2man"; + version = "1.49.3"; + + src = fetchurl { + url = "mirror://gnu/help2man/help2man-${version}.tar.xz"; + sha256 = "sha256-TX5P3vLspq/geiaCFRzqeHgeCk6PliIULZ9wwIOi/U8="; + }; + + strictDeps = true; + + enableParallelBuilding = true; + + nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ]; + buildInputs = [ perlPackages.LocaleGettext libintl ]; + + configureFlags = [ + "--enable-nls" + ]; + + doCheck = false; # target `check' is missing + + patches = lib.optional stdenv.hostPlatform.isCygwin ./1.40.4-cygwin-nls.patch; + + # We don't use makeWrapper here because it uses substitutions our + # bootstrap shell can't handle. + postInstall = '' + mv $out/bin/help2man $out/bin/.help2man-wrapped + cat > $out/bin/help2man <<EOF + #! $SHELL -e + export PERL5LIB=\''${PERL5LIB:+:}${perlPackages.LocaleGettext}/${perlPackages.perl.libPrefix} + ${lib.optionalString stdenv.hostPlatform.isCygwin ''export PATH=\''${PATH:+:}${gettext}/bin''} + exec -a \$0 $out/bin/.help2man-wrapped "\$@" + EOF + chmod +x $out/bin/help2man + ''; + + meta = with lib; { + description = "Generate man pages from `--help' output"; + longDescription = '' + help2man produces simple manual pages from the ‘--help’ and ‘--version’ output of other commands. + ''; + homepage = "https://www.gnu.org/software/help2man/"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ pSub ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/highlight-assertions/default.nix b/nixpkgs/pkgs/development/tools/misc/highlight-assertions/default.nix new file mode 100644 index 000000000000..9e4ed0e61dd8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/highlight-assertions/default.nix @@ -0,0 +1,25 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "highlight-assertions"; + version = "0.1.7"; + + src = fetchFromGitHub { + owner = "thehamsta"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-7r8tBJ6JFGUGUsTivzlO23hHiXISajjn2WF12mmbmMg="; + }; + + cargoSha256 = "sha256-E2TNwCry7JOWy50+iLM9d+Tx4lIO6hkBtaHVLV8bDuo="; + + # requires nightly features + RUSTC_BOOTSTRAP = 1; + + meta = with lib; { + description = "A tool for unit testing tree sitter highlights for nvim-treesitter"; + homepage = "https://github.com/thehamsta/highlight-assertions"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/hound/default.nix b/nixpkgs/pkgs/development/tools/misc/hound/default.nix new file mode 100644 index 000000000000..b906456116c5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/hound/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, makeWrapper +, mercurial +, git +, openssh +, nixosTests +}: + +buildGoModule rec { + pname = "hound"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "hound-search"; + repo = "hound"; + rev = "v${version}"; + sha256 = "sha256-Qdk57zLjTXLdDEmB6K+sZAym5s0BekJJa/CpYeOBOcY="; + }; + + vendorHash = "sha256-0psvz4bnhGuwwSAXvQp0ju0GebxoUyY2Rjp/D43KF78="; + + nativeBuildInputs = [ makeWrapper ]; + + # requires network access + doCheck = false; + + postInstall = '' + wrapProgram $out/bin/houndd --prefix PATH : ${lib.makeBinPath [ mercurial git openssh ]} + ''; + + passthru.tests = { inherit (nixosTests) hound; }; + + meta = with lib; { + description = "Lightning fast code searching made easy"; + homepage = "https://github.com/hound-search/hound"; + license = licenses.mit; + maintainers = with maintainers; [ grahamc SuperSandro2000 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/httpref/default.nix b/nixpkgs/pkgs/development/tools/misc/httpref/default.nix new file mode 100644 index 000000000000..4417a81b66ec --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/httpref/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "httpref"; + version = "1.6.1"; + + src = fetchFromGitHub { + owner = "dnnrly"; + repo = "httpref"; + rev = "v${version}"; + hash = "sha256-T5fR9cyqsM6Kw6kFqZedoSxyvFkkxNpuErscwiUTMa0="; + }; + + vendorHash = "sha256-9Ei4Lfll79f/+iuO5KesUMaTgkS9nq+1tma/dhOZ7Qw="; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + description = "Command line, offline, access to HTTP status code, common header, and port references"; + homepage = "https://github.com/dnnrly/httpref"; + changelog = "https://github.com/dnnrly/httpref/releases/tag/${src.rev}"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/husky/default.nix b/nixpkgs/pkgs/development/tools/misc/husky/default.nix new file mode 100644 index 000000000000..dd2fef2a6026 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/husky/default.nix @@ -0,0 +1,23 @@ +{ lib, buildNpmPackage, fetchFromGitHub }: + +buildNpmPackage rec { + pname = "husky"; + version = "8.0.3"; + + src = fetchFromGitHub { + owner = "typicode"; + repo = "husky"; + rev = "v${version}"; + hash = "sha256-KoF2+vikgFyCGjfKeaqkC720UVMuvCIn9ApDPKbudsA="; + }; + + npmDepsHash = "sha256-u1dndTKvInobva+71yI2vPiwrW9vqzAJ2sDAqT9YJsg="; + + meta = with lib; { + description = "Git hooks made easy 🐶 woof!"; + homepage = "https://github.com/typicode/husky"; + changelog = "https://github.com/typicode/husky/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ dit7ya ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/hydra-cli/Cargo.lock b/nixpkgs/pkgs/development/tools/misc/hydra-cli/Cargo.lock new file mode 100644 index 000000000000..62112e07a7d9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/hydra-cli/Cargo.lock @@ -0,0 +1,1995 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "assert-json-diff" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4259cbe96513d2f1073027a259fc2ca917feb3026a5a8d984e3628e490255cc0" +dependencies = [ + "extend", + "serde", + "serde_json", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "blake2b_simd" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "bumpalo" +version = "3.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "time 0.1.45", + "wasm-bindgen", + "winapi 0.3.9", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "colored" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +dependencies = [ + "atty", + "lazy_static", + "winapi 0.3.9", +] + +[[package]] +name = "const_fn" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "cookie" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" +dependencies = [ + "percent-encoding", + "time 0.2.27", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3818dfca4b0cb5211a659bbcbb94225b7127407b2b135e650d717bfb78ab10d3" +dependencies = [ + "cookie", + "idna 0.2.3", + "log", + "publicsuffix", + "serde", + "serde_json", + "time 0.2.27", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "crossbeam-utils" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "csv" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" +dependencies = [ + "csv-core", + "itoa 1.0.6", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + +[[package]] +name = "dirs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + +[[package]] +name = "dtoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "extend" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47da3a72ec598d9c8937a7ebca8962a5c7a1f28444e38c2b33c771ba3f55f05" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project-lite 0.2.9", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "h2" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +dependencies = [ + "bytes 0.5.6", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", + "tracing-futures", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes 1.4.0", + "fnv", + "itoa 1.0.6", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +dependencies = [ + "bytes 0.5.6", + "http", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" + +[[package]] +name = "hydra-cli" +version = "0.2.0" +dependencies = [ + "chrono", + "clap", + "log", + "mockito", + "prettytable-rs", + "reqwest", + "serde", + "serde_json", +] + +[[package]] +name = "hyper" +version = "0.13.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +dependencies = [ + "bytes 0.5.6", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 0.4.8", + "pin-project", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" +dependencies = [ + "bytes 0.5.6", + "hyper", + "native-tls", + "tokio", + "tokio-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ipnet" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "js-sys" +version = "0.3.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" + +[[package]] +name = "linux-raw-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "mockito" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a634720d366bcbce30fb05871a35da229cef101ad0b2ea4e46cf5abf031a273" +dependencies = [ + "assert-json-diff", + "colored", + "difference", + "httparse", + "lazy_static", + "log", + "rand", + "regex", + "serde_json", + "serde_urlencoded 0.6.1", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "net2" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + +[[package]] +name = "openssl" +version = "0.10.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.15", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettytable-rs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" +dependencies = [ + "atty", + "csv", + "encode_unicode", + "lazy_static", + "term", + "unicode-width", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "publicsuffix" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f" +dependencies = [ + "idna 0.2.3", + "url", +] + +[[package]] +name = "quote" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +dependencies = [ + "getrandom", + "redox_syscall 0.1.57", + "rust-argon2", +] + +[[package]] +name = "regex" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" + +[[package]] +name = "reqwest" +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +dependencies = [ + "base64", + "bytes 0.5.6", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite 0.2.9", + "serde", + "serde_json", + "serde_urlencoded 0.7.1", + "time 0.2.27", + "tokio", + "tokio-tls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rust-argon2" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", +] + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys 0.42.0", +] + +[[package]] +name = "security-framework" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.15", +] + +[[package]] +name = "serde_json" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +dependencies = [ + "itoa 1.0.6", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +dependencies = [ + "dtoa", + "itoa 0.4.8", + "serde", + "url", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.6", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "standback" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +dependencies = [ + "version_check", +] + +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn 1.0.109", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn 1.0.109", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "redox_syscall 0.3.5", + "rustix", + "windows-sys 0.45.0", +] + +[[package]] +name = "term" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" +dependencies = [ + "byteorder", + "dirs", + "winapi 0.3.9", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", +] + +[[package]] +name = "time" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros", + "version_check", + "winapi 0.3.9", +] + +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", +] + +[[package]] +name = "time-macros-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "standback", + "syn 1.0.109", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +dependencies = [ + "bytes 0.5.6", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "memchr", + "mio", + "num_cpus", + "pin-project-lite 0.1.12", + "slab", +] + +[[package]] +name = "tokio-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +dependencies = [ + "bytes 0.5.6", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.1.12", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if 1.0.0", + "log", + "pin-project-lite 0.2.9", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna 0.3.0", + "percent-encoding", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasm-bindgen" +version = "0.2.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4" +dependencies = [ + "cfg-if 1.0.0", + "serde", + "serde_json", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.15", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.15", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb" + +[[package]] +name = "web-sys" +version = "0.3.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] diff --git a/nixpkgs/pkgs/development/tools/misc/hydra-cli/default.nix b/nixpkgs/pkgs/development/tools/misc/hydra-cli/default.nix new file mode 100644 index 000000000000..05829eb0c999 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/hydra-cli/default.nix @@ -0,0 +1,48 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, openssl +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "hydra-cli"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "nlewo"; + repo = pname; + rev = "v${version}"; + sha256 = "1fd3swdjx249971ak1bgndm5kh6rlzbfywmydn122lhfi6ry6a03"; + }; + + cargoLock = { + lockFile = ./Cargo.lock; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + # build fails due to outdated socket2 dependency + postPatch = '' + ln -sf ${./Cargo.lock} Cargo.lock + ''; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "A client for the Hydra CI"; + homepage = "https://github.com/nlewo/hydra-cli"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ gilligan lewo ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/hydra/unstable.nix b/nixpkgs/pkgs/development/tools/misc/hydra/unstable.nix new file mode 100644 index 000000000000..410bad35251e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/hydra/unstable.nix @@ -0,0 +1,253 @@ +{ stdenv +, lib +, nix +, perlPackages +, buildEnv +, makeWrapper +, unzip +, pkg-config +, libpqxx +, top-git +, mercurial +, darcs +, subversion +, breezy +, openssl +, bzip2 +, libxslt +, perl +, postgresql +, prometheus-cpp +, nukeReferences +, git +, nlohmann_json +, docbook_xsl +, openssh +, openldap +, gnused +, coreutils +, findutils +, gzip +, xz +, gnutar +, rpm +, dpkg +, cdrkit +, pixz +, boost +, autoreconfHook +, mdbook +, foreman +, python3 +, libressl +, cacert +, glibcLocales +, fetchFromGitHub +, nixosTests +}: + +let + perlDeps = buildEnv { + name = "hydra-perl-deps"; + paths = with perlPackages; lib.closePropagation + [ + AuthenSASL + CatalystActionREST + CatalystAuthenticationStoreDBIxClass + CatalystAuthenticationStoreLDAP + CatalystDevel + CatalystPluginAccessLog + CatalystPluginAuthorizationRoles + CatalystPluginCaptcha + CatalystPluginPrometheusTiny + CatalystPluginSessionStateCookie + CatalystPluginSessionStoreFastMmap + CatalystPluginStackTrace + CatalystRuntime + CatalystTraitForRequestProxyBase + CatalystViewDownload + CatalystViewJSON + CatalystViewTT + CatalystXScriptServerStarman + CatalystXRoleApplicator + CryptPassphrase + CryptPassphraseArgon2 + CryptRandPasswd + DBDPg + DBDSQLite + DataDump + DateTime + DigestSHA1 + EmailMIME + EmailSender + FileLibMagic + FileSlurper + FileWhich + IOCompress + IPCRun + IPCRun3 + JSON + JSONMaybeXS + JSONXS + ListSomeUtils + LWP + LWPProtocolHttps + ModulePluggable + NetAmazonS3 + NetPrometheus + NetStatsd + PadWalker + ParallelForkManager + PerlCriticCommunity + PrometheusTinyShared + ReadonlyX + SQLSplitStatement + SetScalar + Starman + StringCompareConstantTime + SysHostnameLong + TermSizeAny + TermReadKey + Test2Harness + TestPostgreSQL + TestSimple13 + TextDiff + TextTable + UUID4Tiny + XMLSimple + YAML + nix.perl-bindings + git + ]; + }; +in +stdenv.mkDerivation rec { + pname = "hydra"; + version = "2023-08-23"; + + src = fetchFromGitHub { + owner = "NixOS"; + repo = "hydra"; + rev = "00d30874da759eb0f44f446415b2469920ff41b5"; + sha256 = "sha256-e+68WCN1e1h2rf1pmwNNukTt5EBtF9KQNXhqJtoyJzo="; + }; + + buildInputs = [ + libpqxx + top-git + mercurial + darcs + subversion + breezy + openssl + bzip2 + libxslt + nix + perlDeps + perl + pixz + boost + postgresql + nlohmann_json + prometheus-cpp + ]; + + hydraPath = lib.makeBinPath ( + [ + subversion + openssh + nix + coreutils + findutils + pixz + gzip + bzip2 + xz + gnutar + unzip + git + top-git + mercurial + darcs + gnused + breezy + ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] + ); + + nativeBuildInputs = [ + autoreconfHook + makeWrapper + pkg-config + mdbook + unzip + nukeReferences + ]; + + nativeCheckInputs = [ + cacert + foreman + glibcLocales + python3 + libressl.nc + openldap + ]; + + configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; + + env.NIX_CFLAGS_COMPILE = "-pthread"; + + OPENLDAP_ROOT = openldap; + + shellHook = '' + PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH + PERL5LIB=$(pwd)/src/lib:$PERL5LIB; + ''; + + enableParallelBuilding = true; + + postPatch = '' + # Change 5s timeout for init to 30s + substituteInPlace t/lib/HydraTestContext.pm \ + --replace 'expectOkay(5, ("hydra-init"));' 'expectOkay(30, ("hydra-init"));' + ''; + + preCheck = '' + patchShebangs . + export LOGNAME=''${LOGNAME:-foo} + # set $HOME for bzr so it can create its trace file + export HOME=$(mktemp -d) + # remove flaky test + rm t/Hydra/Controller/User/ldap-legacy.t + ''; + + postInstall = '' + mkdir -p $out/nix-support + for i in $out/bin/*; do + read -n 4 chars < $i + if [[ $chars =~ ELF ]]; then continue; fi + wrapProgram $i \ + --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ + --prefix PATH ':' $out/bin:$hydraPath \ + --set-default HYDRA_RELEASE ${version} \ + --set HYDRA_HOME $out/libexec/hydra \ + --set NIX_RELEASE ${nix.name or "unknown"} + done + ''; + + dontStrip = true; + + doCheck = true; + + passthru = { + inherit nix perlDeps; + tests.basic = nixosTests.hydra.hydra_unstable; + }; + + meta = with lib; { + description = "Nix-based continuous build system"; + homepage = "https://nixos.org/hydra"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ lheckemann mindavi das_j ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/icon-naming-utils/default.nix b/nixpkgs/pkgs/development/tools/misc/icon-naming-utils/default.nix new file mode 100644 index 000000000000..930327a880db --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/icon-naming-utils/default.nix @@ -0,0 +1,19 @@ +{lib, stdenv, fetchurl, perl, librsvg}: + +stdenv.mkDerivation rec { + pname = "icon-naming-utils"; + version = "0.8.90"; + + src = fetchurl { + url = "http://tango.freedesktop.org/releases/${pname}-${version}.tar.gz"; + sha256 = "071fj2jm5kydlz02ic5sylhmw6h2p3cgrm3gwdfabinqkqcv4jh4"; + }; + + buildInputs = [ librsvg (perl.withPackages (p: [ p.XMLSimple ])) ]; + + meta = with lib; { + homepage = "http://tango.freedesktop.org/Standard_Icon_Naming_Specification"; + platforms = with platforms; linux ++ darwin; + license = licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/igprof/default.nix b/nixpkgs/pkgs/development/tools/misc/igprof/default.nix new file mode 100644 index 000000000000..a4e170f31b2a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/igprof/default.nix @@ -0,0 +1,44 @@ +{lib, stdenv, fetchFromGitHub, libunwind, cmake, pcre, gdb}: + +stdenv.mkDerivation rec { + version = "5.9.18"; + pname = "igprof"; + + src = fetchFromGitHub { + owner = "igprof"; + repo = "igprof"; + rev = "v${version}"; + sha256 = "sha256-UTrAaH8C79km78Z/7NxvQ6dnl4u4Ki80nORf4bsoSNw="; + }; + + postPatch = '' + substituteInPlace src/igprof --replace libigprof.so $out/lib/libigprof.so + ''; + + buildInputs = [libunwind gdb pcre]; + nativeBuildInputs = [cmake]; + CXXFLAGS = ["-fPIC" "-O2" "-w" "-fpermissive"]; + + meta = { + broken = (stdenv.isLinux && stdenv.isAarch64); + description = "The Ignominous Profiler"; + + longDescription = '' + IgProf is a fast and light weight profiler. It correctly handles + dynamically loaded shared libraries, threads and sub-processes started by + the application. We have used it routinely with large C++ applications + consisting of many hundreds of shared libraries and thousands of symbols + from millions of source lines of code. It requires no special privileges + to run. The performance reports provide full navigable call stacks and + can be customised by applying filters. Results from any number of + profiling runs can be included. This means you can both dig into the + details and see the big picture from combined workloads. + ''; + + license = lib.licenses.gpl2; + + homepage = "https://igprof.org/"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ ktf ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/indent/default.nix b/nixpkgs/pkgs/development/tools/misc/indent/default.nix new file mode 100644 index 000000000000..0d4c272e414e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/indent/default.nix @@ -0,0 +1,63 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, libintl +, texinfo +, buildPackages +, pkgsStatic +}: + +stdenv.mkDerivation rec { + pname = "indent"; + version = "2.2.13"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + hash = "sha256-nmRjT8TOZ5eyBLy4iXzhT90KtIyldpb3h2fFnK5XgJU="; + }; + + patches = [ + (fetchpatch { + name = "CVE-2023-40305.part-1.patch"; + url = "https://git.savannah.gnu.org/cgit/indent.git/patch/?id=df4ab2d19e247d059e0025789ba513418073ab6f"; + hash = "sha256-OLXBlYTdEuFK8SIsyC5Xr/hHWlvXiRqY2h79w+H5pGk="; + }) + (fetchpatch { + name = "CVE-2023-40305.part-2.patch"; + url = "https://git.savannah.gnu.org/cgit/indent.git/patch/?id=2685cc0bef0200733b634932ea7399b6cf91b6d7"; + hash = "sha256-t+QF7N1aqQ28J2O8esZ2bc5K042cUuZR4MeMeuWIgPw="; + }) + ]; + + # avoid https://savannah.gnu.org/bugs/?64751 + postPatch = '' + sed -E -i '/output\/else-comment-2-br(-ce)?.c/d' regression/TEST + sed -E -i 's/else-comment-2-br(-ce)?.c//g' regression/TEST + ''; + + makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ]; + + strictDeps = true; + nativeBuildInputs = [ texinfo ]; + buildInputs = [ libintl ]; + pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling + + env.NIX_CFLAGS_COMPILE = toString ( + lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration" + ++ lib.optional (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc) "13") "-Wno-unused-but-set-variable" + ); + + hardeningDisable = [ "format" ]; + + doCheck = true; + + passthru.tests.static = pkgsStatic.indent; + meta = { + homepage = "https://www.gnu.org/software/indent/"; + description = "A source code reformatter"; + license = lib.licenses.gpl3Plus; + maintainers = [ lib.maintainers.mmahut ]; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/inotify-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/inotify-tools/default.nix new file mode 100644 index 000000000000..e8536ea784f3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/inotify-tools/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, autoreconfHook, fetchFromGitHub, nix-update-script, fanotifySupport ? true }: + +stdenv.mkDerivation (finalAttrs: { + pname = "inotify-tools"; + version = "4.23.9.0"; + + src = fetchFromGitHub { + repo = "inotify-tools"; + owner = "inotify-tools"; + rev = finalAttrs.version; + hash = "sha256-6kM2JzxRcwUjUmbUWGnQ+gAvZcn7C32/enRwiYiuQGU="; + }; + + configureFlags = [ + (lib.enableFeature fanotifySupport "fanotify") + ]; + + nativeBuildInputs = [ autoreconfHook ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = with lib; { + homepage = "https://github.com/inotify-tools/inotify-tools/wiki"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ marcweber pSub shamilton ]; + platforms = platforms.linux; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/intel-gpu-tools/default.nix new file mode 100644 index 000000000000..dcafe4ceeff4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/intel-gpu-tools/default.nix @@ -0,0 +1,118 @@ +{ lib +, stdenv +, fetchFromGitLab +, fetchpatch + +# build time +, bison +, docbook_xsl +, docutils +, flex +, gtk-doc +, meson +, ninja +, pkg-config +, utilmacros + +# runtime +, alsa-lib +, cairo +, curl +, elfutils +, glib +, gsl +, json_c +, kmod +, libdrm +, liboping +, libpciaccess +, libunwind +, libX11 +, libXext +, libXrandr +, libXv +, openssl +, peg +, procps +, python3 +, udev +, valgrind +, xmlrpc_c +, xorgproto +}: + +stdenv.mkDerivation rec { + pname = "intel-gpu-tools"; + version = "1.27.1"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "drm"; + repo = "igt-gpu-tools"; + rev = "refs/tags/v${version}"; + hash = "sha256-7Z9Y7uUjtjdQbB+xV/fvO18xB18VV7fBZqw1fI7U0jQ="; + }; + + patches = [ + # fixes pkgsMusl.intel-gpu-tools + # https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/138 + (fetchpatch { + url = "https://raw.githubusercontent.com/void-linux/void-packages/111918317d06598fe1459dbe139923404f3f4b9d/srcpkgs/igt-gpu-tools/patches/musl.patch"; + hash = "sha256-cvtwZg7js7O/Ww7puBTfVzLRji2bHTyV91+PvpH8qrg="; + }) + ]; + + nativeBuildInputs = [ + bison + docbook_xsl + docutils + flex + gtk-doc + meson + ninja + pkg-config + utilmacros + ]; + + buildInputs = [ + alsa-lib + cairo + curl + elfutils + glib + gsl + json_c + kmod + libdrm + liboping + libpciaccess + libunwind + libX11 + libXext + libXrandr + libXv + openssl + peg + procps + python3 + udev + valgrind + xmlrpc_c + xorgproto + ]; + + preConfigure = '' + patchShebangs tests man + ''; + + hardeningDisable = [ "bindnow" ]; + + meta = with lib; { + changelog = "https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/v${version}/NEWS"; + homepage = "https://drm.pages.freedesktop.org/igt-gpu-tools/"; + description = "Tools for development and testing of the Intel DRM driver"; + license = licenses.mit; + platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = with maintainers; [ pSub ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/intltool/default.nix b/nixpkgs/pkgs/development/tools/misc/intltool/default.nix new file mode 100644 index 000000000000..967fc442a73d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/intltool/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchurl, fetchpatch, gettext, perlPackages, buildPackages }: + +stdenv.mkDerivation rec { + pname = "intltool"; + version = "0.51.0"; + + src = fetchurl { + url = "https://launchpad.net/intltool/trunk/${version}/+download/${pname}-${version}.tar.gz"; + sha256 = "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"; + }; + + # fix "unescaped left brace" errors when using intltool in some cases + patches = [(fetchpatch { + name = "perl5.26-regex-fixes.patch"; + urls = [ + "https://sources.debian.org/data/main/i/intltool/0.51.0-5/debian/patches/perl5.26-regex-fixes.patch" + "https://src.fedoraproject.org/rpms/intltool/raw/d8d2ef29fb122a42a6b6678eb1ec97ae56902af2/f/intltool-perl5.26-regex-fixes.patch" + ]; + sha256 = "12q2140867r5d0dysly72khi7b0mm2gd7nlm1k81iyg7fxgnyz45"; + })]; + + nativeBuildInputs = with perlPackages; [ perl XMLParser ]; + propagatedBuildInputs = [ gettext ] ++ (with perlPackages; [ perl XMLParser ]); + + postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + for f in $out/bin/*; do + substituteInPlace $f --replace "${buildPackages.perl}" "${perlPackages.perl}" + done + ''; + meta = with lib; { + description = "Translation helper tool"; + homepage = "https://launchpad.net/intltool/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/iozone/default.nix b/nixpkgs/pkgs/development/tools/misc/iozone/default.nix new file mode 100644 index 000000000000..fd25c767ab0e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/iozone/default.nix @@ -0,0 +1,62 @@ +{ stdenv, lib, fetchurl, gnuplot }: + +let + target = if stdenv.hostPlatform.system == "i686-linux" then + "linux" + else if stdenv.hostPlatform.system == "x86_64-linux" then + "linux-AMD64" + else if stdenv.hostPlatform.system == "x86_64-darwin" then + "macosx" + else if stdenv.hostPlatform.system == "aarch64-linux" then + "linux-arm" + else throw "Platform ${stdenv.hostPlatform.system} not yet supported."; +in + +stdenv.mkDerivation rec { + pname = "iozone"; + version = "3.493"; + + src = fetchurl { + url = "http://www.iozone.org/src/current/iozone${lib.replaceStrings ["."] ["_"] version}.tgz"; + hash = "sha256-Y0wSNgC0u0LoJ0g/oVsq+uba2ikHt4SxTgFBWTPUMZg="; + }; + + license = fetchurl { + url = "http://www.iozone.org/docs/Iozone_License.txt"; + hash = "sha256-O/8yztxKBI/UKs6vwv9mq16Rn3cf/UHpSxdVnAPVCYw="; + }; + + preBuild = "pushd src/current"; + postBuild = "popd"; + + buildFlags = target; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p $out/{bin,share/doc,libexec,share/man/man1} + install docs/iozone.1 $out/share/man/man1/ + install docs/Iozone_ps.gz $out/share/doc/ + install -s src/current/{iozone,fileop,pit_server} $out/bin/ + install src/current/{gnu3d.dem,Generate_Graphs,gengnuplot.sh} $out/libexec/ + ln -s $out/libexec/Generate_Graphs $out/bin/iozone_generate_graphs + # License copy is mandated by the license, but it's not in the tarball. + install ${license} $out/share/doc/Iozone_License.txt + ''; + + preFixup = '' + sed -i "1i#! $shell" $out/libexec/Generate_Graphs + substituteInPlace $out/libexec/Generate_Graphs \ + --replace ./gengnuplot.sh $out/libexec/gengnuplot.sh \ + --replace 'gnuplot ' "${gnuplot}/bin/gnuplot " \ + --replace gnu3d.dem $out/libexec/gnu3d.dem + ''; + + meta = { + description = "IOzone Filesystem Benchmark"; + homepage = "http://www.iozone.org/"; + license = lib.licenses.unfreeRedistributable; + platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]; + maintainers = with lib.maintainers; [ Baughn makefu ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/itm-tools/Cargo.lock b/nixpkgs/pkgs/development/tools/misc/itm-tools/Cargo.lock new file mode 100644 index 000000000000..d9d39e519d22 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/itm-tools/Cargo.lock @@ -0,0 +1,315 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "addr2line" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler32" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "backtrace" +version = "0.3.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05100821de9e028f12ae3d189176b41ee198341eb8f369956407fea2f5cc666c" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "clap" +version = "2.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "either" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" + +[[package]] +name = "exitfailure" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ff5bd832af37f366c6c194d813a11cd90ac484f124f079294f28e357ae40515" +dependencies = [ + "failure", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "gimli" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +dependencies = [ + "libc", +] + +[[package]] +name = "itm" +version = "0.4.0" +source = "git+https://github.com/rust-embedded/itm#5dd476d03de0738062a876fd3845900ab04833a4" +dependencies = [ + "byteorder", + "either", + "thiserror", +] + +[[package]] +name = "itm-tools" +version = "0.1.0" +dependencies = [ + "clap", + "exitfailure", + "failure", + "itm", + "rustc-demangle", + "xmas-elf", +] + +[[package]] +name = "libc" +version = "0.2.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" + +[[package]] +name = "miniz_oxide" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +dependencies = [ + "adler32", +] + +[[package]] +name = "object" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" + +[[package]] +name = "proc-macro2" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "syn" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "xmas-elf" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22678df5df766e8d1e5d609da69f0c3132d794edf6ab5e75e7abcd2270d4cf58" +dependencies = [ + "zero", +] + +[[package]] +name = "zero" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f1bc8a6b2005884962297587045002d8cfb8dcec9db332f4ca216ddc5de82c5" diff --git a/nixpkgs/pkgs/development/tools/misc/itm-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/itm-tools/default.nix new file mode 100644 index 000000000000..7f027a217327 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/itm-tools/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchFromGitHub, rustPlatform, pkg-config }: + +rustPlatform.buildRustPackage rec { + pname = "itm-tools"; + version = "unstable-2019-11-15"; + + src = fetchFromGitHub { + owner = "japaric"; + repo = pname; + rev = "e94155e44019d893ac8e6dab51cc282d344ab700"; + sha256 = "19xkjym0i7y52cfhvis49c59nzvgw4906cd8bkz8ka38mbgfqgiy"; + }; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "itm-0.4.0" = "sha256-T61f1WvxEMhI5bzp8FuMYWiG1YOPJvWuBJfK/gjuNKI="; + }; + }; + + nativeBuildInputs = [ pkg-config ]; + + postPatch = '' + ln -s ${./Cargo.lock} Cargo.lock + ''; + + doCheck = false; + + meta = with lib; { + description = "Tools for analyzing ITM traces"; + homepage = "https://github.com/japaric/itm-tools"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ hh sb0 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/itstool/default.nix b/nixpkgs/pkgs/development/tools/misc/itstool/default.nix new file mode 100644 index 000000000000..0f2633d71e6f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/itstool/default.nix @@ -0,0 +1,43 @@ +{ stdenv +, lib +, fetchurl +, python3 +}: + +stdenv.mkDerivation rec { + pname = "itstool"; + version = "2.0.7"; + + src = fetchurl { + url = "http://files.itstool.org/${pname}/${pname}-${version}.tar.bz2"; + hash = "sha256-a5p80poSu5VZj1dQ6HY87niDahogf4W3TYsydbJ+h8o="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + python3 + python3.pkgs.wrapPython + ]; + + buildInputs = [ + python3 + python3.pkgs.libxml2 + ]; + + pythonPath = [ + python3.pkgs.libxml2 + ]; + + postFixup = '' + wrapPythonPrograms + ''; + + meta = { + homepage = "https://itstool.org/"; + description = "XML to PO and back again"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/jcli/default.nix b/nixpkgs/pkgs/development/tools/misc/jcli/default.nix new file mode 100644 index 000000000000..0333b74e3e0c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/jcli/default.nix @@ -0,0 +1,28 @@ +{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: + +buildGoModule rec { + pname = "jcli"; + version = "0.0.42"; + + src = fetchFromGitHub { + owner = "jenkins-zh"; + repo = "jenkins-cli"; + rev = "v${version}"; + hash = "sha256-t9NE911TjAvoCsmf9F989DNQ+s9GhgUF7cwuyHefWts="; + }; + + vendorHash = "sha256-bmPnxFvdKU5zuMsCDboSOxP5f7NnMRwS/gN0sW7eTRA="; + + doCheck = false; + + postInstall = '' + mv $out/bin/{jenkins-cli,jcli} + ''; + + meta = with lib; { + description = "Jenkins CLI allows you to manage your Jenkins in an easy way"; + homepage = "https://jcli.jenkins-zh.cn/"; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/jiq/default.nix b/nixpkgs/pkgs/development/tools/misc/jiq/default.nix new file mode 100644 index 000000000000..2a0f0ed822c0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/jiq/default.nix @@ -0,0 +1,31 @@ +{ lib, buildGoModule, fetchFromGitHub, jq, makeWrapper }: + +buildGoModule rec { + pname = "jiq"; + version = "0.7.2"; + + src = fetchFromGitHub { + owner = "fiatjaf"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-txhttYngN+dofA3Yp3gZUZPRRZWGug9ysXq1Q0RP7ig="; + }; + + vendorHash = "sha256-ZUmOhPGy+24AuxdeRVF0Vnu8zDGFrHoUlYiDdfIV5lc="; + + nativeBuildInputs = [ makeWrapper ]; + + nativeCheckInputs = [ jq ]; + + postInstall = '' + wrapProgram $out/bin/jiq \ + --prefix PATH : ${lib.makeBinPath [ jq ]} + ''; + + meta = with lib; { + homepage = "https://github.com/fiatjaf/jiq"; + license = licenses.mit; + description = "jid on jq - interactive JSON query tool using jq expressions"; + maintainers = with maintainers; [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/jscoverage/default.nix b/nixpkgs/pkgs/development/tools/misc/jscoverage/default.nix new file mode 100644 index 000000000000..83dbfb93c86d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/jscoverage/default.nix @@ -0,0 +1,55 @@ +{ autoconf, fetchurl, makedepend, perl, python3, lib, stdenv, zip }: + +stdenv.mkDerivation rec { + pname = "jscoverage"; + version = "0.5.1"; + + src = fetchurl { + url = "https://siliconforks.com/${pname}/download/${pname}-${version}.tar.bz2"; + sha256 = "c45f051cec18c10352f15f9844f47e37e8d121d5fd16680e2dd0f3b4420eb7f4"; + }; + + patches = [ + ./jsfalse_to_null.patch + ]; + + nativeBuildInputs = [ perl python3 zip ]; + + strictDeps = true; + + # It works without MOZ_FIX_LINK_PATHS, circumventing an impurity + # issue. Maybe we could kick js/ (spidermonkey) completely and + # instead use our spidermonkey via nix. + preConfigure = '' + sed -i 's/^MOZ_FIX_LINK_PATHS=.*$/MOZ_FIX_LINK_PATHS=""/' ./js/configure + ''; + + meta = { + description = "Code coverage for JavaScript"; + + longDescription = '' + JSCoverage is a tool that measures code coverage for JavaScript + programs. + + Code coverage statistics show which lines of a program have been + executed (and which have been missed). This information is useful + for constructing comprehensive test suites (hence, it is often + called test coverage). + + JSCoverage works by instrumenting the JavaScript code used in web + pages. Code coverage statistics are collected while the + instrumented JavaScript code is executed in a web browser. + + JSCoverage supports the complete language syntax described in the + ECMAScript Language Specification (ECMA-262, 3rd + edition). JSCoverage works with any modern standards-compliant web + browser - including Internet Explorer (IE 6, 7, and 8), Firefox, + Opera, Safari, and Google Chrome - on Microsoft Windows and + GNU/Linux. + ''; + + homepage = "http://siliconforks.com/jscoverage/"; + license = lib.licenses.gpl2; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/jscoverage/jsfalse_to_null.patch b/nixpkgs/pkgs/development/tools/misc/jscoverage/jsfalse_to_null.patch new file mode 100644 index 000000000000..b49594964e1f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/jscoverage/jsfalse_to_null.patch @@ -0,0 +1,26 @@ +diff --git i/js/jsstr.cpp w/js/jsstr.cpp +index e662bf1..b18597e 100644 +--- i/js/jsstr.cpp ++++ w/js/jsstr.cpp +@@ -3040,7 +3040,7 @@ js_InitStringClass(JSContext *cx, JSObject *obj) + JSVAL_VOID, NULL, NULL, + JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0, + NULL)) { +- return JS_FALSE; ++ return NULL; + } + + return proto; +diff --git i/js/jsxml.cpp w/js/jsxml.cpp +index 5621ede..e00c97d 100644 +--- i/js/jsxml.cpp ++++ w/js/jsxml.cpp +@@ -303,7 +303,7 @@ NewXMLNamespace(JSContext *cx, JSString *prefix, JSString *uri, JSBool declared) + + obj = js_NewObject(cx, &js_NamespaceClass.base, NULL, NULL); + if (!obj) +- return JS_FALSE; ++ return NULL; + JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_PREFIX])); + JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_URI])); + JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_DECLARED])); diff --git a/nixpkgs/pkgs/development/tools/misc/jsonfmt/default.nix b/nixpkgs/pkgs/development/tools/misc/jsonfmt/default.nix new file mode 100644 index 000000000000..e11828df7f59 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/jsonfmt/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, jsonfmt +}: + +buildGoModule rec { + pname = "jsonfmt"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "caarlos0"; + repo = "jsonfmt"; + rev = "v${version}"; + hash = "sha256-rVv7Dv4vQmss4eiiy+KaO9tZ5U58WlRlsOz4QO0gdfM="; + }; + + vendorHash = "sha256-xtwN+TemiiyXOxZ2DNys4G6w4KA3BjLSWAmzox+boMY="; + + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + passthru.tests = { + version = testers.testVersion { + package = jsonfmt; + }; + }; + + meta = with lib; { + description = "Formatter for JSON files"; + homepage = "https://github.com/caarlos0/jsonfmt"; + changelog = "https://github.com/caarlos0/jsonfmt/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/k2tf/default.nix b/nixpkgs/pkgs/development/tools/misc/k2tf/default.nix new file mode 100644 index 000000000000..35eb679281aa --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/k2tf/default.nix @@ -0,0 +1,33 @@ +{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: + +buildGoModule rec { + pname = "k2tf"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "sl1pm4t"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-zkkRzCTZCvbwBj4oIhTo5d3PvqLMJPzT3zV9jU3PEJs="; + }; + + patches = [ + # update dependencies + # https://github.com/sl1pm4t/k2tf/pull/111 + (fetchpatch { + url = "https://github.com/sl1pm4t/k2tf/commit/7e7b778eeb80400cb0dadb1cdea4e617b5738147.patch"; + hash = "sha256-ZGQUuH7u3aNLml6rvOzOxVwSTlbhZLknXbHKeY4lp00="; + }) + ]; + + vendorHash = "sha256-yGuoE1bgwVHk3ym382OC93me9HPlVoNgGo/3JROVC2E="; + + ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=v${version}" ]; + + meta = with lib; { + description = "Kubernetes YAML to Terraform HCL converter"; + homepage = "https://github.com/sl1pm4t/k2tf"; + license = licenses.mpl20; + maintainers = [ maintainers.flokli ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/kconfig-frontends/default.nix b/nixpkgs/pkgs/development/tools/misc/kconfig-frontends/default.nix new file mode 100644 index 000000000000..8b38246d67d5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/kconfig-frontends/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, pkg-config, bison, flex, gperf, ncurses, python3, bash }: + +stdenv.mkDerivation rec { + pname = "kconfig-frontends"; + version = "4.11.0.1"; + + src = fetchurl { + sha256 = "1xircdw3k7aaz29snf96q2fby1cs48bidz5l1kkj0a5gbivw31i3"; + url = "http://ymorin.is-a-geek.org/download/kconfig-frontends/kconfig-frontends-${version}.tar.xz"; + }; + + nativeBuildInputs = [ bison flex gperf pkg-config ]; + buildInputs = [ bash ncurses python3 ]; + + strictDeps = true; + + configureFlags = [ + "--enable-frontends=conf,mconf,nconf" + ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=format-security"; + + meta = with lib; { + description = "Out of Linux tree packaging of the kconfig infrastructure"; + longDescription = '' + Configuration language and system for the Linux kernel and other + projects. Features simple syntax and grammar, limited yet adequate option + types, simple organization of options, and direct and reverse + dependencies. + ''; + homepage = "http://ymorin.is-a-geek.org/projects/kconfig-frontends"; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ mbe ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/kdbg/default.nix b/nixpkgs/pkgs/development/tools/misc/kdbg/default.nix new file mode 100644 index 000000000000..35e0a52865fa --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/kdbg/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchurl, cmake, extra-cmake-modules, qt5, + ki18n, kconfig, kiconthemes, kxmlgui, kwindowsystem, + qtbase, makeWrapper, +}: + +stdenv.mkDerivation rec { + pname = "kdbg"; + version = "3.0.1"; + src = fetchurl { + url = "mirror://sourceforge/kdbg/${version}/${pname}-${version}.tar.gz"; + sha256 = "1gax6xll8svmngw0z1rzhd77xysv01zp0i68x4n5pq0xgh7gi7a4"; + }; + + nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ]; + buildInputs = [ qt5.qtbase ki18n kconfig kiconthemes kxmlgui kwindowsystem ]; + + postInstall = '' + wrapProgram $out/bin/kdbg --prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix} + ''; + + dontWrapQtApps = true; + + meta = with lib; { + homepage = "https://www.kdbg.org/"; + description = '' + A graphical user interface to gdb, the GNU debugger. It provides an + intuitive interface for setting breakpoints, inspecting variables, and + stepping through code. + ''; + license = licenses.gpl2; + maintainers = [ maintainers.catern ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/kibana/7.x.nix b/nixpkgs/pkgs/development/tools/misc/kibana/7.x.nix new file mode 100644 index 000000000000..a4faa31a4214 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/kibana/7.x.nix @@ -0,0 +1,60 @@ +{ elk7Version +, enableUnfree ? true +, lib +, stdenv +, makeWrapper +, fetchurl +, nodejs_16 +, coreutils +, which +}: + +let + nodejs = nodejs_16; + inherit (builtins) elemAt; + info = lib.splitString "-" stdenv.hostPlatform.system; + arch = elemAt info 0; + plat = elemAt info 1; + hashes = + { + x86_64-linux = "sha512-09XokG5krjxGnk34DhxpLOGRLjb2jd82uZtwGfrzSuuqMpBhkEptK2oySGxuGdHF8uowwlR5p5YO2TvBwMsWkQ=="; + x86_64-darwin = "sha512-cqRJnvu730Jfkr6vwbHUFuZube1g522cmvnDwTzhGGK6VN/7+9XL3vavqtUPDVdTLTUk+DrNiIQK7MaJH3SHMg=="; + aarch64-linux = "sha512-zhtYThz5j4+w5gI1JWSnHv709Tk23eegVsrtYmdaYhZiTw2yvCTYI5uNAfBjBr8XPdp6CKF4e6Bh2wHKDYg1mg=="; + aarch64-darwin = "sha512-cqRJnvu730Jfkr6vwbHUFuZube1g522cmvnDwTzhGGK6VN/7+9XL3vavqtUPDVdTLTUk+DrNiIQK7MaJH3SHMg=="; + }; + +in stdenv.mkDerivation rec { + pname = "kibana"; + version = elk7Version; + + src = fetchurl { + url = "https://artifacts.elastic.co/downloads/kibana/${pname}-${version}-${plat}-${arch}.tar.gz"; + hash = hashes.${stdenv.hostPlatform.system} or (throw "Unknown architecture"); + }; + + patches = [ + # Kibana specifies it specifically needs nodejs 10.15.2 but nodejs in nixpkgs is at 10.15.3. + # The <nixpkgs/nixos/tests/elk.nix> test succeeds with this newer version so lets just + # disable the version check. + ./disable-nodejs-version-check-7.patch + ]; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/libexec/kibana $out/bin + mv * $out/libexec/kibana/ + rm -r $out/libexec/kibana/node + makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \ + --prefix PATH : "${lib.makeBinPath [ nodejs coreutils which ]}" + sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana + ''; + + meta = with lib; { + description = "Visualize logs and time-stamped data"; + homepage = "http://www.elasticsearch.org/overview/kibana"; + license = licenses.elastic20; + maintainers = with maintainers; [ offline basvandijk ]; + platforms = with platforms; unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/kibana/disable-nodejs-version-check-7.patch b/nixpkgs/pkgs/development/tools/misc/kibana/disable-nodejs-version-check-7.patch new file mode 100644 index 000000000000..ef4c207764c1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/kibana/disable-nodejs-version-check-7.patch @@ -0,0 +1,19 @@ +diff --git a/src/setup_node_env/node_version_validator.js b/src/setup_node_env/node_version_validator.js +index 3f611e5a..f5c60c85 100644 +--- a/src/setup_node_env/node_version_validator.js ++++ b/src/setup_node_env/node_version_validator.js +@@ -25,11 +25,11 @@ var pkg = require('../../package.json'); // Note: This is written in ES5 so we c + var currentVersion = process && process.version || null; + var rawRequiredVersion = pkg && pkg.engines && pkg.engines.node || null; + var requiredVersion = rawRequiredVersion ? 'v' + rawRequiredVersion : rawRequiredVersion; +-var isVersionValid = !!currentVersion && !!requiredVersion && currentVersion === requiredVersion; // Validates current the NodeJS version compatibility when Kibana starts. ++var isVersionValid = !!currentVersion && !!requiredVersion; // Validates current the NodeJS version compatibility when Kibana starts. + + if (!isVersionValid) { + var errorMessage = 'Kibana does not support the current Node.js version ' + currentVersion + '. Please use Node.js ' + requiredVersion + '.'; // Actions to apply when validation fails: error report + exit. + + console.error(errorMessage); + process.exit(1); +-} +\ No newline at end of file ++} diff --git a/nixpkgs/pkgs/development/tools/misc/kool/default.nix b/nixpkgs/pkgs/development/tools/misc/kool/default.nix new file mode 100644 index 000000000000..370aebb3aca6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/kool/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, kool +}: + +buildGoModule rec { + pname = "kool"; + version = "2.1.1"; + + src = fetchFromGitHub { + owner = "kool-dev"; + repo = "kool"; + rev = version; + hash = "sha256-Gtw+47EQVPxiW9xjY/cWlE4aJ1aYYhpvsVQzt0EnI8I="; + }; + + vendorHash = "sha256-8t+OZB9jrlOVHLURPmtz0ent6COEOVMFfObe2LH1jRM="; + + ldflags = [ + "-s" + "-w" + "-X=kool-dev/kool/commands.version=${version}" + ]; + + passthru.tests = { + version = testers.testVersion { + package = kool; + }; + }; + + meta = with lib; { + description = "From local development to the cloud: development workflow made easy"; + homepage = "https://kool.dev"; + changelog = "https://github.com/kool-dev/kool/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/libtool/default.nix b/nixpkgs/pkgs/development/tools/misc/libtool/default.nix new file mode 100644 index 000000000000..6970d2a94ec9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/libtool/default.nix @@ -0,0 +1,40 @@ +{lib, stdenv, fetchurl, m4, perl}: + +stdenv.mkDerivation rec { + pname = "libtool"; + version = "1.5.26"; + + src = fetchurl { + url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + sha256 = "029ggq5kri1gjn6nfqmgw4w920gyfzscjjxbsxxidal5zqsawd8w"; + }; + + nativeBuildInputs = [m4]; + buildInputs = [perl]; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + dontFixLibtool = true; + + meta = { + description = "Generic library support script"; + + longDescription = '' + GNU libtool is a generic library support script. Libtool hides + the complexity of using shared libraries behind a consistent, + portable interface. + + To use libtool, add the new generic library building commands to + your Makefile, Makefile.in, or Makefile.am. See the + documentation for details. + ''; + + homepage = "https://www.gnu.org/software/libtool/"; + + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.unix; + + mainProgram = "libtool"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/libtool/libtool2.nix b/nixpkgs/pkgs/development/tools/misc/libtool/libtool2.nix new file mode 100644 index 000000000000..50c064cadfd0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/libtool/libtool2.nix @@ -0,0 +1,73 @@ +{ lib, stdenv, fetchurl, fetchpatch, m4 +, runtimeShell +, file +}: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "libtool"; + version = "2.4.7"; + + src = fetchurl { + url = "mirror://gnu/libtool/${pname}-${version}.tar.gz"; + sha256 = "sha256-BOlsJATqcMWQxUbrpCAqThJyLGQAFsErmy8c49SB6ag="; + }; + + outputs = [ "out" "lib" ]; + + # FILECMD was added in libtool 2.4.7; previous versions hardwired `/usr/bin/file` + # https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html + FILECMD = "${file}/bin/file"; + + postPatch = + # libtool commit da2e352735722917bf0786284411262195a6a3f6 changed + # the shebang from `/bin/sh` (which is a special sandbox exception) + # to `/usr/bin/env sh`, meaning that we now need to patch shebangs + # in libtoolize.in: + '' + substituteInPlace libtoolize.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}' + # avoid help2man run after 'libtoolize.in' update + touch doc/libtoolize.1 + ''; + + strictDeps = true; + # As libtool is an early bootstrap dependency try hard not to + # add autoconf and automake or help2man dependencies here. That way we can + # avoid pulling in perl and get away with just an `m4` depend. + nativeBuildInputs = [ m4 file ]; + propagatedBuildInputs = [ m4 file ]; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + dontFixLibtool = true; + + # XXX: The GNU ld wrapper does all sorts of nasty things wrt. RPATH, which + # leads to the failure of a number of tests. + doCheck = false; + doInstallCheck = false; + + enableParallelBuilding = true; + + meta = with lib; { + description = "GNU Libtool, a generic library support script"; + longDescription = '' + GNU libtool is a generic library support script. Libtool hides + the complexity of using shared libraries behind a consistent, + portable interface. + + To use libtool, add the new generic library building commands to + your Makefile, Makefile.in, or Makefile.am. See the + documentation for details. + ''; + homepage = "https://www.gnu.org/software/libtool/"; + license = licenses.gpl2Plus; + maintainers = [ ]; + platforms = platforms.unix; + mainProgram = "libtool"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/libtree/default.nix b/nixpkgs/pkgs/development/tools/misc/libtree/default.nix new file mode 100644 index 000000000000..24083a60d28e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/libtree/default.nix @@ -0,0 +1,48 @@ +{ lib +, stdenv +, fetchFromGitHub +, testers +, libtree +, runCommand +, coreutils +, dieHook +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libtree"; + version = "3.1.1"; + + src = fetchFromGitHub { + owner = "haampie"; + repo = "libtree"; + rev = "v${finalAttrs.version}"; + hash = "sha256-q3JtQ9AxoP0ma9K96cC3gf6QmQ1FbS7T7I59qhkwbMk="; + }; + + makeFlags = [ "PREFIX=$(out)" ]; + + # Fails at https://github.com/haampie/libtree/blob/v3.1.1/tests/07_origin_is_relative_to_symlink_location_not_realpath/Makefile#L28 + doCheck = false; + + passthru.tests = { + version = testers.testVersion { + package = libtree; + command = "libtree --version"; + version = finalAttrs.version; + }; + checkCoreUtils = runCommand "${finalAttrs.pname}-ls-test" { + nativeBuildInputs = [ finalAttrs.finalPackage dieHook ]; + } '' + libtree ${coreutils}/bin/ls > $out || die "libtree failed to show dependencies." + [ -s $out ] + ''; + }; + + meta = with lib; { + description = "Tree ldd with an option to bundle dependencies into a single folder"; + homepage = "https://github.com/haampie/libtree"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ prusnak rardiol ]; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/libwhich/default.nix b/nixpkgs/pkgs/development/tools/misc/libwhich/default.nix new file mode 100644 index 000000000000..aee79b826444 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/libwhich/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "libwhich"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "vtjnash"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-JNIWdI12sL3TZqVA3GeH0KbgqFDbMsEdecea3392Goc="; + }; + + installPhase = '' + install -Dm755 -t $out/bin libwhich + ''; + + meta = with lib; { + description = "Like `which`, for dynamic libraries"; + homepage = "https://github.com/vtjnash/libwhich"; + license = licenses.mit; + maintainers = with maintainers; [ dtzWill ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/licenseclassifier/default.nix b/nixpkgs/pkgs/development/tools/misc/licenseclassifier/default.nix new file mode 100644 index 000000000000..05a858130b39 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/licenseclassifier/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "licenseclassifier"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "google"; + repo = "licenseclassifier"; + rev = "v${version}"; + hash = "sha256-j+8hX8W0VD0h09Qmu7POnHT8f8+SeG5Si1fI0CDIwuo="; + }; + + # The new and improved "License Classifier v2" is hidden in a subdirectory. + sourceRoot = "${src.name}/v2"; + + vendorHash = "sha256-u0VR8DCmbZS0MF26Y4HfqtLaGyX2n2INdAidVNbnXPE="; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + description = "A License Classifier"; + longDescription = '' + The license classifier can analyze text to determine what type of license + it contains. It searches for license texts in a file and compares them to + an archive of known licenses. These files could be, e.g., LICENSE files + with a single or multiple licenses in it, or source code files with the + license text in a comment. + ''; + homepage = "https://github.com/google/licenseclassifier"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ tnias ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/linuxkit/darwin-os-version.patch b/nixpkgs/pkgs/development/tools/misc/linuxkit/darwin-os-version.patch new file mode 100644 index 000000000000..aaa603e4ead1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/linuxkit/darwin-os-version.patch @@ -0,0 +1,53 @@ +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/osversion.go b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/osversion.go +index d72a7856d..b186d3aff 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/osversion.go ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/osversion.go +@@ -9,6 +9,7 @@ import "C" + import ( + "errors" + "fmt" ++ "os/exec" + "strconv" + "strings" + "sync" +@@ -48,6 +49,40 @@ func fetchMajorMinorVersion() (float64, error) { + if err != nil { + return 0, err + } ++ ++ // For backward compatibility reasons, if code compiled against an SDK ++ // earlier than macOS 11 is run on macOS 11 or later, and then tries to read ++ // value of kern.osproductversion, the OS will return the value "10.16" ++ // instead of the real OS version string. By contrast, the command `sw_vers ++ // -productVersion` will return the real OS version string unless the ++ // environment variable SYSTEM_VERSION_COMPAT is set to 1 or 2, in which ++ // case it will respectively return "10.16" and "15.7" (the latter is for ++ // some iOS compatibility reason). ++ // ++ // The only (currently) sure way to get the real OS version string ++ // regardless of SYSTEM_VERSION_COMPAT or the SDK compiled against is ++ // apparently to parse ++ // /System/Library/CoreServices/.SystemVersionPlatform.plist if it exists, ++ // and /System/Library/CoreServices/SystemVersion.plist otherwise. Doing ++ // so, however, requires parsing XML plist files. ++ // ++ // Given what this library does, it doesn't seem likely that there would be ++ // a good reason to run its code with SYSTEM_VERSION_COMPAT set, so using ++ // `sw_vers` should be adequate until a proper parsing of plist files is ++ // added. ++ // ++ // See https://github.com/ziglang/zig/issues/7569, ++ // https://github.com/ziglang/zig/pull/7714 and ++ // https://eclecticlight.co/2020/08/13/macos-version-numbering-isnt-so-simple/ ++ // for more information. ++ if osver == "10.16" { ++ out, err := exec.Command("sw_vers", "-productVersion").Output() ++ if err != nil { ++ return 0, err ++ } ++ osver = strings.TrimRight(string(out), "\r\n") ++ } ++ + prefix := "v" + majorMinor := strings.TrimPrefix(semver.MajorMinor(prefix+osver), prefix) + version, err := strconv.ParseFloat(majorMinor, 64) diff --git a/nixpkgs/pkgs/development/tools/misc/linuxkit/default.nix b/nixpkgs/pkgs/development/tools/misc/linuxkit/default.nix new file mode 100644 index 000000000000..73ea58a17e4d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/linuxkit/default.nix @@ -0,0 +1,60 @@ +{ lib, stdenv, buildGoModule, fetchFromGitHub, git, Cocoa, Virtualization, sigtool, testers, linuxkit }: + +buildGoModule rec { + pname = "linuxkit"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "linuxkit"; + repo = "linuxkit"; + rev = "v${version}"; + sha256 = "sha256-8x9oJaYb/mN2TUaVrGOYi5/6TETD78jif0SwCSc0kyo="; + }; + + vendorHash = null; + + modRoot = "./src/cmd/linuxkit"; + + patches = [ + ./darwin-os-version.patch + ./support-apple-11-sdk.patch + ]; + + # - On macOS, an executable must be signed with the right entitlement(s) to be + # able to use the Virtualization framework at runtime. + # - sigtool is allows us to validly sign such executables with a dummy + # authority. + nativeBuildInputs = lib.optionals stdenv.isDarwin [ sigtool ]; + buildInputs = lib.optionals stdenv.isDarwin [ Cocoa Virtualization ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=${version}" + ]; + + nativeCheckInputs = [ git ]; + + # - Because this package definition doesn't build using the source's Makefile, + # we must manually call the sign target. + # - The binary stripping that nixpkgs does by default in the + # fixup phase removes such signing and entitlements, so we have to sign + # after stripping. + # - Finally, at the start of the fixup phase, the working directory is + # $sourceRoot/src/cmd/linuxkit, so it's simpler to use the sign target from + # the Makefile in that directory rather than $sourceRoot/Makefile. + postFixup = lib.optionalString stdenv.isDarwin '' + make sign LOCAL_TARGET=$out/bin/linuxkit + ''; + passthru.tests.version = testers.testVersion { + package = linuxkit; + command = "linuxkit version"; + }; + + meta = with lib; { + description = "A toolkit for building secure, portable and lean operating systems for containers"; + license = licenses.asl20; + homepage = "https://github.com/linuxkit/linuxkit"; + maintainers = with maintainers; [ nicknovitski ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/linuxkit/support-apple-11-sdk.patch b/nixpkgs/pkgs/development/tools/misc/linuxkit/support-apple-11-sdk.patch new file mode 100644 index 000000000000..70393977715b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/linuxkit/support-apple-11-sdk.patch @@ -0,0 +1,811 @@ +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12.m b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12.m +index 567172ba2..e2c1ac047 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12.m ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12.m +@@ -8,6 +8,7 @@ + + bool vmCanStop(void *machine, void *queue) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + __block BOOL result; + dispatch_sync((dispatch_queue_t)queue, ^{ +@@ -15,12 +16,13 @@ bool vmCanStop(void *machine, void *queue) + }); + return (bool)result; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void stopWithCompletionHandler(void *machine, void *queue, void *completionHandler) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + vm_completion_handler_t handler = makeVMCompletionHandler(completionHandler); + dispatch_sync((dispatch_queue_t)queue, ^{ +@@ -29,7 +31,7 @@ void stopWithCompletionHandler(void *machine, void *queue, void *completionHandl + Block_release(handler); + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -38,10 +40,11 @@ void stopWithCompletionHandler(void *machine, void *queue, void *completionHandl + */ + void *newVZGenericPlatformConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZGenericPlatformConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -51,11 +54,12 @@ void *newVZGenericPlatformConfiguration() + */ + void setDirectorySharingDevicesVZVirtualMachineConfiguration(void *config, void *directorySharingDevices) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setDirectorySharingDevices:[(NSMutableArray *)directorySharingDevices copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -66,11 +70,12 @@ void setDirectorySharingDevicesVZVirtualMachineConfiguration(void *config, void + */ + void setPlatformVZVirtualMachineConfiguration(void *config, void *platform) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setPlatform:(VZPlatformConfiguration *)platform]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -80,11 +85,12 @@ void setPlatformVZVirtualMachineConfiguration(void *config, void *platform) + */ + void setGraphicsDevicesVZVirtualMachineConfiguration(void *config, void *graphicsDevices) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setGraphicsDevices:[(NSMutableArray *)graphicsDevices copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -94,11 +100,12 @@ void setGraphicsDevicesVZVirtualMachineConfiguration(void *config, void *graphic + */ + void setPointingDevicesVZVirtualMachineConfiguration(void *config, void *pointingDevices) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setPointingDevices:[(NSMutableArray *)pointingDevices copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -108,11 +115,12 @@ void setPointingDevicesVZVirtualMachineConfiguration(void *config, void *pointin + */ + void setKeyboardsVZVirtualMachineConfiguration(void *config, void *keyboards) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setKeyboards:[(NSMutableArray *)keyboards copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -122,11 +130,12 @@ void setKeyboardsVZVirtualMachineConfiguration(void *config, void *keyboards) + */ + void setAudioDevicesVZVirtualMachineConfiguration(void *config, void *audioDevices) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config setAudioDevices:[(NSMutableArray *)audioDevices copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -136,10 +145,11 @@ void setAudioDevicesVZVirtualMachineConfiguration(void *config, void *audioDevic + */ + void *newVZVirtioSoundDeviceConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZVirtioSoundDeviceConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -148,11 +158,12 @@ void *newVZVirtioSoundDeviceConfiguration() + */ + void setStreamsVZVirtioSoundDeviceConfiguration(void *audioDeviceConfiguration, void *streams) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtioSoundDeviceConfiguration *)audioDeviceConfiguration setStreams:[(NSMutableArray *)streams copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -162,10 +173,11 @@ void setStreamsVZVirtioSoundDeviceConfiguration(void *audioDeviceConfiguration, + */ + void *newVZVirtioSoundDeviceInputStreamConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZVirtioSoundDeviceInputStreamConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -174,12 +186,13 @@ void *newVZVirtioSoundDeviceInputStreamConfiguration() + */ + void *newVZVirtioSoundDeviceHostInputStreamConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZVirtioSoundDeviceInputStreamConfiguration *inputStream = (VZVirtioSoundDeviceInputStreamConfiguration *)newVZVirtioSoundDeviceInputStreamConfiguration(); + [inputStream setSource:[[VZHostAudioInputStreamSource alloc] init]]; + return inputStream; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -189,10 +202,11 @@ void *newVZVirtioSoundDeviceHostInputStreamConfiguration() + */ + void *newVZVirtioSoundDeviceOutputStreamConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZVirtioSoundDeviceOutputStreamConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -201,12 +215,13 @@ void *newVZVirtioSoundDeviceOutputStreamConfiguration() + */ + void *newVZVirtioSoundDeviceHostOutputStreamConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZVirtioSoundDeviceOutputStreamConfiguration *outputStream = (VZVirtioSoundDeviceOutputStreamConfiguration *)newVZVirtioSoundDeviceOutputStreamConfiguration(); + [outputStream setSink:[[VZHostAudioOutputStreamSink alloc] init]]; + return outputStream; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -220,12 +235,13 @@ void *newVZVirtioSoundDeviceHostOutputStreamConfiguration() + */ + void *newVZSharedDirectory(const char *dirPath, bool readOnly) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + NSString *dirPathNSString = [NSString stringWithUTF8String:dirPath]; + NSURL *dirURL = [NSURL fileURLWithPath:dirPathNSString]; + return [[VZSharedDirectory alloc] initWithURL:dirURL readOnly:(BOOL)readOnly]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -237,10 +253,11 @@ void *newVZSharedDirectory(const char *dirPath, bool readOnly) + */ + void *newVZSingleDirectoryShare(void *sharedDirectory) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZSingleDirectoryShare alloc] initWithDirectory:(VZSharedDirectory *)sharedDirectory]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -252,10 +269,11 @@ void *newVZSingleDirectoryShare(void *sharedDirectory) + */ + void *newVZMultipleDirectoryShare(void *sharedDirectories) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMultipleDirectoryShare alloc] initWithDirectories:(NSDictionary<NSString *, VZSharedDirectory *> *)sharedDirectories]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -267,6 +285,7 @@ void *newVZMultipleDirectoryShare(void *sharedDirectories) + */ + void *newVZVirtioFileSystemDeviceConfiguration(const char *tag, void **error) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + NSString *tagNSString = [NSString stringWithUTF8String:tag]; + BOOL valid = [VZVirtioFileSystemDeviceConfiguration validateTag:tagNSString error:(NSError *_Nullable *_Nullable)error]; +@@ -275,7 +294,7 @@ void *newVZVirtioFileSystemDeviceConfiguration(const char *tag, void **error) + } + return [[VZVirtioFileSystemDeviceConfiguration alloc] initWithTag:tagNSString]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -284,11 +303,12 @@ void *newVZVirtioFileSystemDeviceConfiguration(const char *tag, void **error) + */ + void setVZVirtioFileSystemDeviceConfigurationShare(void *config, void *share) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtioFileSystemDeviceConfiguration *)config setShare:(VZDirectoryShare *)share]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -298,10 +318,11 @@ void setVZVirtioFileSystemDeviceConfigurationShare(void *config, void *share) + */ + void *newVZUSBScreenCoordinatePointingDeviceConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZUSBScreenCoordinatePointingDeviceConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -311,10 +332,11 @@ void *newVZUSBScreenCoordinatePointingDeviceConfiguration() + */ + void *newVZUSBKeyboardConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZUSBKeyboardConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -328,6 +350,7 @@ void sharedApplication() + + void startVirtualMachineWindow(void *machine, double width, double height) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + @autoreleasepool { + AppDelegate *appDelegate = [[[AppDelegate alloc] +@@ -340,5 +363,6 @@ void startVirtualMachineWindow(void *machine, double width, double height) + return; + } + } ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12_arm64.m b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12_arm64.m +index 4fbaf6cb7..452adb747 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12_arm64.m ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_12_arm64.m +@@ -30,6 +30,7 @@ + */ + void *newVZMacAuxiliaryStorageWithCreating(const char *storagePath, void *hardwareModel, void **error) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + NSString *storagePathNSString = [NSString stringWithUTF8String:storagePath]; + NSURL *storageURL = [NSURL fileURLWithPath:storagePathNSString]; +@@ -38,7 +39,7 @@ void *newVZMacAuxiliaryStorageWithCreating(const char *storagePath, void *hardwa + options:VZMacAuxiliaryStorageInitializationOptionAllowOverwrite + error:(NSError *_Nullable *_Nullable)error]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -49,6 +50,7 @@ void *newVZMacAuxiliaryStorageWithCreating(const char *storagePath, void *hardwa + */ + void *newVZMacAuxiliaryStorage(const char *storagePath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + NSString *storagePathNSString = [NSString stringWithUTF8String:storagePath]; + NSURL *storageURL = [NSURL fileURLWithPath:storagePathNSString]; +@@ -56,7 +58,7 @@ void *newVZMacAuxiliaryStorage(const char *storagePath) + // https://developer.apple.com/documentation/virtualization/vzmacauxiliarystorage?language=objc + return [[VZMacAuxiliaryStorage alloc] initWithContentsOfURL:storageURL]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -80,10 +82,11 @@ void *newVZMacAuxiliaryStorage(const char *storagePath) + */ + void *newVZMacPlatformConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMacPlatformConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -92,17 +95,19 @@ void *newVZMacPlatformConfiguration() + */ + void setHardwareModelVZMacPlatformConfiguration(void *config, void *hardwareModel) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZMacPlatformConfiguration *)config setHardwareModel:(VZMacHardwareModel *)hardwareModel]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + // Store the hardware model to disk so that we can retrieve them for subsequent boots. + void storeHardwareModelDataVZMacPlatformConfiguration(void *config, const char *filePath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacPlatformConfiguration *macPlatformConfiguration = (VZMacPlatformConfiguration *)config; + NSString *filePathNSString = [NSString stringWithUTF8String:filePath]; +@@ -110,7 +115,7 @@ void storeHardwareModelDataVZMacPlatformConfiguration(void *config, const char * + [macPlatformConfiguration.hardwareModel.dataRepresentation writeToURL:fileURL atomically:YES]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -121,17 +126,19 @@ void storeHardwareModelDataVZMacPlatformConfiguration(void *config, const char * + */ + void setMachineIdentifierVZMacPlatformConfiguration(void *config, void *machineIdentifier) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZMacPlatformConfiguration *)config setMachineIdentifier:(VZMacMachineIdentifier *)machineIdentifier]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + // Store the machine identifier to disk so that we can retrieve them for subsequent boots. + void storeMachineIdentifierDataVZMacPlatformConfiguration(void *config, const char *filePath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacPlatformConfiguration *macPlatformConfiguration = (VZMacPlatformConfiguration *)config; + NSString *filePathNSString = [NSString stringWithUTF8String:filePath]; +@@ -139,7 +146,7 @@ void storeMachineIdentifierDataVZMacPlatformConfiguration(void *config, const ch + [macPlatformConfiguration.machineIdentifier.dataRepresentation writeToURL:fileURL atomically:YES]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -151,11 +158,12 @@ void storeMachineIdentifierDataVZMacPlatformConfiguration(void *config, const ch + */ + void setAuxiliaryStorageVZMacPlatformConfiguration(void *config, void *auxiliaryStorage) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZMacPlatformConfiguration *)config setAuxiliaryStorage:(VZMacAuxiliaryStorage *)auxiliaryStorage]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -169,10 +177,11 @@ void setAuxiliaryStorageVZMacPlatformConfiguration(void *config, void *auxiliary + */ + void *newVZMacOSBootLoader() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMacOSBootLoader alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -182,10 +191,11 @@ void *newVZMacOSBootLoader() + */ + void *newVZMacGraphicsDeviceConfiguration() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMacGraphicsDeviceConfiguration alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -194,11 +204,12 @@ void *newVZMacGraphicsDeviceConfiguration() + */ + void setDisplaysVZMacGraphicsDeviceConfiguration(void *graphicsConfiguration, void *displays) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZMacGraphicsDeviceConfiguration *)graphicsConfiguration setDisplays:[(NSMutableArray *)displays copy]]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -210,13 +221,14 @@ void setDisplaysVZMacGraphicsDeviceConfiguration(void *graphicsConfiguration, vo + */ + void *newVZMacGraphicsDisplayConfiguration(NSInteger widthInPixels, NSInteger heightInPixels, NSInteger pixelsPerInch) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMacGraphicsDisplayConfiguration alloc] + initWithWidthInPixels:widthInPixels + heightInPixels:heightInPixels + pixelsPerInch:pixelsPerInch]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -226,6 +238,7 @@ void *newVZMacGraphicsDisplayConfiguration(NSInteger widthInPixels, NSInteger he + */ + void *newVZMacHardwareModelWithPath(const char *hardwareModelPath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacHardwareModel *hardwareModel; + NSString *hardwareModelPathNSString = [NSString stringWithUTF8String:hardwareModelPath]; +@@ -236,12 +249,13 @@ void *newVZMacHardwareModelWithPath(const char *hardwareModelPath) + } + return hardwareModel; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void *newVZMacHardwareModelWithBytes(void *hardwareModelBytes, int len) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacHardwareModel *hardwareModel; + @autoreleasepool { +@@ -250,7 +264,7 @@ void *newVZMacHardwareModelWithBytes(void *hardwareModelBytes, int len) + } + return hardwareModel; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -259,10 +273,11 @@ void *newVZMacHardwareModelWithBytes(void *hardwareModelBytes, int len) + */ + void *newVZMacMachineIdentifier() + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[VZMacMachineIdentifier alloc] init]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -274,6 +289,7 @@ void *newVZMacMachineIdentifier() + */ + void *newVZMacMachineIdentifierWithPath(const char *machineIdentifierPath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacMachineIdentifier *machineIdentifier; + NSString *machineIdentifierPathNSString = [NSString stringWithUTF8String:machineIdentifierPath]; +@@ -284,12 +300,13 @@ void *newVZMacMachineIdentifierWithPath(const char *machineIdentifierPath) + } + return machineIdentifier; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void *newVZMacMachineIdentifierWithBytes(void *machineIdentifierBytes, int len) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacMachineIdentifier *machineIdentifier; + @autoreleasepool { +@@ -298,12 +315,13 @@ void *newVZMacMachineIdentifierWithBytes(void *machineIdentifierBytes, int len) + } + return machineIdentifier; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + nbyteslice getVZMacMachineIdentifierDataRepresentation(void *machineIdentifierPtr) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacMachineIdentifier *machineIdentifier = (VZMacMachineIdentifier *)machineIdentifierPtr; + NSData *data = [machineIdentifier dataRepresentation]; +@@ -313,12 +331,13 @@ nbyteslice getVZMacMachineIdentifierDataRepresentation(void *machineIdentifierPt + }; + return ret; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + VZMacOSRestoreImageStruct convertVZMacOSRestoreImage2Struct(void *restoreImagePtr) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacOSRestoreImage *restoreImage = (VZMacOSRestoreImage *)restoreImagePtr; + VZMacOSRestoreImageStruct ret; +@@ -329,12 +348,13 @@ VZMacOSRestoreImageStruct convertVZMacOSRestoreImage2Struct(void *restoreImagePt + ret.mostFeaturefulSupportedConfiguration = (void *)CFBridgingRetain([restoreImage mostFeaturefulSupportedConfiguration]); + return ret; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void fetchLatestSupportedMacOSRestoreImageWithCompletionHandler(void *cgoHandler) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [VZMacOSRestoreImage fetchLatestSupportedWithCompletionHandler:^(VZMacOSRestoreImage *restoreImage, NSError *error) { + VZMacOSRestoreImageStruct restoreImageStruct = convertVZMacOSRestoreImage2Struct(restoreImage); +@@ -342,12 +362,13 @@ void fetchLatestSupportedMacOSRestoreImageWithCompletionHandler(void *cgoHandler + }]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void loadMacOSRestoreImageFile(const char *ipswPath, void *cgoHandler) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + NSString *ipswPathNSString = [NSString stringWithUTF8String:ipswPath]; + NSURL *ipswURL = [NSURL fileURLWithPath:ipswPathNSString]; +@@ -358,12 +379,13 @@ void loadMacOSRestoreImageFile(const char *ipswPath, void *cgoHandler) + }]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + VZMacOSConfigurationRequirementsStruct convertVZMacOSConfigurationRequirements2Struct(void *requirementsPtr) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacOSConfigurationRequirements *requirements = (VZMacOSConfigurationRequirements *)requirementsPtr; + VZMacOSConfigurationRequirementsStruct ret; +@@ -373,12 +395,13 @@ VZMacOSConfigurationRequirementsStruct convertVZMacOSConfigurationRequirements2S + ret.hardwareModel = (void *)CFBridgingRetain([requirements hardwareModel]); + return ret; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + VZMacHardwareModelStruct convertVZMacHardwareModel2Struct(void *hardwareModelPtr) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacHardwareModel *hardwareModel = (VZMacHardwareModel *)hardwareModelPtr; + VZMacHardwareModelStruct ret; +@@ -391,7 +414,7 @@ VZMacHardwareModelStruct convertVZMacHardwareModel2Struct(void *hardwareModelPtr + ret.dataRepresentation = retByteSlice; + return ret; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -405,6 +428,7 @@ VZMacHardwareModelStruct convertVZMacHardwareModel2Struct(void *hardwareModelPtr + */ + void *newVZMacOSInstaller(void *virtualMachine, void *vmQueue, const char *restoreImageFilePath) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + __block VZMacOSInstaller *ret; + NSString *restoreImageFilePathNSString = [NSString stringWithUTF8String:restoreImageFilePath]; +@@ -414,7 +438,7 @@ void *newVZMacOSInstaller(void *virtualMachine, void *vmQueue, const char *resto + }); + return ret; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -425,6 +449,7 @@ void *newProgressObserverVZMacOSInstaller() + + void installByVZMacOSInstaller(void *installerPtr, void *vmQueue, void *progressObserverPtr, void *completionHandler, void *fractionCompletedHandler) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacOSInstaller *installer = (VZMacOSInstaller *)installerPtr; + dispatch_sync((dispatch_queue_t)vmQueue, ^{ +@@ -439,12 +464,13 @@ void installByVZMacOSInstaller(void *installerPtr, void *vmQueue, void *progress + }); + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + + void cancelInstallVZMacOSInstaller(void *installerPtr) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + VZMacOSInstaller *installer = (VZMacOSInstaller *)installerPtr; + if (installer.progress.cancellable) { +@@ -452,7 +478,7 @@ void cancelInstallVZMacOSInstaller(void *installerPtr) + } + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_debug.m b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_debug.m +index 67fe356ae..af81a46b0 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_debug.m ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_debug.m +@@ -12,10 +12,11 @@ + */ + void *newVZGDBDebugStubConfiguration(uint32_t port) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + return [[_VZGDBDebugStubConfiguration alloc] initWithPort:(NSInteger)port]; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } + +@@ -24,10 +25,11 @@ void *newVZGDBDebugStubConfiguration(uint32_t port) + */ + void setDebugStubVZVirtualMachineConfiguration(void *config, void *debugStub) + { ++#ifdef INCLUDE_TARGET_OSX_12 + if (@available(macOS 12, *)) { + [(VZVirtualMachineConfiguration *)config _setDebugStub:(_VZDebugStubConfiguration *)debugStub]; + return; + } +- ++#endif + RAISE_UNSUPPORTED_MACOS_EXCEPTION(); + } +\ No newline at end of file +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_helper.h b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_helper.h +index 995b40882..9da0700b9 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_helper.h ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_helper.h +@@ -18,6 +18,13 @@ NSDictionary *dumpProcessinfo(); + __builtin_unreachable(); \ + } while (0) + ++// for macOS 12 API ++#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000 ++#define INCLUDE_TARGET_OSX_12 1 ++#else ++#pragma message("macOS 12 API has been disabled") ++#endif ++ + // for macOS 12.3 API + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120300 + #define INCLUDE_TARGET_OSX_12_3 1 +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.h b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.h +index ab00b9225..15d306f66 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.h ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.h +@@ -23,9 +23,11 @@ + - (instancetype)init; + @end + ++#ifdef INCLUDE_TARGET_OSX_12 + API_AVAILABLE(macos(12.0)) + @interface AppDelegate : NSObject <NSApplicationDelegate, NSWindowDelegate, VZVirtualMachineDelegate> + - (instancetype)initWithVirtualMachine:(VZVirtualMachine *)virtualMachine + windowWidth:(CGFloat)windowWidth + windowHeight:(CGFloat)windowHeight; +-@end +\ No newline at end of file ++@end ++#endif +\ No newline at end of file +diff --git a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.m b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.m +index 9031c44f1..33b20d91b 100644 +--- a/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.m ++++ b/src/cmd/linuxkit/vendor/github.com/Code-Hex/vz/v3/virtualization_view.m +@@ -165,6 +165,7 @@ + + @end + ++#ifdef INCLUDE_TARGET_OSX_12 + @implementation AppDelegate { + VZVirtualMachine *_virtualMachine; + VZVirtualMachineView *_virtualMachineView; +@@ -372,3 +373,4 @@ + [aboutPanel makeKeyAndOrderFront:nil]; + } + @end ++#endif diff --git a/nixpkgs/pkgs/development/tools/misc/loccount/default.nix b/nixpkgs/pkgs/development/tools/misc/loccount/default.nix new file mode 100644 index 000000000000..d51cec639c1d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/loccount/default.nix @@ -0,0 +1,45 @@ +{ lib, buildGoModule, fetchFromGitLab, python3 }: +buildGoModule rec { + pname = "loccount"; + version = "2.15"; + + src = fetchFromGitLab { + owner = "esr"; + repo = "loccount"; + rev = version; + hash = "sha256-IRDwxz/InF4okyfAzbK0PzZz+HMUwv5LgRthUUy3rus="; + }; + + vendorHash = null; + + excludedPackages = "tests"; + + nativeBuildInputs = [ python3 ]; + + ldflags = [ "-s" "-w" ]; + + preBuild = '' + patchShebangs --build tablegen.py + + go generate + ''; + + meta = with lib; { + description = "Re-implementation of sloccount in Go"; + longDescription = '' + loccount is a re-implementation of David A. Wheeler's sloccount tool + in Go. It is faster and handles more different languages. Because + it's one source file in Go, it is easier to maintain and extend than the + multi-file, multi-language implementation of the original. + + The algorithms are largely unchanged and can be expected to produce + identical numbers for languages supported by both tools. Python is + an exception; loccount corrects buggy counting of single-quote multiline + literals in sloccount 2.26. + ''; + homepage = "https://gitlab.com/esr/loccount"; + downloadPage = "https://gitlab.com/esr/loccount/tree/master"; + license = licenses.bsd2; + maintainers = with maintainers; [ calvertvl ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/lsof/default.nix b/nixpkgs/pkgs/development/tools/misc/lsof/default.nix new file mode 100644 index 000000000000..2faefedd6656 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lsof/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv, fetchFromGitHub, buildPackages, perl, which, ncurses }: + +let + dialect = with lib; last (splitString "-" stdenv.hostPlatform.system); +in + +stdenv.mkDerivation rec { + pname = "lsof"; + version = "4.98.0"; + + src = fetchFromGitHub { + owner = "lsof-org"; + repo = "lsof"; + rev = version; + sha256 = "sha256-DQLY0a0sOCZFEJA4Y4b18OcWZw47RyqKZ0mVG0CDVTI="; + }; + + patches = [ + ./no-build-info.patch + ]; + + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1 + '' + lib.optionalString stdenv.isDarwin '' + sed -i 's|lcurses|lncurses|g' Configure + ''; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ perl which ]; + buildInputs = [ ncurses ]; + + # Stop build scripts from searching global include paths + LSOF_INCLUDE = "${lib.getDev stdenv.cc.libc}/include"; + configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}"; + + preBuild = '' + for filepath in $(find dialects/${dialect} -type f); do + sed -i "s,/usr/include,$LSOF_INCLUDE,g" $filepath + done + ''; + + installPhase = '' + # Fix references from man page https://github.com/lsof-org/lsof/issues/66 + substituteInPlace Lsof.8 \ + --replace ".so ./00DIALECTS" "" \ + --replace ".so ./version" ".ds VN ${version}" + mkdir -p $out/bin $out/man/man8 + cp Lsof.8 $out/man/man8/lsof.8 + cp lsof $out/bin + ''; + + meta = with lib; { + homepage = "https://github.com/lsof-org/lsof"; + description = "A tool to list open files"; + longDescription = '' + List open files. Can show what process has opened some file, + socket (IPv6/IPv4/UNIX local), or partition (by opening a file + from it). + ''; + license = licenses.purdueBsd; + maintainers = with maintainers; [ dezgeg ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/lsof/no-build-info.patch b/nixpkgs/pkgs/development/tools/misc/lsof/no-build-info.patch new file mode 100644 index 000000000000..3c518896b045 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lsof/no-build-info.patch @@ -0,0 +1,40 @@ +--- a/usage.c ++++ b/usage.c +@@ -931,24 +931,6 @@ usage(err, fh, version) + (void) fprintf(stderr, " configuration info: %s\n", cp); + #endif /* defined(LSOF_CINFO) */ + +- cp = isnullstr(LSOF_HOST); +- if (!(cp1 = isnullstr(LSOF_LOGNAME))) +- cp1 = isnullstr(LSOF_USER); +- if (cp || cp1) { +- if (cp && cp1) +- cp2 = "by and on"; +- else if (cp) +- cp2 = "on"; +- else +- cp2 = "by"; +- (void) fprintf(stderr, " constructed %s: %s%s%s\n", +- cp2, +- cp1 ? cp1 : "", +- (cp && cp1) ? "@" : "", +- cp ? cp : "" +- ); +- } +- + #if defined(LSOF_BLDCMT) + if ((cp = isnullstr(LSOF_BLDCMT))) + (void) fprintf(stderr, " builder's comment: %s\n", cp); +@@ -958,12 +940,6 @@ usage(err, fh, version) + (void) fprintf(stderr, " compiler: %s\n", cp); + if ((cp = isnullstr(LSOF_CCV))) + (void) fprintf(stderr, " compiler version: %s\n", cp); +- if ((cp = isnullstr(LSOF_CCFLAGS))) +- (void) fprintf(stderr, " compiler flags: %s\n", cp); +- if ((cp = isnullstr(LSOF_LDFLAGS))) +- (void) fprintf(stderr, " loader flags: %s\n", cp); +- if ((cp = isnullstr(LSOF_SYSINFO))) +- (void) fprintf(stderr, " system info: %s\n", cp); + // display configurations that might affect output + char *features[] = { + #if defined(HASEFFNLINK) diff --git a/nixpkgs/pkgs/development/tools/misc/ltrace/default.nix b/nixpkgs/pkgs/development/tools/misc/ltrace/default.nix new file mode 100644 index 000000000000..9114e7cf4cef --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ltrace/default.nix @@ -0,0 +1,63 @@ +{ lib, stdenv, fetchurl, fetchgit, autoreconfHook, dejagnu, elfutils }: + +stdenv.mkDerivation rec { + pname = "ltrace"; + version = "0.7.91"; + + src = fetchurl { + url = "https://src.fedoraproject.org/repo/pkgs/ltrace/ltrace-0.7.91.tar.bz2/9db3bdee7cf3e11c87d8cc7673d4d25b/ltrace-0.7.91.tar.bz2"; + sha256 = "sha256-HqellbKh2ZDHxslXl7SSIXtpjV1sodtgVwh8hgTC3Dc="; + }; + + nativeBuildInputs = [ autoreconfHook ]; # Some patches impact ./configure. + buildInputs = [ elfutils ]; + nativeCheckInputs = [ dejagnu ]; + + # Import Fedora's (very) large patch series: bug fixes, architecture support, + # etc. RH/Fedora are currently working with upstream to merge all these + # patches for the next major branch. + prePatch = let + fedora = fetchgit { + url = "https://src.fedoraproject.org/rpms/ltrace.git"; + rev = "00f430ccbebdbd13bdd4d7ee6303b091cf005542"; + sha256 = "sha256-FBGEgmaslu7xrJtZ2WsYwu9Cw1ZQrWRV1+Eu9qLXO4s="; + }; + in '' + # Order matters, read the patch list from the RPM spec. Our own patches + # are applied on top of the Fedora baseline. + fedorapatches="" + for p in $(grep '^Patch[0-9]\+:' ${fedora}/ltrace.spec | awk '{ print $2 }'); do + fedorapatches="$fedorapatches ${fedora}/$p" + done + patches="$fedorapatches $patches" + ''; + + # Cherry-pick extra patches for recent glibc support in the test suite. + patches = [ + # https://gitlab.com/cespedes/ltrace/-/merge_requests/14 + ./testsuite-newfstatat.patch + # https://gitlab.com/cespedes/ltrace/-/merge_requests/15 + ./sysdeps-x86.patch + ]; + + doCheck = true; + checkPhase = '' + # Hardening options interfere with some of the low-level expectations in + # the test suite (e.g. printf ends up redirected to __printf_chk). + NIX_HARDENING_ENABLE="" \ + # Disable test that requires ptrace-ing a non-child process, this might be + # forbidden by YAMA ptrace policy on the build host. + RUNTESTFLAGS="--host=${stdenv.hostPlatform.config} \ + --target=${stdenv.targetPlatform.config} \ + --ignore attach-process.exp" \ + make check + ''; + + meta = with lib; { + description = "Library call tracer"; + homepage = "https://www.ltrace.org/"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ delroth ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ltrace/sysdeps-x86.patch b/nixpkgs/pkgs/development/tools/misc/ltrace/sysdeps-x86.patch new file mode 100644 index 000000000000..63ae8ad94813 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ltrace/sysdeps-x86.patch @@ -0,0 +1,328 @@ +diff --git a/sysdeps/linux-gnu/x86/syscallent.h b/sysdeps/linux-gnu/x86/syscallent.h +index 345fe20..66ac522 100644 +--- a/sysdeps/linux-gnu/x86/syscallent.h ++++ b/sysdeps/linux-gnu/x86/syscallent.h +@@ -238,7 +238,7 @@ + "setfsgid32", /* 216 */ + "pivot_root", /* 217 */ + "mincore", /* 218 */ +- "madvise1", /* 219 */ ++ "madvise", /* 219 */ + "getdents64", /* 220 */ + "fcntl64", /* 221 */ + "222", /* 222 */ +@@ -279,14 +279,14 @@ + "remap_file_pages", /* 257 */ + "set_tid_address", /* 258 */ + "timer_create", /* 259 */ +- "260", /* 260 */ +- "261", /* 261 */ +- "262", /* 262 */ +- "263", /* 263 */ +- "264", /* 264 */ +- "265", /* 265 */ +- "266", /* 266 */ +- "267", /* 267 */ ++ "timer_settime", /* 260 */ ++ "timer_gettime", /* 261 */ ++ "timer_getoverrun", /* 262 */ ++ "timer_delete", /* 263 */ ++ "clock_settime", /* 264 */ ++ "clock_gettime", /* 265 */ ++ "clock_getres", /* 266 */ ++ "clock_nanosleep", /* 267 */ + "statfs64", /* 268 */ + "fstatfs64", /* 269 */ + "tgkill", /* 270 */ +@@ -297,11 +297,11 @@ + "get_mempolicy", /* 275 */ + "set_mempolicy", /* 276 */ + "mq_open", /* 277 */ +- "278", /* 278 */ +- "279", /* 279 */ +- "280", /* 280 */ +- "281", /* 281 */ +- "282", /* 282 */ ++ "mq_unlink", /* 278 */ ++ "mq_timedsend", /* 279 */ ++ "mq_timedreceive", /* 280 */ ++ "mq_notify", /* 281 */ ++ "mq_getsetattr", /* 282 */ + "kexec_load", /* 283 */ + "waitid", /* 284 */ + "285", /* 285 */ +@@ -368,3 +368,105 @@ + "setns", /* 346 */ + "process_vm_readv", /* 347 */ + "process_vm_writev", /* 348 */ ++ "kcmp", /* 349 */ ++ "finit_module", /* 350 */ ++ "sched_setattr", /* 351 */ ++ "sched_getattr", /* 352 */ ++ "renameat2", /* 353 */ ++ "seccomp", /* 354 */ ++ "getrandom", /* 355 */ ++ "memfd_create", /* 356 */ ++ "bpf", /* 357 */ ++ "execveat", /* 358 */ ++ "socket", /* 359 */ ++ "socketpair", /* 360 */ ++ "bind", /* 361 */ ++ "connect", /* 362 */ ++ "listen", /* 363 */ ++ "accept4", /* 364 */ ++ "getsockopt", /* 365 */ ++ "setsockopt", /* 366 */ ++ "getsockname", /* 367 */ ++ "getpeername", /* 368 */ ++ "sendto", /* 369 */ ++ "sendmsg", /* 370 */ ++ "recvfrom", /* 371 */ ++ "recvmsg", /* 372 */ ++ "shutdown", /* 373 */ ++ "userfaultfd", /* 374 */ ++ "membarrier", /* 375 */ ++ "mlock2", /* 376 */ ++ "copy_file_range", /* 377 */ ++ "preadv2", /* 378 */ ++ "pwritev2", /* 379 */ ++ "pkey_mprotect", /* 380 */ ++ "pkey_alloc", /* 381 */ ++ "pkey_free", /* 382 */ ++ "statx", /* 383 */ ++ "arch_prctl", /* 384 */ ++ "io_pgetevents", /* 385 */ ++ "rseq", /* 386 */ ++ "387", /* 387 */ ++ "388", /* 388 */ ++ "389", /* 389 */ ++ "390", /* 390 */ ++ "391", /* 391 */ ++ "392", /* 392 */ ++ "semget", /* 393 */ ++ "semctl", /* 394 */ ++ "shmget", /* 395 */ ++ "shmctl", /* 396 */ ++ "shmat", /* 397 */ ++ "shmdt", /* 398 */ ++ "msgget", /* 399 */ ++ "msgsnd", /* 400 */ ++ "msgrcv", /* 401 */ ++ "msgctl", /* 402 */ ++ "clock_gettime64", /* 403 */ ++ "clock_settime64", /* 404 */ ++ "clock_adjtime64", /* 405 */ ++ "clock_getres_time64", /* 406 */ ++ "clock_nanosleep_time64", /* 407 */ ++ "timer_gettime64", /* 408 */ ++ "timer_settime64", /* 409 */ ++ "timerfd_gettime64", /* 410 */ ++ "timerfd_settime64", /* 411 */ ++ "utimensat_time64", /* 412 */ ++ "pselect6_time64", /* 413 */ ++ "ppoll_time64", /* 414 */ ++ "415", /* 415 */ ++ "io_pgetevents_time64", /* 416 */ ++ "recvmmsg_time64", /* 417 */ ++ "mq_timedsend_time64", /* 418 */ ++ "mq_timedreceive_time64", /* 419 */ ++ "semtimedop_time64", /* 420 */ ++ "rt_sigtimedwait_time64", /* 421 */ ++ "futex_time64", /* 422 */ ++ "sched_rr_get_interval_time64", /* 423 */ ++ "pidfd_send_signal", /* 424 */ ++ "io_uring_setup", /* 425 */ ++ "io_uring_enter", /* 426 */ ++ "io_uring_register", /* 427 */ ++ "open_tree", /* 428 */ ++ "move_mount", /* 429 */ ++ "fsopen", /* 430 */ ++ "fsconfig", /* 431 */ ++ "fsmount", /* 432 */ ++ "fspick", /* 433 */ ++ "pidfd_open", /* 434 */ ++ "clone3", /* 435 */ ++ "close_range", /* 436 */ ++ "openat2", /* 437 */ ++ "pidfd_getfd", /* 438 */ ++ "faccessat2", /* 439 */ ++ "process_madvise", /* 440 */ ++ "epoll_pwait2", /* 441 */ ++ "mount_setattr", /* 442 */ ++ "quotactl_fd", /* 443 */ ++ "landlock_create_ruleset", /* 444 */ ++ "landlock_add_rule", /* 445 */ ++ "landlock_restrict_self", /* 446 */ ++ "memfd_secret", /* 447 */ ++ "process_mrelease", /* 448 */ ++ "futex_waitv", /* 449 */ ++ "set_mempolicy_home_node", /* 450 */ +diff --git a/sysdeps/linux-gnu/x86/syscallent1.h b/sysdeps/linux-gnu/x86/syscallent1.h +index 91ae8d6..f8b15f7 100644 +--- a/sysdeps/linux-gnu/x86/syscallent1.h ++++ b/sysdeps/linux-gnu/x86/syscallent1.h +@@ -36,8 +36,8 @@ + "rt_sigprocmask", /* 14 */ + "rt_sigreturn", /* 15 */ + "ioctl", /* 16 */ +- "pread", /* 17 */ +- "pwrite", /* 18 */ ++ "pread64", /* 17 */ ++ "pwrite64", /* 18 */ + "readv", /* 19 */ + "writev", /* 20 */ + "access", /* 21 */ +@@ -233,8 +233,8 @@ + "get_thread_area", /* 211 */ + "lookup_dcookie", /* 212 */ + "epoll_create", /* 213 */ +- "epoll_ctl", /* 214 */ +- "epoll_wait", /* 215 */ ++ "epoll_ctl_old", /* 214 */ ++ "epoll_wait_old", /* 215 */ + "remap_file_pages", /* 216 */ + "getdents64", /* 217 */ + "set_tid_address", /* 218 */ +@@ -331,3 +331,142 @@ + "getcpu", /* 309 */ + "process_vm_readv", /* 310 */ + "process_vm_writev", /* 311 */ ++ "kcmp", /* 312 */ ++ "finit_module", /* 313 */ ++ "sched_setattr", /* 314 */ ++ "sched_getattr", /* 315 */ ++ "renameat2", /* 316 */ ++ "seccomp", /* 317 */ ++ "getrandom", /* 318 */ ++ "memfd_create", /* 319 */ ++ "kexec_file_load", /* 320 */ ++ "bpf", /* 321 */ ++ "execveat", /* 322 */ ++ "userfaultfd", /* 323 */ ++ "membarrier", /* 324 */ ++ "mlock2", /* 325 */ ++ "copy_file_range", /* 326 */ ++ "preadv2", /* 327 */ ++ "pwritev2", /* 328 */ ++ "pkey_mprotect", /* 329 */ ++ "pkey_alloc", /* 330 */ ++ "pkey_free", /* 331 */ ++ "statx", /* 332 */ ++ "io_pgetevents", /* 333 */ ++ "rseq", /* 334 */ ++ "335", /* 335 */ ++ "336", /* 336 */ ++ "337", /* 337 */ ++ "338", /* 338 */ ++ "339", /* 339 */ ++ "340", /* 340 */ ++ "341", /* 341 */ ++ "342", /* 342 */ ++ "343", /* 343 */ ++ "344", /* 344 */ ++ "345", /* 345 */ ++ "346", /* 346 */ ++ "347", /* 347 */ ++ "348", /* 348 */ ++ "349", /* 349 */ ++ "350", /* 350 */ ++ "351", /* 351 */ ++ "352", /* 352 */ ++ "353", /* 353 */ ++ "354", /* 354 */ ++ "355", /* 355 */ ++ "356", /* 356 */ ++ "357", /* 357 */ ++ "358", /* 358 */ ++ "359", /* 359 */ ++ "360", /* 360 */ ++ "361", /* 361 */ ++ "362", /* 362 */ ++ "363", /* 363 */ ++ "364", /* 364 */ ++ "365", /* 365 */ ++ "366", /* 366 */ ++ "367", /* 367 */ ++ "368", /* 368 */ ++ "369", /* 369 */ ++ "370", /* 370 */ ++ "371", /* 371 */ ++ "372", /* 372 */ ++ "373", /* 373 */ ++ "374", /* 374 */ ++ "375", /* 375 */ ++ "376", /* 376 */ ++ "377", /* 377 */ ++ "378", /* 378 */ ++ "379", /* 379 */ ++ "380", /* 380 */ ++ "381", /* 381 */ ++ "382", /* 382 */ ++ "383", /* 383 */ ++ "384", /* 384 */ ++ "385", /* 385 */ ++ "386", /* 386 */ ++ "387", /* 387 */ ++ "388", /* 388 */ ++ "389", /* 389 */ ++ "390", /* 390 */ ++ "391", /* 391 */ ++ "392", /* 392 */ ++ "393", /* 393 */ ++ "394", /* 394 */ ++ "395", /* 395 */ ++ "396", /* 396 */ ++ "397", /* 397 */ ++ "398", /* 398 */ ++ "399", /* 399 */ ++ "400", /* 400 */ ++ "401", /* 401 */ ++ "402", /* 402 */ ++ "403", /* 403 */ ++ "404", /* 404 */ ++ "405", /* 405 */ ++ "406", /* 406 */ ++ "407", /* 407 */ ++ "408", /* 408 */ ++ "409", /* 409 */ ++ "410", /* 410 */ ++ "411", /* 411 */ ++ "412", /* 412 */ ++ "413", /* 413 */ ++ "414", /* 414 */ ++ "415", /* 415 */ ++ "416", /* 416 */ ++ "417", /* 417 */ ++ "418", /* 418 */ ++ "419", /* 419 */ ++ "420", /* 420 */ ++ "421", /* 421 */ ++ "422", /* 422 */ ++ "423", /* 423 */ ++ "pidfd_send_signal", /* 424 */ ++ "io_uring_setup", /* 425 */ ++ "io_uring_enter", /* 426 */ ++ "io_uring_register", /* 427 */ ++ "open_tree", /* 428 */ ++ "move_mount", /* 429 */ ++ "fsopen", /* 430 */ ++ "fsconfig", /* 431 */ ++ "fsmount", /* 432 */ ++ "fspick", /* 433 */ ++ "pidfd_open", /* 434 */ ++ "clone3", /* 435 */ ++ "close_range", /* 436 */ ++ "openat2", /* 437 */ ++ "pidfd_getfd", /* 438 */ ++ "faccessat2", /* 439 */ ++ "process_madvise", /* 440 */ ++ "epoll_pwait2", /* 441 */ ++ "mount_setattr", /* 442 */ ++ "quotactl_fd", /* 443 */ ++ "landlock_create_ruleset", /* 444 */ ++ "landlock_add_rule", /* 445 */ ++ "landlock_restrict_self", /* 446 */ ++ "memfd_secret", /* 447 */ ++ "process_mrelease", /* 448 */ ++ "futex_waitv", /* 449 */ ++ "set_mempolicy_home_node", /* 450 */ diff --git a/nixpkgs/pkgs/development/tools/misc/ltrace/testsuite-newfstatat.patch b/nixpkgs/pkgs/development/tools/misc/ltrace/testsuite-newfstatat.patch new file mode 100644 index 000000000000..17165be495bf --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ltrace/testsuite-newfstatat.patch @@ -0,0 +1,13 @@ +diff --git a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp +index 1b64cb0..af19916 100644 +--- a/testsuite/ltrace.main/system_calls.exp ++++ b/testsuite/ltrace.main/system_calls.exp +@@ -133,7 +133,7 @@ Match [Diff [Calls [ltraceRun -L -S -- $bin]] \ + { {^write$} == 1 } + { {^unlink(at)?$} >= 2 } + { {^open(at)?$} == 1 } +- { {^(new|f)?stat(64)?$} >= 1 } ++ { {^(new)?f?statx?(at)?(64)?$} >= 1 } + { {^close$} == 1 } + { {^getcwd$} == 1 } + { {^chdir$} == 1 } diff --git a/nixpkgs/pkgs/development/tools/misc/lttng-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/lttng-tools/default.nix new file mode 100644 index 000000000000..b3660f7cad9b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lttng-tools/default.nix @@ -0,0 +1,25 @@ +{ lib, stdenv, fetchurl, pkg-config, popt, libuuid, liburcu, lttng-ust, kmod, libxml2 }: + +stdenv.mkDerivation rec { + pname = "lttng-tools"; + version = "2.13.11"; + + src = fetchurl { + url = "https://lttng.org/files/lttng-tools/${pname}-${version}.tar.bz2"; + sha256 = "sha256-rFuu75+mkJNrHKAezRdC2nYsLAhRH/G06SOTjZTQ+Xk="; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ popt libuuid liburcu lttng-ust libxml2 kmod ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Tracing tools (kernel + user space) for Linux"; + homepage = "https://lttng.org/"; + license = with licenses; [ lgpl21Only gpl2Only ]; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/lttng-ust/2.12.nix b/nixpkgs/pkgs/development/tools/misc/lttng-ust/2.12.nix new file mode 100644 index 000000000000..b3ef1fe65e7f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lttng-ust/2.12.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "2.12.2"; + sha256 = "sha256-vNDwZLbKiMcthOdg6sNHKuXIKEEcY0Q1kivun841n8c="; +} diff --git a/nixpkgs/pkgs/development/tools/misc/lttng-ust/default.nix b/nixpkgs/pkgs/development/tools/misc/lttng-ust/default.nix new file mode 100644 index 000000000000..3bace16de56d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lttng-ust/default.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "2.13.1"; + sha256 = "sha256-Vme/Amnh5i4tnLl0xFb/huBAG9eqO/yNX9uXIzJJ7dw="; +} diff --git a/nixpkgs/pkgs/development/tools/misc/lttng-ust/generic.nix b/nixpkgs/pkgs/development/tools/misc/lttng-ust/generic.nix new file mode 100644 index 000000000000..56ad3b19e520 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lttng-ust/generic.nix @@ -0,0 +1,48 @@ +{ version, sha256 }: + +{ lib, stdenv, fetchurl, pkg-config, liburcu, numactl, python3 }: + +# NOTE: +# ./configure ... +# [...] +# LTTng-UST will be built with the following options: +# +# Java support (JNI): Disabled +# sdt.h integration: Disabled +# [...] +# +# Debian builds with std.h (systemtap). + +stdenv.mkDerivation rec { + pname = "lttng-ust"; + inherit version; + + src = fetchurl { + url = "https://lttng.org/files/lttng-ust/${pname}-${version}.tar.bz2"; + inherit sha256; + }; + + outputs = [ "bin" "out" "dev" "devdoc" ]; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ numactl python3 ]; + + preConfigure = '' + patchShebangs . + ''; + + configureFlags = [ "--disable-examples" ]; + + propagatedBuildInputs = [ liburcu ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "LTTng Userspace Tracer libraries"; + homepage = "https://lttng.org/"; + license = with licenses; [ lgpl21Only gpl2Only mit ]; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/lttv/default.nix b/nixpkgs/pkgs/development/tools/misc/lttv/default.nix new file mode 100644 index 000000000000..1e89be8a0c22 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/lttv/default.nix @@ -0,0 +1,25 @@ +{ lib, stdenv, fetchurl, pkg-config, glib, gtk2, popt, babeltrace }: + +stdenv.mkDerivation rec { + pname = "lttv"; + version = "1.5"; + + src = fetchurl { + url = "https://lttng.org/files/packages/${pname}-${version}.tar.bz2"; + sha256 = "1faldxnh9dld5k0vxckwpqw241ya1r2zv286l6rpgqr500zqw7r1"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ glib gtk2 popt babeltrace ]; + + meta = with lib; { + description = "Graphical trace viewer for LTTng trace files"; + homepage = "https://lttng.org/"; + # liblttvtraceread (ltt/ directory) is distributed under the GNU LGPL v2.1. + # The rest of the LTTV package is distributed under the GNU GPL v2. + license = with licenses; [ gpl2 lgpl21 ]; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; + +} diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.7.0.patch b/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.7.0.patch new file mode 100644 index 000000000000..3252e6ae7b4f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.7.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua +index 535bd69..b017161 100644 +--- a/src/luarocks/core/cfg.lua ++++ b/src/luarocks/core/cfg.lua +@@ -436,7 +436,7 @@ local function make_defaults(lua_version, target_cpu, platforms, home) + defaults.external_lib_extension = "dylib" + defaults.arch = "macosx-"..target_cpu + defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" +- local version = util.popen_read("sw_vers -productVersion") ++ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "@darwinMinVersion@" + if not (version:match("^%d+%.%d+%.%d+$") or version:match("^%d+%.%d+$")) then + version = "10.3" + end +@@ -448,8 +448,8 @@ local function make_defaults(lua_version, target_cpu, platforms, home) + else + defaults.gcc_rpath = false + end +- defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" +- defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." gcc" ++ defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." clang" ++ defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET="..tostring(version).." clang" + defaults.web_browser = "open" + end + diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix b/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix new file mode 100644 index 000000000000..c8d36a1e3313 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix @@ -0,0 +1,117 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, curl +, makeWrapper +, which +, unzip +, lua +, file +, nix-prefetch-git + # for 'luarocks pack' +, zip +, nix-update-script + # some packages need to be compiled with cmake +, cmake +, installShellFiles +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "luarocks"; + version = "3.9.1"; + + src = fetchFromGitHub { + owner = "luarocks"; + repo = "luarocks"; + rev = "v${finalAttrs.version}"; + sha256 = "sha256-G6HDap3pspeQtGDBq+ukN7kftDaT/CozMVdYM60F6HI="; + }; + + patches = [ + ./darwin-3.7.0.patch + # follow standard environmental variables + # https://github.com/luarocks/luarocks/pull/1433 + (fetchpatch { + url = "https://github.com/luarocks/luarocks/commit/d719541577a89909185aa8de7a33cf73b7a63ac3.diff"; + sha256 = "sha256-rMnhZFqLEul0wnsxvw9nl6JXVanC5QgOZ+I/HJ0vRCM="; + }) + ]; + + postPatch = lib.optionalString stdenv.targetPlatform.isDarwin '' + substituteInPlace src/luarocks/core/cfg.lua --subst-var-by 'darwinMinVersion' '${stdenv.targetPlatform.darwinMinVersion}' + ''; + + # Manually written ./configure does not support --build= or --host=: + # Error: Unknown flag: --build=x86_64-unknown-linux-gnu + configurePlatforms = [ ]; + + preConfigure = '' + lua -e "" || { + luajit -e "" && { + export LUA_SUFFIX=jit + configureFlags="$configureFlags --lua-suffix=$LUA_SUFFIX" + } + } + lua_inc="$(echo "${lua}/include"/*/)" + if test -n "$lua_inc"; then + configureFlags="$configureFlags --with-lua-include=$lua_inc" + fi + ''; + + nativeBuildInputs = [ makeWrapper installShellFiles lua unzip ]; + + buildInputs = [ curl which ]; + + postInstall = '' + sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/* + substituteInPlace $out/etc/luarocks/* \ + --replace '${lua.luaOnBuild}' '${lua}' + + for i in "$out"/bin/*; do + test -L "$i" || { + wrapProgram "$i" \ + --suffix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?.lua" \ + --suffix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \ + --suffix LUA_CPATH ";" "$(echo "$out"/lib/lua/*/)?.so" \ + --suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \ + --suffix PATH : ${lib.makeBinPath ([ unzip ] ++ + lib.optionals (finalAttrs.pname == "luarocks-nix") [ file nix-prefetch-git ])} + } + done + '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd luarocks \ + --bash <($out/bin/luarocks completion bash) \ + --fish <($out/bin/luarocks completion fish) \ + --zsh <($out/bin/luarocks completion zsh) + ''; + + propagatedBuildInputs = [ zip unzip cmake ]; + + # unpack hook for src.rock and rockspec files + setupHook = ./setup-hook.sh; + + # cmake is just to compile packages with "cmake" buildType, not luarocks itself + dontUseCmakeConfigure = true; + + shellHook = '' + export PATH="src/bin:''${PATH:-}" + export LUA_PATH="src/?.lua;''${LUA_PATH:-}" + ''; + + disallowedReferences = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + lua.luaOnBuild + ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = with lib; { + description = "A package manager for Lua"; + license = licenses.mit; + maintainers = with maintainers; [ raskin teto ]; + platforms = platforms.linux ++ platforms.darwin; + downloadPage = "http://luarocks.org/releases/"; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/luarocks-nix.nix b/nixpkgs/pkgs/development/tools/misc/luarocks/luarocks-nix.nix new file mode 100644 index 000000000000..941a582cead0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/luarocks-nix.nix @@ -0,0 +1,23 @@ +{ luarocks, fetchFromGitHub, unstableGitUpdater }: + +luarocks.overrideAttrs (old: { + pname = "luarocks-nix"; + version = "unstable-2023-02-26"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "luarocks-nix"; + rev = "4cfea3d5d826db4cfbc809ef8bb5f0a9f3a18919"; + sha256 = "sha256-7L8B+/C7Kzt25Ec+OsM2rliYB2/wyZQ3OT63V7AaOxo="; + }; + + patches = [ ]; + + passthru = { + updateScript = unstableGitUpdater { }; + }; + + meta = old.meta // { + mainProgram = "luarocks"; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/setup-hook.sh b/nixpkgs/pkgs/development/tools/misc/luarocks/setup-hook.sh new file mode 100644 index 000000000000..587d5413c3ed --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/setup-hook.sh @@ -0,0 +1,16 @@ +unpackCmdHooks+=(_trySourceRock) +unpackCmdHooks+=(_tryRockSpec) + +_tryRockSpec() { + if ! [[ "$curSrc" =~ \.rockspec$ ]]; then return 1; fi +} + +_trySourceRock() { + if ! [[ "$curSrc" =~ \.src.rock$ ]]; then return 1; fi + + # luarocks expects a clean <name>.rock.spec name to be the package name + # so we have to strip the hash + renamed="$(stripHash $curSrc)" + cp "$curSrc" "$renamed" + luarocks unpack --force "$renamed" +} diff --git a/nixpkgs/pkgs/development/tools/misc/macdylibbundler/default.nix b/nixpkgs/pkgs/development/tools/misc/macdylibbundler/default.nix new file mode 100644 index 000000000000..504b79c50048 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/macdylibbundler/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, makeWrapper, fetchFromGitHub, cctools }: + +stdenv.mkDerivation rec { + pname = "macdylibbundler"; + version = "1.0.4"; + + src = fetchFromGitHub { + owner = "auriamg"; + repo = "macdylibbundler"; + rev = version; + sha256 = "0j4ij48jf5izgymzxxaakf6vc50w9q0761yir6nfj1n6qlnrlidf"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + postInstall = '' + wrapProgram $out/bin/dylibbundler \ + --prefix PATH ":" "${cctools}/bin" + ''; + + meta = with lib; { + description = "Utility to ease bundling libraries into executables for OSX"; + longDescription = '' + dylibbundler is a small command-line programs that aims to make bundling + .dylibs as easy as possible. It automatically determines which dylibs are + needed by your program, copies these libraries inside the app bundle, and + fixes both them and the executable to be ready for distribution... all + this with a single command on the teminal! It will also work if your + program uses plug-ins that have dependencies too. + ''; + homepage = "https://github.com/auriamg/macdylibbundler"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.nomeata ]; + + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/mdctags/default.nix b/nixpkgs/pkgs/development/tools/misc/mdctags/default.nix new file mode 100644 index 000000000000..7d8992b4e201 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mdctags/default.nix @@ -0,0 +1,22 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage { + pname = "mdctags"; + version = "unstable-2020-06-11"; # v0.1.0 does not build with our rust version + + src = fetchFromGitHub { + owner = "wsdjeg"; + repo = "mdctags.rs"; + rev = "0ed9736ea0c77e6ff5b560dda46f5ed0a983ed82"; + sha256 = "14gryhgh9czlkfk75ml0620c6v8r74i6h3ykkkmc7gx2z8h1jxrb"; + }; + + cargoSha256 = "1kdbrcpvxiq91m5vq33vzjhsp4j3flzrpbj5hmxf0k3al1a7qk1g"; + + meta = { + description = "tags for markdown file"; + homepage = "https://github.com/wsdjeg/mdctags.rs"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pacien ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile b/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile new file mode 100644 index 000000000000..15b33c53a653 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "mdl" diff --git a/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile.lock b/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile.lock new file mode 100644 index 000000000000..0e01c85002b4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mdl/Gemfile.lock @@ -0,0 +1,32 @@ +GEM + remote: https://rubygems.org/ + specs: + chef-utils (18.1.0) + concurrent-ruby + concurrent-ruby (1.2.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + mdl (0.13.0) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.1) + mixlib-cli (~> 2.1, >= 2.1.1) + mixlib-config (>= 2.2.1, < 4) + mixlib-shellout + mixlib-cli (2.1.8) + mixlib-config (3.0.27) + tomlrb + mixlib-shellout (3.2.7) + chef-utils + rexml (3.2.5) + tomlrb (2.0.3) + +PLATFORMS + ruby + +DEPENDENCIES + mdl + +BUNDLED WITH + 2.4.6 diff --git a/nixpkgs/pkgs/development/tools/misc/mdl/default.nix b/nixpkgs/pkgs/development/tools/misc/mdl/default.nix new file mode 100644 index 000000000000..e7f280cf4cf5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mdl/default.nix @@ -0,0 +1,17 @@ +{ lib, bundlerApp, bundlerUpdateScript }: + +bundlerApp { + pname = "mdl"; + gemdir = ./.; + exes = [ "mdl" ]; + + passthru.updateScript = bundlerUpdateScript "mdl"; + + meta = with lib; { + description = "A tool to check markdown files and flag style issues"; + homepage = "https://github.com/markdownlint/markdownlint"; + license = licenses.mit; + maintainers = with maintainers; [ gerschtli manveru nicknovitski totoroot ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/mdl/gemset.nix b/nixpkgs/pkgs/development/tools/misc/mdl/gemset.nix new file mode 100644 index 000000000000..7c9f7b003789 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mdl/gemset.nix @@ -0,0 +1,108 @@ +{ + chef-utils = { + dependencies = ["concurrent-ruby"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0ckbnra3cs71syrvfhgcrg1icqxh6pj21by2f9sy6r6kbr19g4w3"; + type = "gem"; + }; + version = "18.1.0"; + }; + concurrent-ruby = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1qnsflsbjj38im8xq35g0vihlz96h09wjn2dad5g543l3vvrkrx5"; + type = "gem"; + }; + version = "1.2.0"; + }; + kramdown = { + dependencies = ["rexml"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1ic14hdcqxn821dvzki99zhmcy130yhv5fqfffkcf87asv5mnbmn"; + type = "gem"; + }; + version = "2.4.0"; + }; + kramdown-parser-gfm = { + dependencies = ["kramdown"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"; + type = "gem"; + }; + version = "1.1.0"; + }; + mdl = { + dependencies = ["kramdown" "kramdown-parser-gfm" "mixlib-cli" "mixlib-config" "mixlib-shellout"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1a463jx8v4a3lgmmfalq73c337d66hc21q4vnfar1qf4lhk5wyi0"; + type = "gem"; + }; + version = "0.13.0"; + }; + mixlib-cli = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1ydxlfgd7nnj3rp1y70k4yk96xz5cywldjii2zbnw3sq9pippwp6"; + type = "gem"; + }; + version = "2.1.8"; + }; + mixlib-config = { + dependencies = ["tomlrb"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0j0122lv2qgccl61njqi0pj6sp6nb85y07gcmw16bwg4k0c8nx6p"; + type = "gem"; + }; + version = "3.0.27"; + }; + mixlib-shellout = { + dependencies = ["chef-utils"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0zkwg76y96nkh1mv0k92ybq46cr06v1wmic16129ls3yqzwx3xj6"; + type = "gem"; + }; + version = "3.2.7"; + }; + rexml = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53"; + type = "gem"; + }; + version = "3.2.5"; + }; + tomlrb = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1xyl2nlfm39lklyaf0p7zj9psr60jvrlyfh26hrpk7wi4k7nlwy2"; + type = "gem"; + }; + version = "2.0.3"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/micronucleus/default.nix b/nixpkgs/pkgs/development/tools/misc/micronucleus/default.nix new file mode 100644 index 000000000000..560cfa0c0dce --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/micronucleus/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, libusb-compat-0_1 +, fetchFromGitHub +, lib +}: +stdenv.mkDerivation rec { + pname = "micronucleus"; + version = "2.04"; + + sourceRoot = "${src.name}/commandline"; + + src = fetchFromGitHub { + owner = "micronucleus"; + repo = "micronucleus"; + rev = version; + sha256 = "14msy9amlbflw5mqrbs57b7bby3nsgx43srr7215zyhfdgsla0in"; + }; + + buildInputs = [ libusb-compat-0_1 ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/lib/udev + cp micronucleus $out/bin + cp 49-micronucleus.rules $out/lib/udev + ''; + + meta = with lib; { + description = "Upload tool for micronucleus"; + homepage = "https://github.com/micronucleus/micronucleus"; + license = licenses.gpl3; + maintainers = [ maintainers.cab404 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/mkcert/default.nix b/nixpkgs/pkgs/development/tools/misc/mkcert/default.nix new file mode 100644 index 000000000000..0022dd003cd9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/mkcert/default.nix @@ -0,0 +1,28 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "mkcert"; + version = "1.4.4"; + + src = fetchFromGitHub { + owner = "FiloSottile"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-FMAXjRL+kJ/hwGmaWBy8ecON+JCMgRytfpryeLWsSVc="; + }; + + vendorHash = "sha256-DdA7s+N5S1ivwUgZ+M2W/HCp/7neeoqRQL0umn3m6Do="; + + doCheck = false; + + ldflags = [ + "-s" "-w" "-X main.Version=v${version}" + ]; + + meta = with lib; { + homepage = "https://github.com/FiloSottile/mkcert"; + description = "A simple tool for making locally-trusted development certificates"; + license = licenses.bsd3; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/msitools/default.nix b/nixpkgs/pkgs/development/tools/misc/msitools/default.nix new file mode 100644 index 000000000000..66571e887e41 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/msitools/default.nix @@ -0,0 +1,72 @@ +{ lib +, stdenv +, fetchurl +, meson +, ninja +, vala +, gobject-introspection +, perl +, bison +, gettext +, glib +, pkg-config +, libgsf +, gcab +, bzip2 +, gnome +}: + +stdenv.mkDerivation rec { + pname = "msitools"; + version = "0.103"; + + src = fetchurl { + url = "mirror://gnome/sources/msitools/${lib.versions.majorMinor version}/msitools-${version}.tar.xz"; + hash = "sha256-0XYi7rvzf6TAm1m+C8jbCLJr4wCmcxx02h684mK86Dk="; + }; + + nativeBuildInputs = [ + meson + ninja + vala + gobject-introspection + perl + bison + gettext + pkg-config + ]; + + buildInputs = [ + glib + libgsf + gcab + bzip2 + ]; + + # WiX tests fail on darwin + doCheck = !stdenv.isDarwin; + + postPatch = '' + patchShebangs subprojects/bats-core/{bin,libexec} + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + versionPolicy = "none"; + }; + }; + + meta = with lib; { + description = "Set of programs to inspect and build Windows Installer (.MSI) files"; + homepage = "https://wiki.gnome.org/msitools"; + license = with licenses; [ + # Library + lgpl21Plus + # Tools + gpl2Plus + ]; + maintainers = with maintainers; [ PlushBeaver ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/n98-magerun/default.nix b/nixpkgs/pkgs/development/tools/misc/n98-magerun/default.nix new file mode 100644 index 000000000000..dadca94c37b0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/n98-magerun/default.nix @@ -0,0 +1,46 @@ +{ + stdenv +, fetchurl +, makeBinaryWrapper +, php +, lib +, unzip +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "n98-magerun"; + version = "2.3.0"; + + src = fetchurl { + url = "https://github.com/netz98/n98-magerun/releases/download/${finalAttrs.version}/n98-magerun.phar"; + hash = "sha256-s+Cdr8zU3VBaBzxOh4nXjqPe+JPPxHWiFOEVS/86qOQ="; + }; + + dontUnpack = true; + + nativeBuildInputs = [ + makeBinaryWrapper + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/libexec/n98-magerun + + install -D $src $out/libexec/n98-magerun/n98-magerun.phar + makeWrapper ${php}/bin/php $out/bin/n98-magerun \ + --add-flags "$out/libexec/n98-magerun/n98-magerun.phar" \ + --prefix PATH : ${lib.makeBinPath [ unzip ]} + + runHook postInstall + ''; + + meta = { + broken = true; # Not compatible with PHP 8.1, see https://github.com/netz98/n98-magerun/issues/1275 + changelog = "https://magerun.net/category/magerun/"; + description = "The swiss army knife for Magento1/OpenMage developers"; + homepage = "https://magerun.net/"; + license = lib.licenses.mit; + maintainers = lib.teams.php.members; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/n98-magerun2/default.nix b/nixpkgs/pkgs/development/tools/misc/n98-magerun2/default.nix new file mode 100644 index 000000000000..6aabcbffbb66 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/n98-magerun2/default.nix @@ -0,0 +1,45 @@ +{ + stdenv +, fetchurl +, makeBinaryWrapper +, php +, lib +, unzip +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "n98-magerun2"; + version = "7.2.0"; + + src = fetchurl { + url = "https://github.com/netz98/n98-magerun2/releases/download/${finalAttrs.version}/n98-magerun2.phar"; + hash = "sha256-w+58TTyoS44Ouaz6KFIJLhSl/UeF1I7cSznlZH6fLXw="; + }; + + dontUnpack = true; + + nativeBuildInputs = [ + makeBinaryWrapper + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/libexec/n98-magerun2 + + install -D $src $out/libexec/n98-magerun2/n98-magerun2.phar + makeWrapper ${php}/bin/php $out/bin/n98-magerun2 \ + --add-flags "$out/libexec/n98-magerun2/n98-magerun2.phar" \ + --prefix PATH : ${lib.makeBinPath [ unzip ]} + + runHook postInstall + ''; + + meta = { + changelog = "https://magerun.net/category/magerun/"; + description = "The swiss army knife for Magento2 developers"; + homepage = "https://magerun.net/"; + license = lib.licenses.mit; + maintainers = lib.teams.php.members; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/namaka/default.nix b/nixpkgs/pkgs/development/tools/misc/namaka/default.nix new file mode 100644 index 000000000000..185f24b47211 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/namaka/default.nix @@ -0,0 +1,48 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, pkg-config +, oniguruma +}: + +rustPlatform.buildRustPackage rec { + pname = "namaka"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "namaka"; + rev = "v${version}"; + hash = "sha256-CLGEW11Fo1v4vj0XSqiyW1EbhRZFO7dkgM43eKwItrk="; + }; + + cargoHash = "sha256-exftXTO/NbTfd7gNPpZ886jXH1XveqX+Cl/gXpZlS4c="; + + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; + + buildInputs = [ + oniguruma + ]; + + env = { + GEN_ARTIFACTS = "artifacts"; + RUSTONIG_SYSTEM_LIBONIG = true; + }; + + postInstall = '' + installManPage artifacts/*.1 + installShellCompletion artifacts/namaka.{bash,fish} --zsh artifacts/_namaka + ''; + + meta = with lib; { + description = "Snapshot testing tool for Nix based on haumea"; + homepage = "https://github.com/nix-community/namaka"; + changelog = "https://github.com/nix-community/namaka/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/netcoredbg/arm64.patch b/nixpkgs/pkgs/development/tools/misc/netcoredbg/arm64.patch new file mode 100644 index 000000000000..ac057798c248 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/netcoredbg/arm64.patch @@ -0,0 +1,26 @@ +diff --git a/platformdefinitions.cmake b/platformdefinitions.cmake +index ed3d9f6..6b0628f 100644 +--- a/platformdefinitions.cmake ++++ b/platformdefinitions.cmake +@@ -7,17 +7,21 @@ if (CLR_CMAKE_PLATFORM_ARCH_AMD64) + add_definitions(-DAMD64) + add_definitions(-DBIT64=1) # CoreClr <= 3.x + add_definitions(-DHOST_64BIT=1) # CoreClr > 3.x ++ add_definitions(-DHOST_AMD64) + elseif (CLR_CMAKE_PLATFORM_ARCH_I386) + add_definitions(-D_X86_) ++ add_definitions(-DHOST_X86) + elseif (CLR_CMAKE_PLATFORM_ARCH_ARM) + add_definitions(-D_ARM_) + add_definitions(-DARM) ++ add_definitions(-DHOST_ARM) + elseif (CLR_CMAKE_PLATFORM_ARCH_ARM64) + add_definitions(-D_ARM64_) + add_definitions(-DARM64) + add_definitions(-D_WIN64) + add_definitions(-DBIT64=1) # CoreClr <= 3.x + add_definitions(-DHOST_64BIT=1) # CoreClr > 3.x ++ add_definitions(-DHOST_ARM64) + else () + clr_unknown_arch() + endif () diff --git a/nixpkgs/pkgs/development/tools/misc/netcoredbg/darwin.patch b/nixpkgs/pkgs/development/tools/misc/netcoredbg/darwin.patch new file mode 100644 index 000000000000..ece3e51554f2 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/netcoredbg/darwin.patch @@ -0,0 +1,17 @@ +diff --git a/detectplatform.cmake b/detectplatform.cmake +index 7b93bbf..6fa6e9e 100644 +--- a/detectplatform.cmake ++++ b/detectplatform.cmake +@@ -56,7 +56,11 @@ endif(CMAKE_SYSTEM_NAME STREQUAL Linux) + + if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(CLR_CMAKE_PLATFORM_UNIX 1) +- set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1) ++ if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) ++ set(CLR_CMAKE_PLATFORM_UNIX_ARM64 1) ++ else() ++ set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1) ++ endif() + set(CLR_CMAKE_PLATFORM_DARWIN 1) + if(CMAKE_VERSION VERSION_LESS "3.4.0") + set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_C_COMPILER} <FLAGS> <DEFINES> -o <OBJECT> -c <SOURCE>") diff --git a/nixpkgs/pkgs/development/tools/misc/netcoredbg/default.nix b/nixpkgs/pkgs/development/tools/misc/netcoredbg/default.nix new file mode 100644 index 000000000000..9775239ed1ef --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/netcoredbg/default.nix @@ -0,0 +1,91 @@ +{ lib, clangStdenv, stdenv, cmake, autoPatchelfHook, fetchFromGitHub, dotnetCorePackages, buildDotnetModule }: +let + pname = "netcoredbg"; + version = "2.2.0-961"; + hash = "0gbjm8x40hzf787kccfxqb2wdgfks81f6hzr6rrmid42s4bfs5w7"; + + coreclr-version = "v7.0.4"; + coreclr-src = fetchFromGitHub { + owner = "dotnet"; + repo = "runtime"; + rev = coreclr-version; + sha256 = "sha256-gPl9sfn3eL3AUli1gdPizDK4lciTJ1ImBcics5BA63M="; + }; + + dotnet-sdk = dotnetCorePackages.sdk_7_0; + + src = fetchFromGitHub { + owner = "Samsung"; + repo = pname; + rev = version; + sha256 = hash; + }; + + unmanaged = clangStdenv.mkDerivation { + inherit src pname version; + + # patch for arm from: https://github.com/Samsung/netcoredbg/pull/103#issuecomment-1446375535 + # needed until https://github.com/dotnet/runtime/issues/78286 is resolved + # patch for darwin from: https://github.com/Samsung/netcoredbg/pull/103#issuecomment-1446457522 + # needed until: ? + patches = [ ./arm64.patch ./darwin.patch ]; + nativeBuildInputs = [ cmake dotnet-sdk ]; + + hardeningDisable = [ "strictoverflow" ]; + + preConfigure = '' + export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 + ''; + + cmakeFlags = [ + "-DCORECLR_DIR=${coreclr-src}/src/coreclr" + "-DDOTNET_DIR=${dotnet-sdk}" + "-DBUILD_MANAGED=0" + ]; + }; + + managed = buildDotnetModule { + inherit pname version src dotnet-sdk; + + projectFile = "src/managed/ManagedPart.csproj"; + nugetDeps = ./deps.nix; + + # include platform-specific dbgshim binary in nugetDeps + dotnetFlags = [ "-p:UseDbgShimDependency=true" ]; + executables = [ ]; + + # this passes RID down to dotnet build command + # and forces dotnet to include binary dependencies in the output (libdbgshim) + selfContainedBuild = true; + }; +in +stdenv.mkDerivation rec { + inherit pname version; + # managed brings external binaries (libdbgshim.*) + # include source here so that autoPatchelfHook can do it's job + src = managed; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + buildInputs = lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib ]; + installPhase = '' + mkdir -p $out/share/netcoredbg $out/bin + cp ${unmanaged}/* $out/share/netcoredbg + cp ./lib/netcoredbg/* $out/share/netcoredbg + # darwin won't work unless we link all files + ln -s $out/share/netcoredbg/* "$out/bin/" + ''; + + passthru = { + inherit (managed) fetch-deps; + + updateScript = [ ./update.sh pname version meta.homepage ]; + }; + + meta = with lib; { + description = "Managed code debugger with MI interface for CoreCLR"; + homepage = "https://github.com/Samsung/netcoredbg"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ leo60228 konradmalik ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/netcoredbg/deps.nix b/nixpkgs/pkgs/development/tools/misc/netcoredbg/deps.nix new file mode 100644 index 000000000000..a073c98d5d43 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/netcoredbg/deps.nix @@ -0,0 +1,122 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: [ + (fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "1.1.0"; sha256 = "08r667hj2259wbim1p3al5qxkshydykmb7nd9ygbjlg4mmydkapc"; }) + (fetchNuGet { pname = "Microsoft.CodeAnalysis.Common"; version = "2.3.0"; sha256 = "1p29v4499qpyh7k7fv1li2y3c688zg95ic8gq9if1nqmjciz5w7p"; }) + (fetchNuGet { pname = "Microsoft.CodeAnalysis.CSharp"; version = "2.3.0"; sha256 = "1g893rqc8hmd59hdigq0fwm3w261i7cm1h2wciqp7406f0gz67x5"; }) + (fetchNuGet { pname = "Microsoft.CodeAnalysis.CSharp.Scripting"; version = "2.3.0"; sha256 = "121dhnfjd5jzm410dk79s8xk5jvd09xa0w5q3lbpqc7bs4wxmq4p"; }) + (fetchNuGet { pname = "Microsoft.CodeAnalysis.Scripting.Common"; version = "2.3.0"; sha256 = "11f11kvgrdgs86ykz4104jx1iw78v6af48hpdrhmr7y7h5334ziq"; }) + (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.4.0"; sha256 = "1niyzqqfyhvh4zpxn8bcyyldynqlw0rfr1apwry4b3yrdnjh1hhh"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim"; version = "7.0.410101"; sha256 = "0az67ay2977gyksh039lamap2a7jcr4c8df4imqrdaqx1ksir993"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-arm"; version = "7.0.410101"; sha256 = "1x5iilp2436w2pjp9c29xwj6vlq4z43qhprz35yxvfzhg0vdsg0l"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-arm64"; version = "7.0.410101"; sha256 = "1zbrcr5iydbbyb48w2wksbckjgddd74z6xczcsb5b0gvyqra85sn"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-musl-arm"; version = "7.0.410101"; sha256 = "179xp33f6aaaf775m673ij1zzrkfk7a07jmm7hcna9nb4ils04yg"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-musl-arm64"; version = "7.0.410101"; sha256 = "0gjyw14ppwsy22c0f0ckxj6gan8gq8sk564bm762jgbvpj9w6br2"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-musl-x64"; version = "7.0.410101"; sha256 = "00yk3b7pygprgm53nlv9l6grrbykrv6dg27jmhw431dnv978wcqd"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.linux-x64"; version = "7.0.410101"; sha256 = "1k3182xh0a6fc8j5vspi0qx75has4gwydcr2hrbrapc2x850xq0z"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.osx-arm64"; version = "7.0.410101"; sha256 = "06mqqj2bpvqqaxh0hfa580m6db213zy349k0x8ah34whzp3bgphk"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.osx-x64"; version = "7.0.410101"; sha256 = "0yxlb8k935i0yc3cxl996bnk86b4qghlqmmjrv4s8mc5qai351ws"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.win-arm"; version = "7.0.410101"; sha256 = "10ad931l9vrz3sc4xjyndak8p3wi5gl92r37yp7smjx8ik09azma"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.win-arm64"; version = "7.0.410101"; sha256 = "1xd85r13qbk6awbrnp2q4a5vvcpwl7rw62s404rxrl4ghy2a43xz"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.win-x64"; version = "7.0.410101"; sha256 = "1zlamjlv1s4d40sf08bbr6c7157lgchcla9x2g911ac0mnh8qqbf"; }) + (fetchNuGet { pname = "Microsoft.Diagnostics.DbgShim.win-x86"; version = "7.0.410101"; sha256 = "0sk3akxgb1vw03fkj59m3n90j6v0a5g4px83h2llda8p5q729zbr"; }) + (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) + (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; }) + (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; }) + (fetchNuGet { pname = "runtime.any.System.Collections"; version = "4.3.0"; sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0"; }) + (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "1wl76vk12zhdh66vmagni66h5xbhgqq7zkdpgw21jhxhvlbcl8pk"; }) + (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn"; }) + (fetchNuGet { pname = "runtime.any.System.Globalization"; version = "4.3.0"; sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x"; }) + (fetchNuGet { pname = "runtime.any.System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1ghhhk5psqxcg6w88sxkqrc35bxcz27zbqm2y5p5298pv3v7g201"; }) + (fetchNuGet { pname = "runtime.any.System.IO"; version = "4.3.0"; sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x"; }) + (fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.3.0"; sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly"; }) + (fetchNuGet { pname = "runtime.any.System.Reflection.Extensions"; version = "4.3.0"; sha256 = "0zyri97dfc5vyaz9ba65hjj1zbcrzaffhsdlpxc9bh09wy22fq33"; }) + (fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.3.0"; sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf"; }) + (fetchNuGet { pname = "runtime.any.System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl"; }) + (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.3.0"; sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b"; }) + (fetchNuGet { pname = "runtime.any.System.Runtime.Handles"; version = "4.3.0"; sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x"; }) + (fetchNuGet { pname = "runtime.any.System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19"; }) + (fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.3.0"; sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3"; }) + (fetchNuGet { pname = "runtime.any.System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8"; }) + (fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.3.0"; sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va"; }) + (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; }) + (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; }) + (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; }) + (fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; }) + (fetchNuGet { pname = "runtime.native.System.IO.Compression"; version = "4.3.0"; sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d"; }) + (fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; }) + (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; }) + (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; }) + (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; }) + (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; }) + (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; }) + (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; }) + (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; }) + (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; }) + (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; }) + (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; }) + (fetchNuGet { pname = "runtime.unix.System.Console"; version = "4.3.0"; sha256 = "1pfpkvc6x2if8zbdzg9rnc5fx51yllprl8zkm5npni2k50lisy80"; }) + (fetchNuGet { pname = "runtime.unix.System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5"; }) + (fetchNuGet { pname = "runtime.unix.System.IO.FileSystem"; version = "4.3.0"; sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix"; }) + (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.3.0"; sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk"; }) + (fetchNuGet { pname = "runtime.unix.System.Runtime.Extensions"; version = "4.3.0"; sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p"; }) + (fetchNuGet { pname = "System.AppContext"; version = "4.3.0"; sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya"; }) + (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; }) + (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; }) + (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; }) + (fetchNuGet { pname = "System.Collections.Immutable"; version = "1.3.1"; sha256 = "17615br2x5riyx8ivf1dcqwj6q3ipq1bi5hqhw54yfyxmx38ddva"; }) + (fetchNuGet { pname = "System.Console"; version = "4.3.0"; sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay"; }) + (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; }) + (fetchNuGet { pname = "System.Diagnostics.FileVersionInfo"; version = "4.3.0"; sha256 = "094hx249lb3vb336q7dg3v257hbxvz2jnalj695l7cg5kxzqwai7"; }) + (fetchNuGet { pname = "System.Diagnostics.StackTrace"; version = "4.3.0"; sha256 = "0ash4h9k0m7xsm0yl79r0ixrdz369h7y922wipp5gladmlbvpyjd"; }) + (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; }) + (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; }) + (fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.3.0"; sha256 = "1d951hrvrpndk7insiag80qxjbf2y0y39y8h5hnq9612ws661glk"; }) + (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; }) + (fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; }) + (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; }) + (fetchNuGet { pname = "System.IO.Compression"; version = "4.3.0"; sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz"; }) + (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; }) + (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; }) + (fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; }) + (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; }) + (fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; }) + (fetchNuGet { pname = "System.Private.Uri"; version = "4.3.0"; sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx"; }) + (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; }) + (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; }) + (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c"; }) + (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; }) + (fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.4.2"; sha256 = "08b7b43vczlliv8k7q43jinjfrxwpljsglw7sxmc6sd7d54pd1vi"; }) + (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; }) + (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1"; }) + (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; }) + (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; }) + (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; }) + (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; }) + (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; }) + (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; }) + (fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; }) + (fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; }) + (fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; }) + (fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; }) + (fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; }) + (fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; }) + (fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; }) + (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; }) + (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.3.0"; sha256 = "0lgxg1gn7pg7j0f942pfdc9q7wamzxsgq3ng248ikdasxz0iadkv"; }) + (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; }) + (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; }) + (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; }) + (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; }) + (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; }) + (fetchNuGet { pname = "System.Threading.Tasks.Parallel"; version = "4.3.0"; sha256 = "1rr3qa4hxwyj531s4nb3bwrxnxxwz617i0n9gh6x7nr7dd3ayzgh"; }) + (fetchNuGet { pname = "System.Threading.Thread"; version = "4.3.0"; sha256 = "0y2xiwdfcph7znm2ysxanrhbqqss6a3shi1z3c779pj2s523mjx4"; }) + (fetchNuGet { pname = "System.ValueTuple"; version = "4.3.0"; sha256 = "1227k7fxbxapq7dms4lvwwjdf3pr1jcsmhy2nzzhj6g6hs530hxn"; }) + (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; }) + (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; }) + (fetchNuGet { pname = "System.Xml.XmlDocument"; version = "4.3.0"; sha256 = "0bmz1l06dihx52jxjr22dyv5mxv6pj4852lx68grjm7bivhrbfwi"; }) + (fetchNuGet { pname = "System.Xml.XPath"; version = "4.3.0"; sha256 = "1cv2m0p70774a0sd1zxc8fm8jk3i5zk2bla3riqvi8gsm0r4kpci"; }) + (fetchNuGet { pname = "System.Xml.XPath.XDocument"; version = "4.3.0"; sha256 = "1wxckyb7n1pi433xzz0qcwcbl1swpra64065mbwwi8dhdc4kiabn"; }) +] diff --git a/nixpkgs/pkgs/development/tools/misc/netcoredbg/update.sh b/nixpkgs/pkgs/development/tools/misc/netcoredbg/update.sh new file mode 100755 index 000000000000..a4dbb8f0291d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/netcoredbg/update.sh @@ -0,0 +1,37 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=./. -i bash -p common-updater-scripts +# shellcheck shell=bash + +set -euo pipefail + +pname=$1 +old_version=$2 +url=$3 + +cd "$(dirname "${BASH_SOURCE[0]}")" + +deps_file="$(realpath "./deps.nix")" + +new_version="$(list-git-tags --url="$url" | sort --reverse --numeric-sort | head -n 1)" + +if [[ "$new_version" == "$old_version" ]]; then + echo "Already up to date!" + exit 0 +fi + +updateVersion() { + sed -i "s/version = \"$old_version\";/version = \"$new_version\";/g" default.nix +} + +updateHash() { + hashKey="hash" + hash=$(nix-prefetch-url --unpack --type sha256 "$url/archive/$new_version.tar.gz") + sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$hash\";|g" default.nix +} + +updateVersion +updateHash + +cd ../../../../../ + +$(nix-build -A "$pname".fetch-deps --no-out-link) "$deps_file" diff --git a/nixpkgs/pkgs/development/tools/misc/nimlsp/default.nix b/nixpkgs/pkgs/development/tools/misc/nimlsp/default.nix new file mode 100644 index 000000000000..5a00d1029ec1 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nimlsp/default.nix @@ -0,0 +1,34 @@ +{ lib, nimPackages, fetchFromGitHub, srcOnly, nim }: + +nimPackages.buildNimPackage rec { + pname = "nimlsp"; + version = "0.4.4"; + nimBinOnly = true; + + src = fetchFromGitHub { + owner = "PMunch"; + repo = "nimlsp"; + rev = "v${version}"; + sha256 = "sha256-Z67iKlL+dnRbxdFt/n/fsUcb2wpZwzPpL/G29jfCaMY="; + }; + + buildInputs = with nimPackages; [ jsonschema asynctools ]; + + nimFlags = [ + "--threads:on" + "-d:explicitSourcePath=${srcOnly nimPackages.nim.passthru.nim}" + "-d:tempDir=/tmp" + ]; + + nimDefines = [ "nimcore" "nimsuggest" "debugCommunication" "debugLogging" ]; + + doCheck = false; + + meta = with lib; { + description = "Language Server Protocol implementation for Nim"; + homepage = "https://github.com/PMunch/nimlsp"; + license = licenses.mit; + platforms = nim.meta.platforms; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ninka/default.nix b/nixpkgs/pkgs/development/tools/misc/ninka/default.nix new file mode 100644 index 000000000000..2b45af77e7a9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ninka/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, perl, perlPackages }: + +perlPackages.buildPerlPackage { + pname = "ninka"; + version = "2.0-pre"; + + src = fetchFromGitHub { + owner = "dmgerman"; + repo = "ninka"; + rev = "b89b59ecd057dfc939d0c75acaddebb58fcd8cba"; + sha256 = "1grlis1kycbcjvjgqvn7aw81q1qx49ahvxg2k7cgyr79mvgpgi9m"; + }; + + buildInputs = with perlPackages; [ perl TestOutput DBDSQLite DBI TestPod TestPodCoverage SpreadsheetParseExcel ]; + + doCheck = false; # hangs + + preConfigure = '' + sed -i.bak -e 's;#!/usr/bin/perl;#!${perl}/bin/perl;g' \ + ./bin/ninka-excel ./bin/ninka ./bin/ninka-sqlite \ + ./scripts/unify.pl ./scripts/parseLicense.pl \ + ./scripts/license_matcher_modified.pl \ + ./scripts/sort_package_license_list.pl + perl Makefile.PL + ''; + + meta = with lib; { + description = "A sentence based license detector"; + homepage = "http://ninka.turingmachine.org/"; + license = licenses.gpl2; + maintainers = [ maintainers.vrthra ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/nix-bisect/default.nix b/nixpkgs/pkgs/development/tools/misc/nix-bisect/default.nix new file mode 100644 index 000000000000..a4c3179e8e58 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nix-bisect/default.nix @@ -0,0 +1,49 @@ +{ lib +, fetchpatch +, fetchFromGitHub +, python3 +}: + +let + pname = "nix-bisect"; + version = "0.4.1"; +in +python3.pkgs.buildPythonApplication { + inherit pname version; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "timokau"; + repo = pname; + rev = "v${version}"; + hash = "sha256-01vj35mMakqKi5zbMIPQ+R8xdkOWbzpnigd3/SU+svw="; + }; + + patches = [ + (fetchpatch { + # Fixes compatibility with recent nix versions + url = "https://github.com/timokau/nix-bisect/commit/01eefe174b740cb90e48b06d67d5582d51786b96.patch"; + hash = "sha256-Gls/NtHH7LujdEgLbcIRZ12KsJDrasXIMcHeeBVns4A="; + }) + (fetchpatch { + # Fixes TypeError crashes associated with drvs_failed inconsistency + url = "https://github.com/timokau/nix-bisect/commit/9f3a17783046baae64c16f9e2be917c2603977fc.patch"; + hash = "sha256-U9NUtgwslcgIf/wvH/WE7t0HGs2OP3wvYDKrb5j+lp0="; + }) + ]; + + propagatedBuildInputs = with python3.pkgs; [ + appdirs + numpy + pexpect + ]; + + doCheck = false; + + meta = with lib; { + description = "Bisect nix builds"; + homepage = "https://github.com/timokau/nix-bisect"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/nix-build-uncached/default.nix b/nixpkgs/pkgs/development/tools/misc/nix-build-uncached/default.nix new file mode 100644 index 000000000000..960b744dc738 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nix-build-uncached/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub, makeWrapper }: + +buildGoModule rec { + pname = "nix-build-uncached"; + version = "1.1.2"; + + src = fetchFromGitHub { + owner = "Mic92"; + repo = "nix-build-uncached"; + rev = "v${version}"; + sha256 = "sha256-n9Koi01Te77bpYbRX46UThyD2FhCu9OGHd/6xDQLqjQ="; + }; + + vendorHash = null; + + doCheck = false; + + nativeBuildInputs = [ makeWrapper ]; + + meta = with lib; { + description = "A CI friendly wrapper around nix-build"; + license = licenses.mit; + homepage = "https://github.com/Mic92/nix-build-uncached"; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/nixbang/default.nix b/nixpkgs/pkgs/development/tools/misc/nixbang/default.nix new file mode 100644 index 000000000000..bcddf4479eb0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nixbang/default.nix @@ -0,0 +1,21 @@ +{ lib, pythonPackages, fetchFromGitHub }: + +pythonPackages.buildPythonApplication rec { + pname = "nixbang"; + version = "0.1.2"; + namePrefix = ""; + + src = fetchFromGitHub { + owner = "madjar"; + repo = "nixbang"; + rev = version; + sha256 = "1kzk53ry60i814wa6n9y2ni0bcxhbi9p8gdv10b974gf23mhi8vc"; + }; + + meta = { + homepage = "https://github.com/madjar/nixbang"; + description = "A special shebang to run scripts in a nix-shell"; + maintainers = [ lib.maintainers.madjar ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix b/nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix new file mode 100644 index 000000000000..e0b65b4ccc75 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +}: + +with python3.pkgs; + +buildPythonApplication rec { + pname = "nrfutil"; + version = "6.1.7"; + + src = fetchFromGitHub { + owner = "NordicSemiconductor"; + repo = "pc-nrfutil"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-WiXqeQObhXszDcLxJN8ABd2ZkxsOUvtZQSVP8cYlT2M="; + }; + + propagatedBuildInputs = [ + click + crcmod + ecdsa + libusb1 + intelhex + pc-ble-driver-py + piccata + protobuf + pyserial + pyspinel + pyyaml + tqdm + ]; + + nativeCheckInputs = [ + behave + nose + ]; + + # Workaround: pythonRelaxDepsHook doesn't work for this. + postPatch = '' + mkdir test-reports + substituteInPlace requirements.txt \ + --replace "libusb1==1.9.3" "libusb1" \ + --replace "protobuf >=3.17.3, < 4.0.0" "protobuf" + ''; + + meta = with lib; { + description = "Device Firmware Update tool for nRF chips"; + homepage = "https://github.com/NordicSemiconductor/pc-nrfutil"; + license = licenses.unfreeRedistributable; + platforms = platforms.unix; + maintainers = with maintainers; [ gebner ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix b/nixpkgs/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix new file mode 100644 index 000000000000..cfcd86f9dc2b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix @@ -0,0 +1,59 @@ +{ lib, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, bzip2 +, installShellFiles +, libusb1 +, libzip +, openssl +, zstd +}: + +stdenv.mkDerivation rec { + pname = "nxpmicro-mfgtools"; + version = "1.5.125"; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "mfgtools"; + rev = "uuu_${version}"; + sha256 = "sha256-f9Nt303xXZzLSu3GtOEpyaL91WVFUmKO7mxi8UNX3go="; + }; + + nativeBuildInputs = [ cmake pkg-config installShellFiles ]; + + buildInputs = [ bzip2 libusb1 libzip openssl zstd ]; + + preConfigure = "echo ${version} > .tarball-version"; + + postInstall = '' + # rules printed by the following invocation are static, + # they come from hardcoded configs in libuuu/config.cpp:48 + $out/bin/uuu -udev > udev-rules 2>stderr.txt + rules_file="$(cat stderr.txt|grep '1: put above udev run into'|sed 's|^.*/||')" + install -D udev-rules "$out/lib/udev/rules.d/$rules_file" + installShellCompletion --cmd uuu \ + --bash ../snap/local/bash-completion/universal-update-utility + ''; + + meta = with lib; { + description = "Freescale/NXP I.MX chip image deploy tools"; + longDescription = '' + UUU (Universal Update Utility) is a command line tool, evolved out of + MFGTools (aka MFGTools v3). + + One of the main purposes is to upload images to I.MX SoC's using at least + their boot ROM. + + With time, the need for an update utility portable to Linux and Windows + increased. UUU has the same usage on both Windows and Linux. It means the same + script works on both OS. + ''; + homepage = "https://github.com/NXPmicro/mfgtools"; + license = licenses.bsd3; + maintainers = with maintainers; [ bmilanov jraygauthier ]; + mainProgram = "uuu"; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/objconv/default.nix b/nixpkgs/pkgs/development/tools/misc/objconv/default.nix new file mode 100644 index 000000000000..ec0f5a367d1c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/objconv/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + pname = "objconv"; + version = "2.54"; + + src = fetchurl { + # Versioned archive of objconv sources maintained by orivej. + url = "https://archive.org/download/objconv/${pname}-${version}.zip"; + sha256 = "sha256-SDwnpPHc2NyctxKROrhjCDXs36WGj8js5blaQkUibWE="; + }; + + nativeBuildInputs = [ unzip ]; + + outputs = [ "out" "doc" ]; + + unpackPhase = '' + mkdir -p "$name" + cd "$name" + unpackFile "$src" + unpackFile source.zip + ''; + + buildPhase = "c++ -o objconv -O2 *.cpp"; + + installPhase = '' + mkdir -p $out/bin $out/doc/objconv + mv objconv $out/bin + mv objconv-instructions.pdf $out/doc/objconv + ''; + + meta = with lib; { + description = "Object and executable file converter, modifier and disassembler"; + homepage = "https://www.agner.org/optimize/"; + license = licenses.gpl2; + maintainers = with maintainers; [ orivej vrthra ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/om4/default.nix b/nixpkgs/pkgs/development/tools/misc/om4/default.nix new file mode 100644 index 000000000000..4425ae52fb5f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/om4/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, bison, flex, lib }: + +stdenv.mkDerivation rec { + pname = "om4"; + version = "6.7"; + + src = fetchFromGitHub { + owner = "ibara"; + repo = "m4"; + rev = "${pname}-${version}"; + sha256 = "04h76hxwb5rs3ylkw1dv8k0kmkzl84ccqlwdwxb6i0x57rrqbgzx"; + }; + + strictDeps = true; + nativeBuildInputs = [ bison flex ]; + + configureFlags = [ "--enable-m4" ]; + + meta = with lib; { + description = "Portable OpenBSD m4 macro processor"; + homepage = "https://github.com/ibara/m4"; + license = with licenses; [ bsd2 bsd3 isc publicDomain ]; + mainProgram = "m4"; + platforms = platforms.unix; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile b/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile new file mode 100644 index 000000000000..bf4378d58ce2 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'one_gadget' diff --git a/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile.lock b/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile.lock new file mode 100644 index 000000000000..202e17ebdb77 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/one_gadget/Gemfile.lock @@ -0,0 +1,17 @@ +GEM + remote: https://rubygems.org/ + specs: + bindata (2.4.15) + elftools (1.1.3) + bindata (~> 2) + one_gadget (1.8.1) + elftools (>= 1.0.2, < 1.2.0) + +PLATFORMS + ruby + +DEPENDENCIES + one_gadget + +BUNDLED WITH + 2.4.19 diff --git a/nixpkgs/pkgs/development/tools/misc/one_gadget/default.nix b/nixpkgs/pkgs/development/tools/misc/one_gadget/default.nix new file mode 100644 index 000000000000..6ad2c909c39a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/one_gadget/default.nix @@ -0,0 +1,23 @@ +{ lib, binutils, bundlerApp, bundlerUpdateScript, makeWrapper }: + +bundlerApp { + pname = "one_gadget"; + gemdir = ./.; + exes = [ "one_gadget" ]; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/one_gadget --prefix PATH : ${binutils}/bin + ''; + + passthru.updateScript = bundlerUpdateScript "one_gadget"; + + meta = with lib; { + description = "The best tool for finding one gadget RCE in libc.so.6"; + homepage = "https://github.com/david942j/one_gadget"; + license = licenses.mit; + maintainers = with maintainers; [ artemist nicknovitski ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/one_gadget/gemset.nix b/nixpkgs/pkgs/development/tools/misc/one_gadget/gemset.nix new file mode 100644 index 000000000000..98227bdbe7e5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/one_gadget/gemset.nix @@ -0,0 +1,34 @@ +{ + bindata = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "04y4zgh4bbcb8wmkxwfqg4saky1d1f3xw8z6yk543q13h8ky8rz5"; + type = "gem"; + }; + version = "2.4.15"; + }; + elftools = { + dependencies = ["bindata"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0p96wj4sz3sfv9yxyl8z530554bkbf82vj24w6x7yf91qa1p8z6i"; + type = "gem"; + }; + version = "1.1.3"; + }; + one_gadget = { + dependencies = ["elftools"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dwsmjhr9i8gwwbbpiyddbhcx74cvqqk90a5l8zbsjhjfs679irc"; + type = "gem"; + }; + version = "1.8.1"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/opengrok/default.nix b/nixpkgs/pkgs/development/tools/misc/opengrok/default.nix new file mode 100644 index 000000000000..5c9589920a60 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/opengrok/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchurl, jre, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "opengrok"; + version = "1.12.15"; + + # binary distribution + src = fetchurl { + url = "https://github.com/oracle/opengrok/releases/download/${version}/${pname}-${version}.tar.gz"; + hash = "sha256-AEKzhNSNJOOyK/fiAepqios7xoexAi4M4zbMTPdyyeA="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -a * $out/ + makeWrapper ${jre}/bin/java $out/bin/opengrok \ + --add-flags "-jar $out/lib/opengrok.jar" + + runHook postInstall + ''; + + meta = with lib; { + description = "Source code search and cross reference engine"; + homepage = "https://opengrok.github.io/OpenGrok/"; + changelog = "https://github.com/oracle/opengrok/releases/tag/${version}"; + license = licenses.cddl; + maintainers = [ ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/orogene/default.nix b/nixpkgs/pkgs/development/tools/misc/orogene/default.nix new file mode 100644 index 000000000000..6d52dcaff6bb --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/orogene/default.nix @@ -0,0 +1,47 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, openssl +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "orogene"; + version = "0.3.34"; + + src = fetchFromGitHub { + owner = "orogene"; + repo = "orogene"; + rev = "v${version}"; + hash = "sha256-GMWrlvZZ2xlcvcRG3u8jS8KiewHpyX0brNe4pmCpHbM="; + fetchSubmodules = true; + }; + + cargoHash = "sha256-I9uh8jV1hH5R/UHM3mz2/ZA7QY4O9gW5qXlVSfao0ZM="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + preCheck = '' + export CI=true + export HOME=$(mktemp -d) + ''; + + meta = with lib; { + description = "A package manager for tools that use node_modules"; + homepage = "https://github.com/orogene/orogene"; + changelog = "https://github.com/orogene/orogene/blob/${src.rev}/CHANGELOG.md"; + license = with licenses; [ asl20 isc ]; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "oro"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pahole/default.nix b/nixpkgs/pkgs/development/tools/misc/pahole/default.nix new file mode 100644 index 000000000000..8b8d4e8c6e2f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pahole/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchzip +, pkg-config +, libbpf +, cmake +, elfutils +, zlib +, argp-standalone +, musl-obstack +, nixosTests +}: + +stdenv.mkDerivation rec { + pname = "pahole"; + version = "1.25"; + src = fetchzip { + url = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${version}.tar.gz"; + hash = "sha256-s0YVT2UnMSO8jS/4XCt06wNPV4czHH6bmZRy/snO3jg="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ elfutils zlib libbpf ] + ++ lib.optionals stdenv.hostPlatform.isMusl [ + argp-standalone + musl-obstack + ]; + + patches = [ ./threading-reproducibility.patch ]; + + # Put libraries in "lib" subdirectory, not top level of $out + cmakeFlags = [ "-D__LIB=lib" "-DLIBBPF_EMBEDDED=OFF" ]; + + passthru.tests = { + inherit (nixosTests) bpf; + }; + + meta = with lib; { + homepage = "https://git.kernel.org/pub/scm/devel/pahole/pahole.git/"; + description = "Shows, manipulates, and pretty-prints debugging information in DWARF, CTF, and BTF formats"; + license = licenses.gpl2Only; + + platforms = platforms.linux; + maintainers = with maintainers; [ bosu martinetd ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pahole/threading-reproducibility.patch b/nixpkgs/pkgs/development/tools/misc/pahole/threading-reproducibility.patch new file mode 100644 index 000000000000..15893ce2d035 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pahole/threading-reproducibility.patch @@ -0,0 +1,18 @@ +diff --git a/pahole.c b/pahole.c +index 6fc4ed6..a4e306f 100644 +--- a/pahole.c ++++ b/pahole.c +@@ -1687,8 +1687,11 @@ static error_t pahole__options_parser(int key, char *arg, + class_name = arg; break; + case 'j': + #if _ELFUTILS_PREREQ(0, 178) +- conf_load.nr_jobs = arg ? atoi(arg) : +- sysconf(_SC_NPROCESSORS_ONLN) * 1.1; ++ // Force single thread if reproducibility is desirable. ++ if (!getenv("SOURCE_DATE_EPOCH")) { ++ conf_load.nr_jobs = arg ? atoi(arg) : ++ sysconf(_SC_NPROCESSORS_ONLN) * 1.1; ++ } + #else + fputs("pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...\n", stderr); + #endif diff --git a/nixpkgs/pkgs/development/tools/misc/patchelf/0.13.nix b/nixpkgs/pkgs/development/tools/misc/patchelf/0.13.nix new file mode 100644 index 000000000000..0111a4b065c4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/patchelf/0.13.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, patchelf }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "patchelf"; + version = "0.13.1"; + + src = fetchurl { + url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-OeiuzNdJXVTfCU0rSnwIAQ/3d3A2+q8k8o4Hd30VmOI="; + }; + + setupHook = [ ./setup-hook.sh ]; + + # fails 8 out of 24 tests, problems when loading libc.so.6 + doCheck = stdenv.name == "stdenv-linux"; + + inherit (patchelf) meta; +} diff --git a/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix b/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix new file mode 100644 index 000000000000..fc71c4aa4ea4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "patchelf"; + version = "0.15.0"; + + src = fetchurl { + url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-9ANtPuTY4ijewb7/8PbkbYpA6eVw4AaOOdd+YuLIvcI="; + }; + + strictDeps = true; + + setupHook = [ ./setup-hook.sh ]; + + enableParallelBuilding = true; + + # fails 8 out of 24 tests, problems when loading libc.so.6 + doCheck = stdenv.name == "stdenv-linux" + # test scripts require unprefixed bintools binaries + # https://github.com/NixOS/patchelf/issues/417 + && stdenv.cc.targetPrefix == ""; + + meta = with lib; { + homepage = "https://github.com/NixOS/patchelf"; + license = licenses.gpl3Plus; + description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; + maintainers = [ maintainers.eelco ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/patchelf/setup-hook.sh b/nixpkgs/pkgs/development/tools/misc/patchelf/setup-hook.sh new file mode 100644 index 000000000000..8f010a3f4d0b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/patchelf/setup-hook.sh @@ -0,0 +1,20 @@ +# This setup hook calls patchelf to automatically remove unneeded +# directories from the RPATH of every library or executable in every +# output. + +fixupOutputHooks+=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi') + +patchELF() { + local dir="$1" + [ -e "$dir" ] || return 0 + + echo "shrinking RPATHs of ELF executables and libraries in $dir" + + local i + while IFS= read -r -d $'\0' i; do + if [[ "$i" =~ .build-id ]]; then continue; fi + if ! isELF "$i"; then continue; fi + echo "shrinking $i" + patchelf --shrink-rpath "$i" || true + done < <(find "$dir" -type f -print0) +} diff --git a/nixpkgs/pkgs/development/tools/misc/patchelf/unstable.nix b/nixpkgs/pkgs/development/tools/misc/patchelf/unstable.nix new file mode 100644 index 000000000000..d0deaa76fc5f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/patchelf/unstable.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchurl, autoreconfHook, fetchFromGitHub, unstableGitUpdater }: + +stdenv.mkDerivation rec { + pname = "patchelf"; + version = "unstable-2023-09-27"; + + src = fetchFromGitHub { + owner = "NixOS"; + repo = "patchelf"; + rev = "917ea45b79de04f69059f42a8e2621f7caeae1c9"; + sha256 = "sha256-pP/DBhsYFpYQ7RqB4+1Iy9B1jPlC1rNT3aZhhr1Z9EU="; + }; + + # Drop test that fails on musl (?) + postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace tests/Makefile.am \ + --replace "set-rpath-library.sh" "" + ''; + + setupHook = [ ./setup-hook.sh ]; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ ]; + + doCheck = !stdenv.isDarwin; + + passthru = { + updateScript = unstableGitUpdater { + url = "https://github.com/NixOS/patchelf.git"; + }; + }; + + meta = with lib; { + homepage = "https://github.com/NixOS/patchelf"; + license = licenses.gpl3; + description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; + maintainers = [ maintainers.eelco ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/patsh/default.nix b/nixpkgs/pkgs/development/tools/misc/patsh/default.nix new file mode 100644 index 000000000000..9fabbf789db9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/patsh/default.nix @@ -0,0 +1,51 @@ +{ lib +, runCommand +, rustPlatform +, fetchFromGitHub +, stdenv +, coreutils +}: + +let + # copied from flake.nix + # tests require extra setup with nix + custom = runCommand "custom" { } '' + mkdir -p $out/bin + touch $out/bin/{'foo$','foo"`'} + chmod +x $out/bin/{'foo$','foo"`'} + ''; +in + +rustPlatform.buildRustPackage rec { + pname = "patsh"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "patsh"; + rev = "v${version}"; + sha256 = "sha256-d2Br4RAlKO7Bpse8sFbIDCIYd2fYvby0ar9oIbQS2jc="; + }; + + cargoHash = "sha256-hAWMm3YjwTB8ajn3QeXEOJYmPzbbitdwyO4k/IyhlOI="; + + nativeCheckInputs = [ custom ]; + + # see comment on `custom` + postPatch = '' + for file in tests/fixtures/*-expected.sh; do + substituteInPlace $file \ + --subst-var-by cc ${stdenv.cc} \ + --subst-var-by coreutils ${coreutils} \ + --subst-var-by custom ${custom} + done + ''; + + meta = with lib; { + description = "A command-line tool for patching shell scripts inspired by resholve"; + homepage = "https://github.com/nix-community/patsh"; + changelog = "https://github.com/nix-community/patsh/blob/v${version}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/perfect-hash/default.nix b/nixpkgs/pkgs/development/tools/misc/perfect-hash/default.nix new file mode 100644 index 000000000000..71747f0d1172 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/perfect-hash/default.nix @@ -0,0 +1,35 @@ +{ lib, python3, fetchFromGitHub }: +python3.pkgs.buildPythonApplication rec { + pname = "perfect-hash"; + version = "0.4.1"; + + # Archive on pypi does not contain examples, which are very helpful to + # understand how to use this program, so we use git source. + src = fetchFromGitHub { + owner = "ilanschnell"; + repo = "perfect-hash"; + rev = version; + sha256 = "0gkc3n613hl0q4jknrh2nm1n96j97p36q9jjgarb9d8yii9q7792"; + }; + + postInstall = '' + mkdir -p $out/share/doc/perfect-hash + cp README.md $out/share/doc/perfect-hash + cp -r examples $out/share/doc/perfect-hash + ''; + + meta = with lib; { + description = "Minimal perfect hash function generator"; + longDescription = '' + Generate a minimal perfect hash function for a given set of keys. + A given code template is filled with parameters, such that the + output is code which implements the hash function. Templates can + easily be constructed for any programming language. + ''; + license = licenses.bsd3; + maintainers = [ maintainers.kaction ]; + + homepage = "https://github.com/ilanschnell/perfect-hash"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pest-ide-tools/default.nix b/nixpkgs/pkgs/development/tools/misc/pest-ide-tools/default.nix new file mode 100644 index 000000000000..3398810dace4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pest-ide-tools/default.nix @@ -0,0 +1,34 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, nix-update-script +, pkg-config +, openssl +}: + +rustPlatform.buildRustPackage rec { + pname = "pest-ide-tools"; + version = "0.3.6"; + cargoSha256 = "sha256-uFcEE5Hlb0fhOH0birqeH+hOuAyZVjQOYFhoMdR8czM="; + + src = fetchFromGitHub { + owner = "pest-parser"; + repo = "pest-ide-tools"; + rev = "v${version}"; + sha256 = "sha256-SymtMdj7QVOEiSeTjmVidejFeGK8swnM6nfT7u18URs="; + }; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = with lib; { + description = "IDE support for Pest, via the LSP."; + homepage = "https://pest.rs"; + license = with licenses; [ mit asl20 ]; + maintainers = with maintainers; [ nickhu ]; + mainProgram = "pest-language-server"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/phpunit/composer.lock b/nixpkgs/pkgs/development/tools/misc/phpunit/composer.lock new file mode 100644 index 000000000000..3ae3a0fc52cf --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/phpunit/composer.lock @@ -0,0 +1,1542 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "11284f406a2af1b4b94558b5910ea51c", + "packages": [ + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.17.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + }, + "time": "2023-08-13T19:53:39+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "10.1.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-10-04T15:34:17+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T06:24:48+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:56:09+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T14:07:24+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:57:52+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:15+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:43+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:59:15+00:00" + }, + { + "name": "sebastian/comparator", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-14T13:18:12+00:00" + }, + { + "name": "sebastian/complexity", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-28T11:50:59+00:00" + }, + { + "name": "sebastian/diff", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-01T07:48:21+00:00" + }, + { + "name": "sebastian/environment", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-04-11T05:39:26+00:00" + }, + { + "name": "sebastian/exporter", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-24T13:22:09+00:00" + }, + { + "name": "sebastian/global-state", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-07-19T07:19:23+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T09:25:50+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:05:40+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:10:45+00:00" + }, + { + "name": "sebastian/version", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=8.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*" + }, + "platform-dev": [], + "platform-overrides": { + "php": "8.1.0" + }, + "plugin-api-version": "2.6.0" +} diff --git a/nixpkgs/pkgs/development/tools/misc/phpunit/default.nix b/nixpkgs/pkgs/development/tools/misc/phpunit/default.nix new file mode 100644 index 000000000000..90feb8628e08 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/phpunit/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, php }: + +php.buildComposerProject (finalAttrs: { + pname = "phpunit"; + version = "10.4.1"; + + src = fetchFromGitHub { + owner = "sebastianbergmann"; + repo = "phpunit"; + rev = finalAttrs.version; + hash = "sha256-AKUMCa8QuXqE0HrMaxR8SvhdoYjL/CmaTzf5UhszPPw="; + }; + + # TODO: Open a PR against https://github.com/sebastianbergmann/phpunit + # Missing `composer.lock` from the repository. + composerLock = ./composer.lock; + vendorHash = "sha256-xFXf9Nc6OxvZJ4Bt9zFhhdsJY4VwnztfCE4j5tOqQKQ="; + + meta = { + changelog = "https://github.com/sebastianbergmann/phpunit/blob/${finalAttrs.version}/ChangeLog-${lib.versions.majorMinor finalAttrs.version}.md"; + description = "PHP Unit Testing framework"; + homepage = "https://phpunit.de"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.onny ] ++ lib.teams.php.members; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/pkg-config/2.36.3-not-win32.patch b/nixpkgs/pkgs/development/tools/misc/pkg-config/2.36.3-not-win32.patch new file mode 100644 index 000000000000..c1dd808e6008 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pkg-config/2.36.3-not-win32.patch @@ -0,0 +1,324 @@ +--- a/glib/configure.ac 2013-08-04 20:21:20.808722600 -0500 ++++ b/glib/configure.ac 2013-08-04 18:30:21.852852200 -0500 +@@ -1880,7 +1880,7 @@ dnl ************************************ + + AC_MSG_CHECKING(for platform-dependent source) + case "$host" in +- *-*-cygwin*|*-*-mingw*) ++ *-*-mingw*) + PLATFORMDEP=gwin32.lo + ;; + *) +@@ -2594,9 +2594,6 @@ dnl *** Win32 API libs *** + dnl ********************** + + case $host in +- *-*-cygwin*) +- G_LIBS_EXTRA="-luser32 -lkernel32" +- ;; + *-*-mingw*) + G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi" + ;; +--- a/glib/glib/gatomic.c 2013-08-04 20:21:20.907728300 -0500 ++++ b/glib/glib/gatomic.c 2013-08-04 18:11:14.000000000 -0500 +@@ -464,7 +464,7 @@ gsize + return g_atomic_pointer_xor ((volatile gpointer *) atomic, val); + } + +-#elif defined (G_PLATFORM_WIN32) ++#elif defined (G_OS_WIN32) + + #include <windows.h> + #if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) +--- a/glib/glib/gcharset.c 2013-08-04 20:21:20.925729300 -0500 ++++ b/glib/glib/gcharset.c 2013-08-04 18:11:14.000000000 -0500 +@@ -496,7 +496,7 @@ guess_category_value (const gchar *categ + if ((retval != NULL) && (retval[0] != '\0')) + return retval; + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + /* g_win32_getlocale() first checks for LC_ALL, LC_MESSAGES and + * LANG, which we already did above. Oh well. The main point of + * calling g_win32_getlocale() is to get the thread's locale as used +--- a/glib/glib/gconvert.c 2013-08-04 20:21:20.933729800 -0500 ++++ b/glib/glib/gconvert.c 2013-08-04 18:11:14.000000000 -0500 +@@ -33,9 +33,6 @@ + + #ifdef G_OS_WIN32 + #include "win_iconv.c" +-#endif +- +-#ifdef G_PLATFORM_WIN32 + #define STRICT + #include <windows.h> + #undef STRICT +@@ -1258,7 +1255,7 @@ g_locale_from_utf8 (const gchar *utf8str + charset, "UTF-8", bytes_read, bytes_written, error); + } + +-#ifndef G_PLATFORM_WIN32 ++#ifndef G_OS_WIN32 + + typedef struct _GFilenameCharsetCache GFilenameCharsetCache; + +@@ -1374,7 +1371,7 @@ g_get_filename_charsets (const gchar *** + return cache->is_utf8; + } + +-#else /* G_PLATFORM_WIN32 */ ++#else /* G_OS_WIN32 */ + + gboolean + g_get_filename_charsets (const gchar ***filename_charsets) +@@ -1403,7 +1400,7 @@ g_get_filename_charsets (const gchar *** + #endif + } + +-#endif /* G_PLATFORM_WIN32 */ ++#endif /* G_OS_WIN32 */ + + static gboolean + get_filename_charset (const gchar **filename_charset) +--- a/glib/glib/gfileutils.c 2013-08-04 20:21:20.942730300 -0500 ++++ b/glib/glib/gfileutils.c 2013-08-04 18:11:14.000000000 -0500 +@@ -2153,7 +2153,7 @@ g_path_skip_root (const gchar *file_name + { + g_return_val_if_fail (file_name != NULL, NULL); + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + /* Skip \\server\share or //server/share */ + if (G_IS_DIR_SEPARATOR (file_name[0]) && + G_IS_DIR_SEPARATOR (file_name[1]) && +@@ -2163,7 +2163,6 @@ g_path_skip_root (const gchar *file_name + gchar *p; + p = strchr (file_name + 2, G_DIR_SEPARATOR); + +-#ifdef G_OS_WIN32 + { + gchar *q; + +@@ -2171,7 +2170,6 @@ g_path_skip_root (const gchar *file_name + if (p == NULL || (q != NULL && q < p)) + p = q; + } +-#endif + + if (p && p > file_name + 2 && p[1]) + { +--- a/glib/glib/glib.h 2013-08-04 20:21:20.949730700 -0500 ++++ b/glib/glib/glib.h 2013-08-04 18:11:14.000000000 -0500 +@@ -96,7 +96,7 @@ + #include <glib/gvariant.h> + #include <glib/gversion.h> + #include <glib/gversionmacros.h> +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + #include <glib/gwin32.h> + #endif + +--- a/glib/glib/gutf8.c 2013-08-04 20:21:20.984732700 -0500 ++++ b/glib/glib/gutf8.c 2013-08-04 18:11:14.000000000 -0500 +@@ -27,7 +27,7 @@ + #endif + #include <string.h> + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + #include <stdio.h> + #define STRICT + #include <windows.h> +--- a/glib/glib/gutils.c 2013-08-04 20:21:21.015734500 -0500 ++++ b/glib/glib/gutils.c 2013-08-04 18:11:14.000000000 -0500 +@@ -72,7 +72,7 @@ + #include "garray.h" + #include "glibintl.h" + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + #include "gconvert.h" + #include "gwin32.h" + #endif +@@ -86,16 +86,13 @@ + * These are portable utility functions. + */ + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + # include <windows.h> + # ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS + # define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2 + # define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4 + # endif + # include <lmcons.h> /* For UNLEN */ +-#endif /* G_PLATFORM_WIN32 */ +- +-#ifdef G_OS_WIN32 + # include <direct.h> + # include <shlobj.h> + /* older SDK (e.g. msvc 5.0) does not have these*/ +@@ -131,7 +128,7 @@ + #include <langinfo.h> + #endif + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + + gchar * + _glib_get_dll_directory (void) +--- a/glib/glib/gutils.h 2013-08-04 20:21:21.067737500 -0500 ++++ b/glib/glib/gutils.h 2013-08-04 18:11:14.000000000 -0500 +@@ -350,7 +350,7 @@ g_bit_storage (gulong number) + * On non-Windows platforms, expands to nothing. + */ + +-#ifndef G_PLATFORM_WIN32 ++#ifndef G_OS_WIN32 + # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) + #else + # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \ +@@ -378,7 +378,7 @@ DllMain (HINSTANCE hinstDLL, \ + + #endif /* !G_DISABLE_DEPRECATED */ + +-#endif /* G_PLATFORM_WIN32 */ ++#endif /* G_OS_WIN32 */ + + G_END_DECLS + +--- a/glib/glib/gwin32.h 2013-08-04 20:21:21.081738300 -0500 ++++ b/glib/glib/gwin32.h 2013-08-04 18:11:14.000000000 -0500 +@@ -33,7 +33,7 @@ + + #include <glib/gtypes.h> + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + + G_BEGIN_DECLS + +@@ -41,8 +41,6 @@ G_BEGIN_DECLS + #define MAXPATHLEN 1024 + #endif + +-#ifdef G_OS_WIN32 +- + /* + * To get prototypes for the following POSIXish functions, you have to + * include the indicated non-POSIX headers. The functions are defined +@@ -68,7 +66,6 @@ G_BEGIN_DECLS + GLIB_AVAILABLE_IN_ALL + gint g_win32_ftruncate (gint f, + guint size); +-#endif /* G_OS_WIN32 */ + + /* The MS setlocale uses locale names of the form "English_United + * States.1252" etc. We want the Unixish standard form "en", "zh_TW" +@@ -112,7 +109,7 @@ gchar* g_win32_locale_filename_ + + G_END_DECLS + +-#endif /* G_PLATFORM_WIN32 */ ++#endif /* G_OS_WIN32 */ + + #ifdef G_OS_WIN32 + #ifdef _WIN64 +--- a/glib/glib/libcharset/localcharset.c 2013-08-04 20:21:21.095739100 -0500 ++++ b/glib/glib/libcharset/localcharset.c 2013-08-04 18:11:14.000000000 -0500 +@@ -46,10 +46,6 @@ + # include <locale.h> + # endif + # endif +-# ifdef __CYGWIN__ +-# define WIN32_LEAN_AND_MEAN +-# include <windows.h> +-# endif + #elif defined WIN32_NATIVE + # define WIN32_LEAN_AND_MEAN + # include <windows.h> +@@ -111,7 +107,7 @@ _g_locale_get_charset_aliases (void) + cp = charset_aliases; + if (cp == NULL) + { +-#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) ++#if !(defined VMS || defined WIN32_NATIVE) + FILE *fp; + const char *dir; + const char *base = "charset.alias"; +@@ -237,7 +233,7 @@ _g_locale_get_charset_aliases (void) + "DECKOREAN" "\0" "EUC-KR" "\0"; + # endif + +-# if defined WIN32_NATIVE || defined __CYGWIN__ ++# if defined WIN32_NATIVE + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ +@@ -292,53 +288,6 @@ _g_locale_charset_raw (void) + /* Most systems support nl_langinfo (CODESET) nowadays. */ + codeset = nl_langinfo (CODESET); + +-# ifdef __CYGWIN__ +- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always +- returns "US-ASCII". As long as this is not fixed, return the suffix +- of the locale name from the environment variables (if present) or +- the codepage as a number. */ +- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) +- { +- const char *locale; +- static char buf[2 + 10 + 1]; +- +- locale = getenv ("LC_ALL"); +- if (locale == NULL || locale[0] == '\0') +- { +- locale = getenv ("LC_CTYPE"); +- if (locale == NULL || locale[0] == '\0') +- locale = getenv ("LANG"); +- } +- if (locale != NULL && locale[0] != '\0') +- { +- /* If the locale name contains an encoding after the dot, return +- it. */ +- const char *dot = strchr (locale, '.'); +- +- if (dot != NULL) +- { +- const char *modifier; +- +- dot++; +- /* Look for the possible @... trailer and remove it, if any. */ +- modifier = strchr (dot, '@'); +- if (modifier == NULL) +- return dot; +- if (modifier - dot < sizeof (buf)) +- { +- memcpy (buf, dot, modifier - dot); +- buf [modifier - dot] = '\0'; +- return buf; +- } +- } +- } +- +- /* Woe32 has a function returning the locale's codepage as a number. */ +- sprintf (buf, "CP%u", GetACP ()); +- codeset = buf; +- } +-# endif +- + # else + + /* On old systems which lack it, use setlocale or getenv. */ +diff --git a/glib/gtypes.h b/glib/gtypes.h +index c18e0bf..816685a 100644 +--- a/glib/glib/gtypes.h ++++ b/glib/glib/gtypes.h +@@ -462,7 +462,7 @@ G_END_DECLS + * properly get exported in Windows DLLs. + */ + #ifndef GLIB_VAR +-# ifdef G_PLATFORM_WIN32 ++# ifdef G_OS_WIN32 + # ifdef GLIB_STATIC_COMPILATION + # define GLIB_VAR extern + # else /* !GLIB_STATIC_COMPILATION */ diff --git a/nixpkgs/pkgs/development/tools/misc/pkg-config/default.nix b/nixpkgs/pkgs/development/tools/misc/pkg-config/default.nix new file mode 100644 index 000000000000..5da91bccc120 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pkg-config/default.nix @@ -0,0 +1,53 @@ +{ lib, stdenv, fetchurl, libiconv, vanilla ? false }: + +stdenv.mkDerivation rec { + pname = "pkg-config"; + version = "0.29.2"; + + src = fetchurl { + url = "https://pkg-config.freedesktop.org/releases/${pname}-${version}.tar.gz"; + sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg"; + }; + + outputs = [ "out" "man" "doc" ]; + strictDeps = true; + + # Process Requires.private properly, see + # http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to + # https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28 + patches = lib.optional (!vanilla) ./requires-private.patch + ++ lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch; + + # These three tests fail due to a (desired) behavior change from our ./requires-private.patch + postPatch = if vanilla then null else '' + rm -f check/check-requires-private check/check-gtk check/missing + ''; + + buildInputs = [ libiconv ]; + + configureFlags = [ "--with-internal-glib" ] + ++ lib.optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] + # Can't run these tests while cross-compiling + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) + [ "glib_cv_stack_grows=no" + "glib_cv_uscore=no" + "ac_cv_func_posix_getpwuid_r=yes" + "ac_cv_func_posix_getgrgid_r=yes" + ]; + + # Silence "incompatible integer to pointer conversion passing 'gsize'" when building with Clang. + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-int-conversion"; + + enableParallelBuilding = true; + doCheck = true; + + postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file + + meta = with lib; { + description = "A tool that allows packages to find out information about other packages"; + homepage = "http://pkg-config.freedesktop.org/wiki/"; + platforms = platforms.all; + license = licenses.gpl2Plus; + mainProgram = "pkg-config"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pkg-config/requires-private.patch b/nixpkgs/pkgs/development/tools/misc/pkg-config/requires-private.patch new file mode 100644 index 000000000000..d40aa9801379 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pkg-config/requires-private.patch @@ -0,0 +1,17 @@ +diff --git a/main.c b/main.c +index b61ca34..5a420c2 100644 +--- a/main.c ++++ b/main.c +@@ -602,10 +602,10 @@ main (int argc, char **argv) + else + disable_private_libs(); + +- /* honor Requires.private if any Cflags are requested or any static ++ /* honor Requires.private if any any static + * libs are requested */ + +- if (pkg_flags & CFLAGS_ANY || want_requires_private || want_exists || ++ if (want_requires_private || + (want_static_lib_list && (pkg_flags & LIBS_ANY))) + enable_requires_private(); + diff --git a/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix b/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix new file mode 100644 index 000000000000..68f8f525823a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, fetchurl +, removeReferencesTo +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "pkgconf"; + version = "2.0.3"; + + src = fetchurl { + url = "https://distfiles.dereferenced.org/pkgconf/pkgconf-${finalAttrs.version}.tar.xz"; + hash = "sha256-yr3zxHRSmFT3zM6Fc8WsaK00p+YhA3U1y8OYH2sjg2w="; + }; + + outputs = [ "out" "lib" "dev" "man" "doc" ]; + + nativeBuildInputs = [ removeReferencesTo ]; + + enableParallelBuilding = true; + + # Debian has outputs like these too + # (https://packages.debian.org/source/bullseye/pkgconf), so it is safe to + # remove those references + postFixup = '' + remove-references-to \ + -t "${placeholder "out"}" \ + "${placeholder "lib"}"/lib/* + remove-references-to \ + -t "${placeholder "dev"}" \ + "${placeholder "lib"}"/lib/* \ + "${placeholder "out"}"/bin/* + '' + # Move back share/aclocal. Yes, this normally goes in the dev output for good + # reason, but in this case the dev output is for the `libpkgconf` library, + # while the aclocal stuff is for the tool. The tool is already for use during + # development, so there is no reason to have separate "dev-bin" and "dev-lib" + # outputs or something. + + '' + mv ${placeholder "dev"}/share ${placeholder "out"} + ''; + + meta = { + homepage = "https://github.com/pkgconf/pkgconf"; + description = "Package compiler and linker metadata toolkit"; + longDescription = '' + pkgconf is a program which helps to configure compiler and linker flags + for development libraries. It is similar to pkg-config from + freedesktop.org. + + libpkgconf is a library which provides access to most of pkgconf's + functionality, to allow other tooling such as compilers and IDEs to + discover and use libraries configured by pkgconf. + ''; + changelog = "https://github.com/pkgconf/pkgconf/blob/pkgconf-${finalAttrs.version}/NEWS"; + license = lib.licenses.isc; + mainProgram = "pkgconf"; + maintainers = with lib.maintainers; [ zaninime AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/planus/default.nix b/nixpkgs/pkgs/development/tools/misc/planus/default.nix new file mode 100644 index 000000000000..9074debb2633 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/planus/default.nix @@ -0,0 +1,38 @@ +{ lib +, rustPlatform +, fetchCrate +, installShellFiles +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "planus"; + version = "0.4.0"; + + src = fetchCrate { + pname = "planus-cli"; + inherit version; + hash = "sha256-KpX4KSA2MjfRS8M0WVYpY4hoSvOOB7MUz7YKZwEGqj8="; + }; + + cargoHash = "sha256-yT/ZK5GG0rXpiaCQlQclK2iY8BXhhmiW/UDX9aL8wBQ="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd planus \ + --bash <($out/bin/planus generate-completions bash) \ + --fish <($out/bin/planus generate-completions fish) \ + --zsh <($out/bin/planus generate-completions zsh) + ''; + + meta = with lib; { + description = "An alternative compiler for flatbuffers"; + homepage = "https://github.com/planus-org/planus"; + changelog = "https://github.com/planus-org/planus/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pmccabe/default.nix b/nixpkgs/pkgs/development/tools/misc/pmccabe/default.nix new file mode 100644 index 000000000000..1fd58fd14a2f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pmccabe/default.nix @@ -0,0 +1,48 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "pmccabe"; + version = "2.6"; + + src = fetchurl { + url = "http://http.debian.net/debian/pool/main/p/pmccabe/pmccabe_${version}.tar.gz"; + sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474"; + }; + + patches = [ + ./getopt_on_darwin.patch + ]; + + configurePhase = '' + sed -i -r Makefile \ + -e 's,/usr/,/,g' \ + -e "s,^DESTDIR =.*$,DESTDIR = $out," \ + -e "s,^INSTALL = install.*$,INSTALL = install," \ + -e "s,^all:.*$,all: \$(PROGS)," + ''; + + checkPhase = "make test"; + + doCheck = true; + + meta = with lib; { + description = "McCabe-style function complexity and line counting for C and C++"; + homepage = "https://people.debian.org/~bame/pmccabe/"; + license = licenses.gpl2Plus; + + longDescription = '' + pmccabe calculates McCabe-style cyclomatic complexity for C and + C++ source code. Per-function complexity may be used for + spotting likely trouble spots and for estimating testing + effort. + + pmccabe also includes a non-commented line counter, decomment which + only removes comments from source code; codechanges, a program to + calculate the amount of change which has occurred between two source + trees or files; and vifn, to invoke vi given a function name rather + than a file name. + ''; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pmccabe/getopt_on_darwin.patch b/nixpkgs/pkgs/development/tools/misc/pmccabe/getopt_on_darwin.patch new file mode 100644 index 000000000000..534d6c1d6ef7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pmccabe/getopt_on_darwin.patch @@ -0,0 +1,15 @@ +diff --git a/decomment.c b/decomment.c +index 400707a..aea29fd 100644 +--- a/decomment.c ++++ b/decomment.c +@@ -11,6 +11,10 @@ + #include "getopt.h" + #endif + ++#ifdef __APPLE__ ++#include "getopt.h" ++#endif ++ + #ifdef NEED_OPTIND + extern int optind; + #endif diff --git a/nixpkgs/pkgs/development/tools/misc/polylith/default.nix b/nixpkgs/pkgs/development/tools/misc/polylith/default.nix new file mode 100644 index 000000000000..8bf95ec303d5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/polylith/default.nix @@ -0,0 +1,52 @@ +{ lib, stdenv, fetchurl, jdk, runtimeShell }: + +stdenv.mkDerivation rec { + pname = "polylith"; + version = "0.2.15-alpha"; + + src = fetchurl { + url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar"; + sha256 = "sha256-RAFxOwQykERpW+KEjTQDJN+XRv3JudREyBOk99A/qV8="; + }; + + dontUnpack = true; + + passAsFile = [ "polyWrapper" ]; + polyWrapper = '' + #!${runtimeShell} + ARGS="" + while [ "$1" != "" ] ; do + ARGS="$ARGS $1" + shift + done + exec "${jdk}/bin/java" "-jar" "${src}" $ARGS + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp "$polyWrapperPath" $out/bin/poly + chmod a+x $out/bin/poly + + runHook postInstall + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/poly help | fgrep -q '${version}' + + runHook postInstallCheck + ''; + + meta = with lib; { + description = "A tool used to develop Polylith based architectures in Clojure"; + homepage = "https://github.com/polyfy/polylith"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.epl10; + maintainers = with maintainers; [ ericdallo jlesquembre ]; + platforms = jdk.meta.platforms; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/prelink/default.nix b/nixpkgs/pkgs/development/tools/misc/prelink/default.nix new file mode 100644 index 000000000000..d5c742841190 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/prelink/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, lib +, fetchgit +, autoreconfHook +, libelf +, libiberty +}: + +stdenv.mkDerivation rec { + pname = "prelink"; + version = "unstable-2019-06-24"; + + src = fetchgit { + url = "https://git.yoctoproject.org/git/prelink-cross"; + branchName = "cross_prelink"; + rev = "f9975537dbfd9ade0fc813bd5cf5fcbe41753a37"; + sha256 = "sha256-O9/oZooLRyUBBZX3SFcB6LFMmi2vQqkUlqtZnrq5oZc="; + }; + + strictDeps = true; + + configurePlatforms = [ "build" "host" ]; + + nativeBuildInputs = [ + autoreconfHook + ]; + + buildInputs = [ + stdenv.cc.libc + libelf + libiberty + ]; + + # most tests fail + doCheck = false; + + enableParallelBuilding = true; + + meta = with lib;{ + description = "ELF prelinking utility to speed up dynamic linking"; + homepage = "https://wiki.yoctoproject.org/wiki/Cross-Prelink"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ artturin ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/premake/3.nix b/nixpkgs/pkgs/development/tools/misc/premake/3.nix new file mode 100644 index 000000000000..c05581f5591a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/premake/3.nix @@ -0,0 +1,27 @@ +{lib, stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + pname = "premake"; + version = "3.7"; + + src = fetchurl { + url = "mirror://sourceforge/sourceforge/premake/premake-src-${version}.zip"; + sha256 = "b59841a519e75d5b6566848a2c5be2f91455bf0cc6ae4d688fcbd4c40db934d5"; + }; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + install -Dm755 bin/premake $out/bin/premake + ''; + + premake_cmd = "premake"; + setupHook = ./setup-hook.sh; + + meta = { + homepage = "https://premake.github.io/"; + description = "A simple build configuration and project generation tool using lua"; + license = lib.licenses.bsd3; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/premake/5.nix b/nixpkgs/pkgs/development/tools/misc/premake/5.nix new file mode 100644 index 000000000000..a42d4c1a7b6e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/premake/5.nix @@ -0,0 +1,51 @@ +{ lib, stdenv, fetchFromGitHub, libuuid, cacert, Foundation, readline }: + +stdenv.mkDerivation rec { + pname = "premake5"; + version = "5.0.0-beta2"; + + src = fetchFromGitHub { + owner = "premake"; + repo = "premake-core"; + rev = "v${version}"; + sha256 = "sha256-2R5gq4jaQsp8Ny1oGuIYkef0kn2UG9jMf20vq0714oY="; + }; + + buildInputs = [ libuuid ] ++ lib.optionals stdenv.isDarwin [ Foundation readline ]; + + patches = [ ./no-curl-ca.patch ]; + postPatch = '' + substituteInPlace contrib/curl/premake5.lua \ + --replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'" + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace premake5.lua \ + --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5 + '' + lib.optionalString stdenv.hostPlatform.isStatic '' + substituteInPlace \ + binmodules/example/premake5.lua \ + binmodules/luasocket/premake5.lua \ + --replace SharedLib StaticLib + ''; + + buildPhase = + if stdenv.isDarwin then '' + make -f Bootstrap.mak osx + '' else '' + make -f Bootstrap.mak linux + ''; + + installPhase = '' + install -Dm755 bin/release/premake5 $out/bin/premake5 + ''; + + premake_cmd = "premake5"; + setupHook = ./setup-hook.sh; + + meta = { + homepage = "https://premake.github.io"; + description = "A simple build configuration and project generation tool using lua"; + license = lib.licenses.bsd3; + platforms = lib.platforms.darwin ++ lib.platforms.linux; + broken = stdenv.isDarwin && stdenv.isAarch64; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/premake/default.nix b/nixpkgs/pkgs/development/tools/misc/premake/default.nix new file mode 100644 index 000000000000..e3c4aef87bd3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/premake/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + pname = "premake"; + version = "4.3"; + + src = fetchurl { + url = "mirror://sourceforge/premake/premake-${version}-src.zip"; + sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"; + }; + + nativeBuildInputs = [ unzip ]; + + buildPhase = '' + make -C build/gmake.unix/ + ''; + + installPhase = '' + install -Dm755 bin/release/premake4 $out/bin/premake4 + ''; + + premake_cmd = "premake4"; + setupHook = ./setup-hook.sh; + + meta = with lib; { + description = "A simple build configuration and project generation tool using lua"; + homepage = "https://premake.github.io/"; + license = lib.licenses.bsd3; + maintainers = [ maintainers.bjornfor ]; + mainProgram = "premake4"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/premake/no-curl-ca.patch b/nixpkgs/pkgs/development/tools/misc/premake/no-curl-ca.patch new file mode 100644 index 000000000000..a1c9c1cfa18e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/premake/no-curl-ca.patch @@ -0,0 +1,36 @@ +From a26e36d55cd2447488e01b2ff4ac65e2596862cd Mon Sep 17 00:00:00 2001 +From: Ellie Hermaszewska <git@monoid.al> +Date: Mon, 3 Oct 2022 16:50:33 +0800 +Subject: [PATCH] Do not set CURL_CA_BUNDLE + +--- + contrib/curl/premake5.lua | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/contrib/curl/premake5.lua b/contrib/curl/premake5.lua +index 474f5cfa..553bbd02 100644 +--- a/contrib/curl/premake5.lua ++++ b/contrib/curl/premake5.lua +@@ -32,19 +32,6 @@ project "curl-lib" + + -- find the location of the ca bundle + local ca = nil +- for _, f in ipairs { +- "/etc/ssl/certs/ca-certificates.crt", +- "/etc/pki/tls/certs/ca-bundle.crt", +- "/usr/share/ssl/certs/ca-bundle.crt", +- "/usr/local/share/certs/ca-root.crt", +- "/usr/local/share/certs/ca-root-nss.crt", +- "/etc/certs/ca-certificates.crt", +- "/etc/ssl/cert.pem" } do +- if os.isfile(f) then +- ca = f +- break +- end +- end + if ca then + defines { 'CURL_CA_BUNDLE="' .. ca .. '"' } + end +-- +2.37.2 + diff --git a/nixpkgs/pkgs/development/tools/misc/premake/setup-hook.sh b/nixpkgs/pkgs/development/tools/misc/premake/setup-hook.sh new file mode 100644 index 000000000000..6e65e9e8c73f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/premake/setup-hook.sh @@ -0,0 +1,19 @@ +premakeConfigurePhase() { + runHook preConfigure + + local flagsArray=( + ${premakefile:+--file=$premakefile} + $premakeFlags ${premakeFlagsArray[@]} + ${premakeBackend:-gmake} + ) + + echoCmd 'configure flags' "${flagsArray[@]}" + + @premake_cmd@ "${flagsArray[@]}" + + runHook postConfigure +} + +if [ -z "${configurePhase-}" ]; then + configurePhase=premakeConfigurePhase +fi diff --git a/nixpkgs/pkgs/development/tools/misc/protox/default.nix b/nixpkgs/pkgs/development/tools/misc/protox/default.nix new file mode 100644 index 000000000000..82849b6d9478 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/protox/default.nix @@ -0,0 +1,29 @@ +{ lib +, rustPlatform +, fetchCrate +}: + +rustPlatform.buildRustPackage rec { + pname = "protox"; + version = "0.5.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-U9+7k7dQ6YFfsKMfFMg34g42qLvn+mcSRlAAys3eXNo="; + }; + + cargoHash = "sha256-sNOw19gxj+cEctxhXNWI8u15VJYlN8nSNl6Ha9sB/eE="; + + buildFeatures = [ "bin" ]; + + # tests are not included in the crate source + doCheck = false; + + meta = with lib; { + description = "A rust implementation of the protobuf compiler"; + homepage = "https://github.com/andrewhickman/protox"; + changelog = "https://github.com/andrewhickman/protox/blob/${version}/CHANGELOG.md"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ptags/default.nix b/nixpkgs/pkgs/development/tools/misc/ptags/default.nix new file mode 100644 index 000000000000..6f554e6d352b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ptags/default.nix @@ -0,0 +1,41 @@ +{ fetchFromGitHub +, cargo +, ctags +, lib +, makeWrapper +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "ptags"; + version = "0.3.4"; + + src = fetchFromGitHub { + owner = "dalance"; + repo = "ptags"; + rev = "v${version}"; + sha256 = "sha256-hFHzNdTX3nw2OwRxk9lKrt/YpaBXwi5aE/Qn3W9PRf4="; + }; + + cargoSha256 = "sha256-cFezB7uwUznC/8NXJNrBqP0lf0sXAQBoGksXFOGrUIg="; + + nativeBuildInputs = [ makeWrapper ]; + + postInstall = '' + # `ctags` must be accessible in `PATH` for `ptags` to work. + wrapProgram "$out/bin/ptags" \ + --prefix PATH : "${lib.makeBinPath [ ctags ]}" + ''; + + # Sanity check. + checkPhase = '' + $releaseDir/ptags --help > /dev/null + ''; + + meta = with lib; { + description = "A parallel universal-ctags wrapper for git repository"; + homepage = "https://github.com/dalance/ptags"; + maintainers = with maintainers; [ pamplemousse ]; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pwndbg/default.nix b/nixpkgs/pkgs/development/tools/misc/pwndbg/default.nix new file mode 100644 index 000000000000..d80fa230c8a4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pwndbg/default.nix @@ -0,0 +1,62 @@ +{ lib +, stdenv +, python3 +, fetchFromGitHub +, makeWrapper +, gdb +}: + +let + pythonPath = with python3.pkgs; makePythonPath [ + capstone + future + psutil + pwntools + pycparser + pyelftools + pygments + unicorn + rpyc + ]; + binPath = lib.makeBinPath ([ + python3.pkgs.pwntools # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/wrappers/checksec.py#L8 + ] ++ lib.optionals stdenv.isLinux [ + python3.pkgs.ropper # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/commands/ropper.py#L30 + python3.pkgs.ropgadget # ref: https://github.com/pwndbg/pwndbg/blob/2022.12.19/pwndbg/commands/rop.py#L32 + ]); + +in stdenv.mkDerivation rec { + pname = "pwndbg"; + version = "2022.12.19"; + format = "other"; + + src = fetchFromGitHub { + owner = "pwndbg"; + repo = "pwndbg"; + rev = version; + sha256 = "sha256-pyY2bMasd6GaJZZjLF48SvkKUBw3XfVa0g3Q0LiEi4k="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/share/pwndbg + cp -r *.py pwndbg gdb-pt-dump $out/share/pwndbg + chmod +x $out/share/pwndbg/gdbinit.py + makeWrapper ${gdb}/bin/gdb $out/bin/pwndbg \ + --add-flags "-q -x $out/share/pwndbg/gdbinit.py" \ + --prefix PATH : ${binPath} \ + --set NIX_PYTHONPATH ${pythonPath} + ''; + + meta = with lib; { + description = "Exploit Development and Reverse Engineering with GDB Made Easy"; + homepage = "https://github.com/pwndbg/pwndbg"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ mic92 patryk4815 ]; + # not supported on aarch64-darwin see: https://inbox.sourceware.org/gdb/3185c3b8-8a91-4beb-a5d5-9db6afb93713@Spark/ + broken = stdenv.isDarwin && stdenv.isAarch64; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/pwninit/default.nix b/nixpkgs/pkgs/development/tools/misc/pwninit/default.nix new file mode 100644 index 000000000000..dcea47449cab --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/pwninit/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, openssl +, pkg-config +, xz +, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "pwninit"; + version = "3.3.0"; + + src = fetchFromGitHub { + owner = "io12"; + repo = "pwninit"; + rev = version; + sha256 = "sha256-Tskbwavr+MFa8wmwaFGe7o4/6ZpZqczzwOnqFR66mmM="; + }; + + buildInputs = [ openssl xz ] ++ lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkg-config ]; + doCheck = false; # there are no tests to run + + cargoSha256 = "sha256-LPypmFeF9NZOX1ogpIqc++Pun7pInKzpxYiGUvSUcso="; + + meta = { + description = "Automate starting binary exploit challenges"; + homepage = "https://github.com/io12/pwninit"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.scoder12 ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/python-launcher/default.nix b/nixpkgs/pkgs/development/tools/misc/python-launcher/default.nix new file mode 100644 index 000000000000..c1d07cf0c761 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/python-launcher/default.nix @@ -0,0 +1,28 @@ +{ lib, rustPlatform, fetchFromGitHub, python3 }: + +rustPlatform.buildRustPackage rec { + pname = "python-launcher"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "brettcannon"; + repo = pname; + rev = "v${version}"; + sha256 = "1r2pmli4jsdjag9zsgd9q1qlj3hxxjj2bni6yybjh1a10fcqxzzv"; + }; + + cargoSha256 = "sha256-2lgWybEPi6HEUMYuGDRWMjWoc94CrFHPP5IeKUjj0q4="; + + nativeCheckInputs = [ python3 ]; + + useNextest = true; + + meta = with lib; { + description = "An implementation of the `py` command for Unix-based platforms"; + homepage = "https://github.com/brettcannon/python-launcher"; + changelog = "https://github.com/brettcannon/python-launcher/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "py"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/qtspim/default.nix b/nixpkgs/pkgs/development/tools/misc/qtspim/default.nix new file mode 100644 index 000000000000..1ef63f1a431d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/qtspim/default.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, fetchsvn, wrapQtAppsHook, qtbase, qttools, qmake, bison, flex, ... }: +stdenv.mkDerivation rec { + pname = "qtspim"; + version = "9.1.23"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/spimsimulator/code/"; + rev = "r749"; + sha256 = "0iazl7mlcilrdbw8gb98v868a8ldw2lmkn1xs8hnfvr93l6aj0rp"; + }; + + postPatch = '' + cd QtSpim + + 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 = "https://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ emilytrau ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/regex-cli/default.nix b/nixpkgs/pkgs/development/tools/misc/regex-cli/default.nix new file mode 100644 index 000000000000..5a1c7d7314be --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/regex-cli/default.nix @@ -0,0 +1,23 @@ +{ lib +, rustPlatform +, fetchCrate +}: + +rustPlatform.buildRustPackage rec { + pname = "regex-cli"; + version = "0.1.1"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-i+3HluKbR+5e2Nd0E0Xy+mwsC9x3+21rFdCNmII8HsM="; + }; + + cargoHash = "sha256-u6Gaeo9XDcyxZwBt67IF1X7rr4vR9jIrzr8keHGU88w="; + + meta = with lib; { + description = "A command line tool for debugging, ad hoc benchmarking and generating regular expressions"; + homepage = "https://github.com/rust-lang/regex/tree/master/regex-cli"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable-toolchain/default.nix b/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable-toolchain/default.nix new file mode 100644 index 000000000000..2dba7768cf8c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable-toolchain/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, libarchive, python3, file, which }: + +stdenv.mkDerivation rec { + pname = "remarkable-toolchain"; + version = "3.1.2"; + + src = fetchurl { + url = "https://storage.googleapis.com/remarkable-codex-toolchain/codex-x86_64-cortexa9hf-neon-rm10x-toolchain-${version}.sh"; + sha256 = "sha256-ocODUUx2pgmqxMk8J+D+OvqlSHBSay6YzcqnxC9n59w="; + executable = true; + }; + + nativeBuildInputs = [ + libarchive + python3 + file + which + ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out + ENVCLEANED=1 $src -y -d $out + ''; + + meta = with lib; { + description = "A toolchain for cross-compiling to reMarkable tablets"; + homepage = "https://remarkable.engineering/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ nickhu siraben ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable2-toolchain/default.nix b/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable2-toolchain/default.nix new file mode 100644 index 000000000000..2bb5e11e2432 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/remarkable/remarkable2-toolchain/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, libarchive, python3, file, which }: + +stdenv.mkDerivation rec { + pname = "remarkable2-toolchain"; + version = "3.1.2"; + + src = fetchurl { + url = "https://storage.googleapis.com/remarkable-codex-toolchain/codex-x86_64-cortexa7hf-neon-rm11x-toolchain-${version}.sh"; + sha256 = "sha256-JKMDRbkvoxwHiTm/o4JdLn3Mm2Ld1LyxTnCCwvnxk4c="; + executable = true; + }; + + nativeBuildInputs = [ + libarchive + python3 + file + which + ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out + ENVCLEANED=1 $src -y -d $out + ''; + + meta = with lib; { + description = "A toolchain for cross-compiling to reMarkable 2 tablets"; + homepage = "https://remarkable.engineering/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ tadfisher ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/replacement/default.nix b/nixpkgs/pkgs/development/tools/misc/replacement/default.nix new file mode 100644 index 000000000000..75c5363ff672 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/replacement/default.nix @@ -0,0 +1,46 @@ +{ lib +, fetchFromGitHub +, python3Packages +}: + +python3Packages.buildPythonApplication rec { + pname = "replacement"; + version = "0.4.4"; + + disabled = python3Packages.isPy27; + + src = fetchFromGitHub { + owner = "siriobalmelli"; + repo = "replacement"; + rev = "v${version}"; + sha256 = "0j4lvn3rx1kqvxcsd8nhc2lgk48jyyl7qffhlkvakhy60f9lymj3"; + }; + + propagatedBuildInputs = with python3Packages; [ + ruamel-yaml + ]; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + sh + ]; + + meta = with lib; { + homepage = "https://github.com/siriobalmelli/replacement"; + description = "A tool to execute yaml templates and output text"; + longDescription = '' + Replacement is a python utility + that parses a yaml template and outputs text. + + A 'template' is a YAML file containing a 'replacement' object. + + A 'replacement' object contains a list of blocks, + each of which is executed in sequence. + + This tool is useful in generating configuration files, + static websites and the like. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ siriobalmelli ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/reviewdog/default.nix b/nixpkgs/pkgs/development/tools/misc/reviewdog/default.nix new file mode 100644 index 000000000000..f2b2561cafdc --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/reviewdog/default.nix @@ -0,0 +1,29 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "reviewdog"; + version = "0.15.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + hash = "sha256-EKDs0Xv38RLC3qDkb8QT3CMWdi7tEPRXxhlZiC/dyZo="; + }; + + vendorHash = "sha256-IKndnxeLy9hLFzs0SesRQzii9h8MX9FrEcpHaaKIq4k="; + + doCheck = false; + + subPackages = [ "cmd/reviewdog" ]; + + ldflags = [ "-s" "-w" "-X github.com/reviewdog/reviewdog/commands.Version=${version}" ]; + + meta = with lib; { + description = "Automated code review tool integrated with any code analysis tools regardless of programming language"; + homepage = "https://github.com/reviewdog/reviewdog"; + changelog = "https://github.com/reviewdog/reviewdog/blob/v${version}/CHANGELOG.md"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rhai-doc/default.nix b/nixpkgs/pkgs/development/tools/misc/rhai-doc/default.nix new file mode 100644 index 000000000000..dd07b8df9926 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rhai-doc/default.nix @@ -0,0 +1,27 @@ +{ lib +, rustPlatform +, fetchFromGitHub +}: + +rustPlatform.buildRustPackage rec { + pname = "rhai-doc"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "rhaiscript"; + repo = "rhai-doc"; + rev = "v${version}"; + hash = "sha256-GZq5C8Q95OHKftEkps4Y6X6sAc4pzSfSq3ELUW/kPWI="; + }; + + cargoHash = "sha256-dJMqaDQVSrvZPwjPFixgqRRzxPJW/f1nO+81kHwGmYU="; + + meta = with lib; { + description = "Tool to auto-generate documentation for Rhai source code"; + homepage = "https://github.com/rhaiscript/rhai-doc"; + changelog = "https://github.com/rhaiscript/rhai-doc/releases/tag/${src.rev}"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "rhai-doc"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/riff/default.nix b/nixpkgs/pkgs/development/tools/misc/riff/default.nix new file mode 100644 index 000000000000..94096a2bc5e2 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/riff/default.nix @@ -0,0 +1,46 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, makeWrapper +, pkg-config +, openssl +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "riff"; + version = "1.0.3"; + + src = fetchFromGitHub { + owner = "DeterminateSystems"; + repo = pname; + rev = "v${version}"; + hash = "sha256-ThHkEvu+lWojHmEgcrwdZDPROfxznB7vv78msyZf90A="; + }; + + cargoHash = "sha256-knA08KqjtI2FZUbllfVETxDqi/r4Gf3VuLE17JujTzc="; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; + + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + postInstall = '' + wrapProgram $out/bin/riff --set-default RIFF_DISABLE_TELEMETRY true + ''; + + meta = with lib; { + description = "A tool that automatically provides external dependencies for software projects"; + homepage = "https://riff.sh"; + changelog = "https://github.com/DeterminateSystems/riff/releases/tag/v${version}"; + license = licenses.mpl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rman/default.nix b/nixpkgs/pkgs/development/tools/misc/rman/default.nix new file mode 100644 index 000000000000..99f3d8c13e74 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rman/default.nix @@ -0,0 +1,34 @@ +{lib, stdenv, fetchurl}: + +stdenv.mkDerivation rec { + pname = "rman"; + version = "3.2"; + + src = fetchurl { + url = "mirror://sourceforge/polyglotman/${version}/${pname}-${version}.tar.gz"; + sha256 = "0prdld6nbkdlkcgc2r1zp13h2fh8r0mlwxx423dnc695ddlk18b8"; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace ginstall install \ + --replace gcc '${stdenv.cc.targetPrefix}cc' + ''; + + makeFlags = [ "BINDIR=$(out)/bin" "MANDIR=$(out)/share/man" ]; + + preInstall = '' + mkdir -p $out/bin + mkdir -p $out/share/man + ''; + + hardeningDisable = [ "format" ]; + + doCheck = false; # "check" target is probably meant to do "installcheck" or something + + meta = { + description = "Parse formatted man pages and man page source from most flavors of UNIX and converts them to HTML, ASCII, TkMan, DocBook, and other formats"; + license = "artistic"; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rolespec/default.nix b/nixpkgs/pkgs/development/tools/misc/rolespec/default.nix new file mode 100644 index 000000000000..7b084fae891e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rolespec/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchFromGitHub, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "rolespec"; + version = "20161104"; + + src = fetchFromGitHub { + owner = "nickjj"; + repo = "rolespec"; + rev = "d9ee530cd709168882059776c482fc37f46cb743"; + sha256 = "1jkidw6aqr0zfqwmcvlpi9qa140z2pxcfsd43xm5ikx6jcwjdrzl"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + # The default build phase (`make`) runs the test code. It's difficult to do + # the test in the build environment because it depends on the system package + # managers (apt/yum/pacman). We simply skip this phase since RoleSpec is + # shell based. + dontBuild = true; + + # Wrap the program because `ROLESPEC_LIB` defaults to + # `/usr/local/lib/rolespec`. + installPhase = '' + make install PREFIX=$out + wrapProgram $out/bin/rolespec --set ROLESPEC_LIB $out/lib/rolespec + ''; + + # Since RoleSpec installs the shell script files in `lib` directory, the + # fixup phase shows some warnings. Disable these actions. + dontPatchELF = true; + dontStrip = true; + + meta = with lib; { + homepage = "https://github.com/nickjj/rolespec"; + description = "A test library for testing Ansible roles"; + longDescription = '' + A shell based test library for Ansible that works both locally and over + Travis-CI. + ''; + downloadPage = "https://github.com/nickjj/rolespec"; + license = licenses.gpl3; + maintainers = [ maintainers.dochang ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rsass/default.nix b/nixpkgs/pkgs/development/tools/misc/rsass/default.nix new file mode 100644 index 000000000000..da24ac06ca6d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rsass/default.nix @@ -0,0 +1,22 @@ +{ lib, rustPlatform, fetchCrate }: + +rustPlatform.buildRustPackage rec { + pname = "rsass"; + version = "0.28.0"; + + src = fetchCrate { + pname = "rsass-cli"; + inherit version; + hash = "sha256-hBYZB/Jyzd89dylZn2tYdHr0IXCFgJi9TnvuoVqCR1A="; + }; + + cargoHash = "sha256-nVTYTjmHB/z5M5AyojbsuZNCa3JCiADWrgV5eb3bcUE="; + + meta = with lib; { + description = "Sass reimplemented in rust with nom"; + homepage = "https://github.com/kaj/rsass"; + changelog = "https://github.com/kaj/rsass/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ mit /* or */ asl20 ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rsonpath/default.nix b/nixpkgs/pkgs/development/tools/misc/rsonpath/default.nix new file mode 100644 index 000000000000..fc9b48793faf --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rsonpath/default.nix @@ -0,0 +1,30 @@ +{ lib +, rustPlatform +, fetchFromGitHub +}: + +rustPlatform.buildRustPackage rec { + pname = "rsonpath"; + version = "0.8.3"; + + src = fetchFromGitHub { + owner = "v0ldek"; + repo = "rsonpath"; + rev = "v${version}"; + hash = "sha256-gAoxWdczeaN4VqeQY0qJeLK8aABGhuwXf41QFKUxAG0="; + }; + + cargoHash = "sha256-UXPVqc4RNIFKx0f/BPCfkJxilioXbRZSAgqQv1MzK7k="; + + cargoBuildFlags = [ "-p=rsonpath" ]; + cargoTestFlags = cargoBuildFlags; + + meta = with lib; { + description = "Experimental JSONPath engine for querying massive streamed datasets"; + homepage = "https://github.com/v0ldek/rsonpath"; + changelog = "https://github.com/v0ldek/rsonpath/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "rq"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rtss/default.nix b/nixpkgs/pkgs/development/tools/misc/rtss/default.nix new file mode 100644 index 000000000000..cb5b55b8894c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rtss/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "rtss"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "Freaky"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-WeeZsB42/4SlIaWwKvOqWiPNV5p0QOToynI8ozVVxJM="; + }; + + cargoSha256 = "sha256-aHK9KBzRbU2IYr7vOdlz0Aw4iYGjD6VedbWPE/V7AVc="; + + meta = with lib; { + description = "Annotate output with relative durations between lines"; + homepage = "https://github.com/Freaky/rtss"; + license = licenses.mit; + maintainers = with maintainers; [ djanatyn ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/runme/default.nix b/nixpkgs/pkgs/development/tools/misc/runme/default.nix new file mode 100644 index 000000000000..3795476c3e16 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/runme/default.nix @@ -0,0 +1,77 @@ +{ lib +, buildGo121Module +, fetchFromGitHub +, installShellFiles +, nodejs +, python3 +, runtimeShell +, stdenv +, testers +, runme +}: + +buildGo121Module rec { + pname = "runme"; + version = "1.7.8"; + + src = fetchFromGitHub { + owner = "stateful"; + repo = "runme"; + rev = "v${version}"; + hash = "sha256-ZM8gdZ26XAlC+j6U0+oQJIb+5gOGFUAYHPP82kA1ogU="; + }; + + vendorHash = "sha256-nKH4hT0J9QfrDdvovu/XNxU4PtZYKkfqEBiCTNLWyRA="; + + nativeBuildInputs = [ + installShellFiles + ]; + + nativeCheckInputs = [ + nodejs + python3 + ]; + + subPackages = [ + "." + ]; + + ldflags = [ + "-s" + "-w" + "-X=github.com/stateful/runme/internal/version.BuildDate=1970-01-01T00:00:00Z" + "-X=github.com/stateful/runme/internal/version.BuildVersion=${version}" + "-X=github.com/stateful/runme/internal/version.Commit=${src.rev}" + ]; + + postPatch = '' + substituteInPlace testdata/script/basic.txtar \ + --replace /bin/bash "${runtimeShell}" + ''; + + # version test assumes `ldflags` is unspecified + preCheck = '' + unset ldflags + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd runme \ + --bash <($out/bin/runme completion bash) \ + --fish <($out/bin/runme completion fish) \ + --zsh <($out/bin/runme completion zsh) + ''; + + passthru.tests = { + version = testers.testVersion { + package = runme; + }; + }; + + meta = with lib; { + description = "Execute commands inside your runbooks, docs, and READMEs"; + homepage = "https://runme.dev"; + changelog = "https://github.com/stateful/runme/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/rustywind/default.nix b/nixpkgs/pkgs/development/tools/misc/rustywind/default.nix new file mode 100644 index 000000000000..c30ace5d8c27 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/rustywind/default.nix @@ -0,0 +1,32 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "rustywind"; + version = "0.20.0"; + + src = fetchFromGitHub { + owner = "avencera"; + repo = "rustywind"; + rev = "v${version}"; + hash = "sha256-3VG3EIcNp1fcNctrQO+mcGkAObHYPZQGdU83mi7WxPs="; + }; + + cargoHash = "sha256-hqGhh3YZ8Pz0hhC+HNdwc7PZVzGeMZqmctVjbQx7SQo="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + meta = with lib; { + description = "CLI for organizing Tailwind CSS classes"; + homepage = "https://github.com/avencera/rustywind"; + changelog = "https://github.com/avencera/rustywind/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/saleae-logic-2/default.nix b/nixpkgs/pkgs/development/tools/misc/saleae-logic-2/default.nix new file mode 100644 index 000000000000..bd12125d83bd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/saleae-logic-2/default.nix @@ -0,0 +1,72 @@ +{ lib, fetchurl, makeDesktopItem, appimageTools }: +let + name = "saleae-logic-2"; + version = "2.4.9"; + src = fetchurl { + url = "https://downloads.saleae.com/logic2/Logic-${version}-linux-x64.AppImage"; + hash = "sha256-zM5XztFv+A7cNMqNPGAO5i0B45w6AMyRL4OR+tG03JY="; + }; + desktopItem = makeDesktopItem { + inherit name; + exec = name; + icon = "Logic"; + comment = "Software for Saleae logic analyzers"; + desktopName = "Saleae Logic"; + genericName = "Logic analyzer"; + categories = [ "Development" ]; + }; +in +appimageTools.wrapType2 { + inherit name src; + + extraInstallCommands = + let + appimageContents = appimageTools.extractType2 { inherit name src; }; + in + '' + mkdir -p $out/etc/udev/rules.d + cp ${appimageContents}/resources/linux-x64/99-SaleaeLogic.rules $out/etc/udev/rules.d/ + mkdir -p $out/share/pixmaps + ln -s ${desktopItem}/share/applications $out/share/ + cp ${appimageContents}/usr/share/icons/hicolor/256x256/apps/Logic.png $out/share/pixmaps/Logic.png + ''; + + extraPkgs = pkgs: with pkgs; [ + wget + unzip + glib + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrender + xorg.libXtst + nss + nspr + dbus + gdk-pixbuf + gtk3 + pango + atk + cairo + expat + xorg.libXrandr + xorg.libXScrnSaver + alsa-lib + at-spi2-core + cups + libxcrypt-legacy + ]; + + meta = with lib; { + homepage = "https://www.saleae.com/"; + description = "Software for Saleae logic analyzers"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ j-hui newam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/saleae-logic/default.nix b/nixpkgs/pkgs/development/tools/misc/saleae-logic/default.nix new file mode 100644 index 000000000000..d4f17fb595d0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/saleae-logic/default.nix @@ -0,0 +1,98 @@ +# Saleae logic analyzer software +# +# Suggested udev rules to be able to access the Logic device without being root: +# SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="0925", ATTR{idProduct}=="3881", MODE="0666" +# SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="21a9", ATTR{idProduct}=="1001", MODE="0666" +# +# In NixOS, simply add this package to services.udev.packages. + +{ lib, stdenv, fetchurl, unzip, glib, libSM, libICE, gtk2, libXext, libXft +, fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor +, freetype, libXinerama, libxcb, zlib, pciutils +, makeDesktopItem, xkeyboardconfig, dbus, runtimeShell, libGL +}: + +let + + libPath = lib.makeLibraryPath [ + glib libSM libICE gtk2 libXext libXft fontconfig libXrender libXfixes libX11 + libXi libXrandr libXcursor freetype libXinerama libxcb zlib stdenv.cc.cc.lib + dbus libGL + ]; + +in + +assert stdenv.hostPlatform.system == "x86_64-linux"; + +stdenv.mkDerivation rec { + pname = "saleae-logic"; + version = "1.2.18"; + + src = fetchurl { + name = "saleae-logic-${version}-64bit.zip"; + url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip"; + sha256 = "0lhair2vsg8sjvzicvfcjfmvy30q7i01xj4z02iqh7pgzpb025h8"; + }; + + desktopItem = makeDesktopItem { + name = "saleae-logic"; + exec = "saleae-logic"; + icon = ""; # the package contains no icon + comment = "Software for Saleae logic analyzers"; + desktopName = "Saleae Logic"; + genericName = "Logic analyzer"; + categories = [ "Development" ]; + }; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + # Copy prebuilt app to $out + mkdir "$out" + cp -r * "$out" + + # Patch it + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic" + for bin in "$out/Logic" \ + "$out/libQt5Widgets.so.5" \ + "$out/libQt5Gui.so.5" \ + "$out/libQt5Core.so.5" \ + "$out/libQt5Network.so.5" ; do + patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$bin" + done + + patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/../" "$out/platforms/libqxcb.so" + + # Build the LD_PRELOAD library that makes Logic work from a read-only directory + mkdir -p "$out/lib" + gcc -shared -fPIC -DOUT=\"$out\" "${./preload.c}" -o "$out/lib/preload.so" -ldl + + # Make wrapper script that uses the LD_PRELOAD library + mkdir -p "$out/bin" + cat > "$out/bin/saleae-logic" << EOF + #!${runtimeShell} + export LD_PRELOAD="$out/lib/preload.so" + export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb" + export PATH="${pciutils}/bin:\$PATH" + exec "$out/Logic" "\$@" + EOF + chmod a+x "$out"/bin/saleae-logic + + # Copy the generated .desktop file + mkdir -p "$out/share/applications" + cp "$desktopItem"/share/applications/* "$out/share/applications/" + + # Install provided udev rules + mkdir -p "$out/etc/udev/rules.d" + cp Drivers/99-SaleaeLogic.rules "$out/etc/udev/rules.d/" + ''; + + meta = with lib; { + description = "Software for Saleae logic analyzers"; + homepage = "https://www.saleae.com/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/saleae-logic/preload.c b/nixpkgs/pkgs/development/tools/misc/saleae-logic/preload.c new file mode 100644 index 000000000000..b4451e4d99f7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/saleae-logic/preload.c @@ -0,0 +1,341 @@ +/* + * LD_PRELOAD trick to make Saleae Logic work from a read-only installation + * directory. + * + * Saleae Logic tries to write to a few directories inside its installation + * directory. Because the Nix store is read-only, we have to redirect access to + * this file somewhere else. Here's the map: + * + * $out/Settings/ => $HOME/.saleae-logic/Settings/ + * $out/Databases/ => $HOME/.saleae-logic/Databases/ + * $out/Errors/ => $HOME/.saleae-logic/Errors/ + * $out/Calibration/ => $HOME/.saleae-logic/Calibration/ + * + * This also makes the software multi-user aware :-) + * + * NOTE: AFAIK (Bjørn Forsman), Logic version 1.2+ was supposed to have a + * command line parameter for redirecting these write operations, but + * apparently that feature got postponed. + * + * Usage: + * gcc -shared -fPIC -DOUT="$out" preload.c -o preload.so -ldl + * LD_PRELOAD=$PWD/preload.so ./result/Logic + * + * To see the paths that are modified at runtime, set the environment variable + * PRELOAD_DEBUG to 1 (or anything really; debugging is on as long as the + * variable exists). + */ + +#define _GNU_SOURCE +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <fcntl.h> +#include <dlfcn.h> +#include <limits.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <errno.h> + +#ifndef OUT +#error Missing OUT define - path to the installation directory. +#endif + +/* + * TODO: How to properly wrap "open", which is declared as a variadic function + * in glibc? The man page lists these signatures: + * + * int open(const char *pathname, int flags); + * int open(const char *pathname, int flags, mode_t mode); + * + * But using either signature in this code cause a compile error, because + * glibc has declared the function as "int open(const char *, int, ...)". + * Same thing with "openat". + * + * For now we discard the variadic args. It seems to work. + * + * Relevant: + * http://stackoverflow.com/questions/28462523/how-to-wrap-ioctlint-d-unsigned-long-request-using-ld-preload + */ +typedef FILE *(*fopen_func_t)(const char *path, const char *mode); +typedef FILE *(*fopen64_func_t)(const char *path, const char *mode); +typedef int (*open_func_t)(const char *pathname, int flags, ...); +typedef int (*open64_func_t)(const char *pathname, int flags, ...); +typedef int (*openat_func_t)(int dirfd, const char *pathname, int flags, ...); +typedef int (*openat64_func_t)(int dirfd, const char *pathname, int flags, ...); +typedef int (*xstat_func_t)(int vers, const char *pathname, struct stat *buf); +typedef int (*xstat64_func_t)(int vers, const char *pathname, struct stat64 *buf); +typedef int (*access_func_t)(const char *pathname, int mode); +typedef int (*faccessat_func_t)(int dirfd, const char *pathname, int mode, int flags); +typedef int (*unlink_func_t)(const char *pathname); + +/* + * Redirect $out/{Settings,Databases,Errors,Calibration}/ => $HOME/.saleae-logic/. + * Path is truncated if bigger than PATH_MAX. + * + * @param pathname Original file path. + * @param buffer Pointer to a buffer of size PATH_MAX bytes that this function + * will write the new redirected path to (if needed). + * + * @return Pointer to the resulting path. It will either be equal to the + * pathname (no redirect) or buffer argument (was redirected). + */ +static const char *redirect(const char *pathname, char *buffer) +{ + const char *homepath; + const char *new_path; + static char have_warned; + const char *remainder; + static char have_initialized; + static size_t out_strlen; + static size_t settings_strlen; + static size_t databases_strlen; + static size_t errors_strlen; + static size_t calibration_strlen; + int ret; + int i; + + homepath = getenv("HOME"); + if (!homepath) { + homepath = "/"; + if (!have_warned && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: WARNING: HOME is unset, using \"/\" (root) instead.\n"); + have_warned = 1; + } + } + + if (!have_initialized) { + /* + * The directories that Saleae Logic expects to find. + * The first element is intentionally empty (create base dir). + */ + char *dirs[] = {"", "/Settings", "/Databases", "/Errors", "/Calibration"}; + char old_settings_path[PATH_MAX]; + access_func_t orig_access; + + out_strlen = strlen(OUT); + settings_strlen = out_strlen + strlen("/Settings"); + databases_strlen = out_strlen + strlen("/Databases"); + errors_strlen = out_strlen + strlen("/Errors"); + calibration_strlen = out_strlen + strlen("/Calibration"); + for (i = 0; i < sizeof dirs / sizeof dirs[0]; i++) { + snprintf(buffer, PATH_MAX, "%s/.saleae-logic%s", homepath, dirs[i]); + buffer[PATH_MAX-1] = '\0'; + ret = mkdir(buffer, 0755); + if (0 != ret && errno != EEXIST) { + fprintf(stderr, "ERROR: Failed to create directory \"%s\": %s\n", + buffer, strerror(errno)); + return NULL; + } + } + + /* + * Automatic migration of the settings file: + * ~/.saleae-logic-settings.xml => ~/.saleae-logic/Settings/settings.xml + */ + snprintf(old_settings_path, PATH_MAX, "%s/.saleae-logic-settings.xml", homepath); + old_settings_path[PATH_MAX-1] = '\0'; + orig_access = (access_func_t)dlsym(RTLD_NEXT, "access"); + if (orig_access(old_settings_path, F_OK) == 0) { + snprintf(buffer, PATH_MAX, "%s/.saleae-logic/Settings/settings.xml", homepath); + buffer[PATH_MAX-1] = '\0'; + ret = rename(old_settings_path, buffer); + if (ret != 0) { + fprintf(stderr, "WARN: Failed to move %s to %s", + old_settings_path, buffer); + } + } + + have_initialized = 1; + } + + new_path = pathname; + remainder = pathname + out_strlen; + + if ((strncmp(OUT "/Settings", pathname, settings_strlen) == 0) || + (strncmp(OUT "/Databases", pathname, databases_strlen) == 0) || + (strncmp(OUT "/Errors", pathname, errors_strlen) == 0) || + (strncmp(OUT "/Calibration", pathname, calibration_strlen) == 0)) { + snprintf(buffer, PATH_MAX, "%s/.saleae-logic%s", homepath, remainder); + buffer[PATH_MAX-1] = '\0'; + new_path = buffer; + } + + return new_path; +} + +FILE *fopen(const char *pathname, const char *mode) +{ + const char *path; + char buffer[PATH_MAX]; + fopen_func_t orig_fopen; + + orig_fopen = (fopen_func_t)dlsym(RTLD_NEXT, "fopen"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: fopen(\"%s\", \"%s\") => \"%s\"\n", pathname, mode, path); + } + + return orig_fopen(path, mode); +} + +FILE *fopen64(const char *pathname, const char *mode) +{ + const char *path; + char buffer[PATH_MAX]; + fopen64_func_t orig_fopen64; + + orig_fopen64 = (fopen64_func_t)dlsym(RTLD_NEXT, "fopen64"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: fopen64(\"%s\", \"%s\") => \"%s\"\n", pathname, mode, path); + } + + return orig_fopen64(path, mode); +} + +int open(const char *pathname, int flags, ...) +{ + const char *path; + char buffer[PATH_MAX]; + open_func_t orig_open; + + orig_open = (open_func_t)dlsym(RTLD_NEXT, "open"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: open(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_open(path, flags); +} + +int open64(const char *pathname, int flags, ...) +{ + const char *path; + char buffer[PATH_MAX]; + open64_func_t orig_open64; + + orig_open64 = (open64_func_t)dlsym(RTLD_NEXT, "open64"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: open64(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_open64(path, flags); +} + +int openat(int dirfd, const char *pathname, int flags, ...) +{ + const char *path; + char buffer[PATH_MAX]; + openat_func_t orig_openat; + + orig_openat = (openat_func_t)dlsym(RTLD_NEXT, "openat"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: openat(%d, \"%s\", %#x) => \"%s\"\n", dirfd, pathname, flags, path); + } + + return orig_openat(dirfd, path, flags); +} + +int openat64(int dirfd, const char *pathname, int flags, ...) +{ + const char *path; + char buffer[PATH_MAX]; + openat64_func_t orig_openat64; + + orig_openat64 = (openat64_func_t)dlsym(RTLD_NEXT, "openat64"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: openat64(%d, \"%s\", %#x) => \"%s\"\n", dirfd, pathname, flags, path); + } + + return orig_openat64(dirfd, path, flags); +} + +/* + * Notes about "stat". + * + * The stat function is special, at least in glibc, in that it cannot be + * directly overridden by LD_PRELOAD, due to it being inline wrapper around + * __xstat. The __xstat functions take one extra parameter, a version number, + * to indicate what "struct stat" should look like. This trick allows changing + * the contents of mode_t without changing the shared library major number. See + * sys/stat.h header for more info. + */ +int __xstat(int vers, const char *pathname, struct stat *buf) +{ + const char *path; + char buffer[PATH_MAX]; + xstat_func_t orig_xstat; + + orig_xstat = (xstat_func_t)dlsym(RTLD_NEXT, "__xstat"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: (__x)stat(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_xstat(vers, path, buf); +} + +int __xstat64(int vers, const char *pathname, struct stat64 *buf) +{ + const char *path; + char buffer[PATH_MAX]; + xstat64_func_t orig_xstat64; + + orig_xstat64 = (xstat64_func_t)dlsym(RTLD_NEXT, "__xstat64"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: (__x)stat64(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_xstat64(vers, path, buf); +} + +int access(const char *pathname, int mode) +{ + const char *path; + char buffer[PATH_MAX]; + access_func_t orig_access; + + orig_access = (access_func_t)dlsym(RTLD_NEXT, "access"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: access(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_access(path, mode); +} + +int faccessat(int dirfd, const char *pathname, int mode, int flags) +{ + const char *path; + char buffer[PATH_MAX]; + faccessat_func_t orig_faccessat; + + orig_faccessat = (faccessat_func_t)dlsym(RTLD_NEXT, "faccessat"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: faccessat(\"%s\", ...) => \"%s\"\n", pathname, path); + } + + return orig_faccessat(dirfd, path, mode, flags); +} + +int unlink(const char *pathname) +{ + const char *path; + char buffer[PATH_MAX]; + unlink_func_t orig_unlink; + + orig_unlink = (unlink_func_t)dlsym(RTLD_NEXT, "unlink"); + path = redirect(pathname, buffer); + if (path != pathname && getenv("PRELOAD_DEBUG")) { + fprintf(stderr, "preload_debug: unlink(\"%s\") => \"%s\"\n", pathname, path); + } + + return orig_unlink(path); +} diff --git a/nixpkgs/pkgs/development/tools/misc/samply/default.nix b/nixpkgs/pkgs/development/tools/misc/samply/default.nix new file mode 100644 index 000000000000..9d70b9bc14d6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/samply/default.nix @@ -0,0 +1,55 @@ +{ lib +, rustPlatform +, fetchCrate +, jq +, moreutils +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "samply"; + version = "0.11.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-V0uAS7Oo7wv0yU5CgqqYhltwM5PXJ3GP/TLVZV2GkkI="; + }; + + cargoHash = "sha256-jsuICNVY3noZi/+mgVj9uUu53z+5bW9Vi5CBKcHOqSI="; + + # the dependencies linux-perf-data and linux-perf-event-reader contains both README.md and Readme.md, + # which causes a hash mismatch on systems with a case-insensitive filesystem + # this removes the readme files and updates cargo's checksum file accordingly + depsExtraArgs = { + nativeBuildInputs = [ + jq + moreutils + ]; + + postBuild = '' + for crate in linux-perf-data linux-perf-event-reader; do + pushd $name/$crate + + rm -f README.md Readme.md + jq 'del(.files."README.md") | del(.files."Readme.md")' \ + .cargo-checksum.json -c \ + | sponge .cargo-checksum.json + + popd + done + ''; + }; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ]; + + meta = with lib; { + description = "A command line profiler for macOS and Linux"; + homepage = "https://github.com/mstange/samply"; + changelog = "https://github.com/mstange/samply/releases/tag/samply-v${version}"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/scc/default.nix b/nixpkgs/pkgs/development/tools/misc/scc/default.nix new file mode 100644 index 000000000000..aef335756f87 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/scc/default.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "scc"; + version = "3.1.0"; + + src = fetchFromGitHub { + owner = "boyter"; + repo = "scc"; + rev = "v${version}"; + sha256 = "sha256-QViB9lS/znrFb7GoV0RUf1SwS7veTKlmFozWKM1zc+Y="; + }; + + vendorHash = null; + + # scc has a scripts/ sub-package that's for testing. + excludedPackages = [ "scripts" ]; + + meta = with lib; { + homepage = "https://github.com/boyter/scc"; + description = "A very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go"; + maintainers = with maintainers; [ sigma Br1ght0ne ]; + license = with licenses; [ unlicense /* or */ mit ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/sccache/default.nix b/nixpkgs/pkgs/development/tools/misc/sccache/default.nix new file mode 100644 index 000000000000..f268a95614fe --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sccache/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchFromGitHub, rustPlatform, pkg-config, openssl, stdenv, Security }: + +rustPlatform.buildRustPackage rec { + version = "0.5.4"; + pname = "sccache"; + + src = fetchFromGitHub { + owner = "mozilla"; + repo = "sccache"; + rev = "v${version}"; + sha256 = "sha256-CaZM8c1dref98VL240PEUQE8XtWAvVlQSGnPQspg+jw="; + }; + + cargoSha256 = "sha256-F4lnE5ig3UnZJOdxpnGLesDP3rgEOFzZO0WGQ8mtj+o="; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + + # Tests fail because of client server setup which is not possible inside the pure environment, + # see https://github.com/mozilla/sccache/issues/460 + doCheck = false; + + meta = with lib; { + description = "Ccache with Cloud Storage"; + homepage = "https://github.com/mozilla/sccache"; + changelog = "https://github.com/mozilla/sccache/releases/tag/v${version}"; + maintainers = with maintainers; [ doronbehar figsoda ]; + license = licenses.asl20; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/scip/default.nix b/nixpkgs/pkgs/development/tools/misc/scip/default.nix new file mode 100644 index 000000000000..36fb940f19c7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/scip/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, fetchpatch +, testers +, scip +}: + +buildGoModule rec { + pname = "scip"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "sourcegraph"; + repo = "scip"; + rev = "v${version}"; + hash = "sha256-tcnBv+dxuLD/ixeOLGrHu2UVfOnrfANjyaRzW5oDC94="; + }; + + vendorHash = "sha256-+IR3fc6tvSwPGDZ4DxrE48Ii3azcT0LMmID1LRAu5g8="; + + patches = [ + # update documentation to fix broken test + # https://github.com/sourcegraph/scip/pull/174 + (fetchpatch { + name = "test-fix-out-of-sync-documentation.patch"; + url = "https://github.com/sourcegraph/scip/commit/7450b7701637956d4ae6669338c808234f7a7bfa.patch"; + hash = "sha256-Y5nAVHyy430xdN89ohA8XAssNdSSPq4y7QaesN48jVs="; + }) + ]; + + ldflags = [ + "-s" + "-w" + "-X=main.Reproducible=true" + ]; + + postInstall = '' + mv $out/bin/{cmd,scip} + ''; + + passthru.tests = { + version = testers.testVersion { + package = scip; + version = "v${version}"; + }; + }; + + meta = with lib; { + description = "SCIP Code Intelligence Protocol CLI"; + homepage = "https://github.com/sourcegraph/scip"; + changelog = "https://github.com/sourcegraph/scip/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/scriptisto/default.nix b/nixpkgs/pkgs/development/tools/misc/scriptisto/default.nix new file mode 100644 index 000000000000..9b7b287fce5d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/scriptisto/default.nix @@ -0,0 +1,35 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +}: + +rustPlatform.buildRustPackage rec { + pname = "scriptisto"; + version = "2.1.1"; + + src = fetchFromGitHub { + owner = "igor-petruk"; + repo = "scriptisto"; + rev = "v${version}"; + hash = "sha256-WQSgN1iX26tPPaJXLtU5Eo8kFahT6g+gZKJEDT6zj1E="; + }; + + cargoHash = "sha256-trDf6N7PMjxlum8Rx2TxGePM6UPzMlTU6ATyGzmFoNc="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installManPage man/* + ''; + + meta = with lib; { + description = "A language-agnostic \"shebang interpreter\" that enables you to write scripts in compiled languages"; + homepage = "https://github.com/igor-petruk/scriptisto"; + changelog = "https://github.com/igor-petruk/scriptisto/releases/tag/${src.rev}"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/seer/default.nix b/nixpkgs/pkgs/development/tools/misc/seer/default.nix new file mode 100644 index 000000000000..92bc871185ff --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/seer/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, cmake, gdb, qtcharts, qtbase, wrapQtAppsHook }: + +stdenv.mkDerivation rec { + pname = "seer"; + version = "1.17"; + + src = fetchFromGitHub { + owner = "epasveer"; + repo = "seer"; + rev = "v${version}"; + sha256 = "sha256-lM6w+QwIRYP/2JDx4yynJxhVXt8SouOWgsLGXSwolIw="; + }; + + preConfigure = '' + cd src + ''; + + patchPhase = '' + substituteInPlace src/{SeerGdbConfigPage,SeerMainWindow,SeerGdbWidget}.cpp \ + --replace "/usr/bin/gdb" "${gdb}/bin/gdb" + ''; + + buildInputs = [ qtbase qtcharts ]; + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + + meta = with lib; { + description = "A Qt gui frontend for GDB"; + homepage = "https://github.com/epasveer/seer"; + license = licenses.gpl3Only; + platforms = platforms.linux; + maintainers = with maintainers; [ foolnotion ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/segger-ozone/default.nix b/nixpkgs/pkgs/development/tools/misc/segger-ozone/default.nix new file mode 100644 index 000000000000..9e048df45767 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/segger-ozone/default.nix @@ -0,0 +1,85 @@ +{ stdenv +, fetchurl +, fontconfig +, freetype +, lib +, libICE +, libSM +, udev +, libX11 +, libXcursor +, libXext +, libXfixes +, libXrandr +, libXrender +}: + +stdenv.mkDerivation rec { + pname = "segger-ozone"; + version = "3.28e"; + + src = fetchurl { + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${(lib.replaceStrings ["."] [""] version)}_x86_64.tgz"; + sha256 = "BfmKBAKyTA0V31zkwFLrbT0Xob221KfHa6v0VxKFsSI="; + }; + + rpath = lib.makeLibraryPath [ + fontconfig + freetype + libICE + libSM + udev + libX11 + libXcursor + libXext + libXfixes + libXrandr + libXrender + ] + + ":${stdenv.cc.cc.lib}/lib64"; + + installPhase = '' + mkdir -p $out/bin + mv Lib lib + mv * $out + ln -s $out/Ozone $out/bin + ''; + + postFixup = '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Ozone" \ + --set-rpath ${rpath}:$out/lib "$out/Ozone" + + for file in $(find $out/lib -maxdepth 1 -type f -and -name \*.so\*); do + patchelf --set-rpath ${rpath}:$out/lib $file + done + ''; + + meta = with lib; { + description = "J-Link Debugger and Performance Analyzer"; + longDescription = '' + Ozone is a cross-platform debugger and performance analyzer for J-Link + and J-Trace. + + - Stand-alone graphical debugger + - Debug output of any tool chain and IDE 1 + - C/C++ source level debugging and assembly instruction debugging + - Debug information windows for any purpose: disassembly, memory, + globals and locals, (live) watches, CPU and peripheral registers + - Source editor to fix bugs immediately + - High-speed programming of the application into the target + - Direct use of J-Link built-in features (Unlimited Flash + Breakpoints, Flash Download, Real Time Terminal, Instruction Trace) + - Scriptable project files to set up everything automatically + - New project wizard to ease the basic configuration of new projects + + 1 Ozone has been tested with the output of the following compilers: + GCC, Clang, ARM, IAR. Output of other compilers may be supported but is + not guaranteed to be. + ''; + homepage = "https://www.segger.com/products/development-tools/ozone-j-link-debugger"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + maintainers = [ maintainers.bmilanov ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/semver-tool/default.nix b/nixpkgs/pkgs/development/tools/misc/semver-tool/default.nix new file mode 100644 index 000000000000..a26c99171662 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/semver-tool/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "semver-tool"; + version = "3.4.0"; + + src = fetchFromGitHub { + owner = "fsaintjacques"; + repo = pname; + rev = version; + sha256 = "sha256-BnHuiCxE0VjzMWFTEMunQ9mkebQKIKbbMxZVfBUO57Y="; + }; + + dontBuild = true; # otherwise we try to 'make' which fails. + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + install src/semver $out/bin + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/fsaintjacques/semver-tool"; + description = "semver bash implementation"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = [ maintainers.qyliss ]; + mainProgram = "semver"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/sipp/default.nix b/nixpkgs/pkgs/development/tools/misc/sipp/default.nix new file mode 100644 index 000000000000..297669733c0e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sipp/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchurl, ncurses, libpcap, cmake, openssl, git, lksctp-tools }: + +stdenv.mkDerivation rec { + version = "3.6.1"; + pname = "sipp"; + + src = fetchurl { + url = "https://github.com/SIPp/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz"; + sha256 = "sha256-alYOg6/5gvMx3byt+zvVMMWJbNW3V91utoITPMhg7LE="; + }; + + postPatch = '' + cp version.h src/version.h + ''; + + cmakeFlags = [ + "-DUSE_GSL=1" + "-DUSE_PCAP=1" + "-DUSE_SSL=1" + "-DUSE_SCTP=${if stdenv.isLinux then "1" else "0"}" + + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ]; + enableParallelBuilding = true; + + nativeBuildInputs = [ cmake git ]; + buildInputs = [ ncurses libpcap openssl ] + ++ lib.optional (stdenv.isLinux) lksctp-tools; + + meta = with lib; { + homepage = "http://sipp.sf.net"; + description = "The SIPp testing tool"; + license = licenses.gpl3; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/slint-lsp/default.nix b/nixpkgs/pkgs/development/tools/misc/slint-lsp/default.nix new file mode 100644 index 000000000000..0eb55d14c005 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/slint-lsp/default.nix @@ -0,0 +1,62 @@ +{ lib +, stdenv +, rustPlatform +, fetchCrate +, pkg-config +, cmake +, fontconfig +, libGL +, xorg +, libxkbcommon +, wayland + # Darwin Frameworks +, AppKit +, CoreGraphics +, CoreServices +, CoreText +, Foundation +, libiconv +, OpenGL +}: + +let + rpathLibs = [ fontconfig libGL xorg.libxcb xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi ] + ++ lib.optionals stdenv.isLinux [ libxkbcommon wayland ]; +in +rustPlatform.buildRustPackage rec { + pname = "slint-lsp"; + version = "1.2.2"; + + src = fetchCrate { + inherit pname version; + sha256 = "sha256-+1nuezax7aV9b+L11zzIouA8QEWduqBzPiT6jvCGMac="; + }; + + cargoHash = "sha256-o7HDhNtjA0/JybJCiEejR8PcRIdJim+/wq4q8xj9A5Q="; + + nativeBuildInputs = [ cmake pkg-config fontconfig ]; + buildInputs = rpathLibs ++ [ xorg.libxcb.dev ] + ++ lib.optionals stdenv.isDarwin [ + AppKit + CoreGraphics + CoreServices + CoreText + Foundation + libiconv + OpenGL + ]; + + postInstall = lib.optionalString stdenv.isLinux '' + patchelf --set-rpath ${lib.makeLibraryPath rpathLibs} $out/bin/slint-lsp + ''; + + dontPatchELF = true; + + meta = with lib; { + description = "Language Server Protocol (LSP) for Slint UI language"; + homepage = "https://slint-ui.com/"; + changelog = "https://github.com/slint-ui/slint/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ xgroleau ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/sloccount/default.nix b/nixpkgs/pkgs/development/tools/misc/sloccount/default.nix new file mode 100644 index 000000000000..fc619612a48b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sloccount/default.nix @@ -0,0 +1,73 @@ +{ fetchurl, lib, stdenv, perl, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "sloccount"; + version = "2.26"; + + src = fetchurl { + url = "https://www.dwheeler.com/${pname}/${pname}-${version}.tar.gz"; + sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl ]; + + # Make sure the Flex-generated files are newer than the `.l' files, so that + # Flex isn't needed to recompile them. + patchPhase = '' + for file in * + do + if grep -q /usr/bin/perl "$file" + then + echo "patching \`$file'..." + substituteInPlace "$file" --replace \ + "/usr/bin/perl" "${perl}/bin/perl" + fi + done + + for file in *.l + do + touch "$(echo $file | sed -es'/\.l$/.c/g')" + done + ''; + + makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ]; + + doCheck = true; + checkPhase = ''HOME="$TMPDIR" PATH="$PWD:$PATH" make test''; + + preInstall = '' + mkdir -p "$out/bin" + mkdir -p "$out/share/man/man1" + mkdir -p "$out/share/doc" + ''; + + postInstall = '' + for w in "$out/bin"/*; do + isScript "$w" || continue + wrapProgram "$w" --prefix PATH : "$out/bin" + done + ''; + + meta = { + description = "Set of tools for counting physical Source Lines of Code (SLOC)"; + + longDescription = '' + This is the home page of "SLOCCount", a set of tools for + counting physical Source Lines of Code (SLOC) in a large number + of languages of a potentially large set of programs. This suite + of tools was used in my papers More than a Gigabuck: Estimating + GNU/Linux's Size and Estimating Linux's Size to measure the SLOC + of entire GNU/Linux distributions, and my essay Linux Kernel + 2.6: It's Worth More! Others have measured Debian GNU/Linux and + the Perl CPAN library using this tool suite. + ''; + + license = lib.licenses.gpl2Plus; + + homepage = "https://www.dwheeler.com/sloccount/"; + + maintainers = [ ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/spruce/default.nix b/nixpkgs/pkgs/development/tools/misc/spruce/default.nix new file mode 100644 index 000000000000..2cf0f184a729 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/spruce/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "spruce"; + version = "1.31.0"; + + src = fetchFromGitHub { + owner = "geofffranks"; + repo = pname; + rev = "v${version}"; + hash = "sha256-7BZl3GPEuXdZptbkChlmdUkxfIkA3B3IdPFO46zejQ4="; + }; + + vendorHash = null; + + 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/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix b/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix new file mode 100644 index 000000000000..32235e85c48d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sqitch/default.nix @@ -0,0 +1,48 @@ +{ stdenv +, lib +, perlPackages +, makeWrapper +, shortenPerlShebang +, mysqlSupport ? false +, postgresqlSupport ? false +, templateToolkitSupport ? false +}: + +let + sqitch = perlPackages.AppSqitch; + modules = with perlPackages; [ AlgorithmBackoff ] + ++ lib.optional mysqlSupport DBDmysql + ++ lib.optional postgresqlSupport DBDPg + ++ lib.optional templateToolkitSupport TemplateToolkit; +in + +stdenv.mkDerivation { + pname = "sqitch"; + version = sqitch.version; + + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; + + src = sqitch; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + for d in bin/sqitch etc lib share ; do + # make sure dest alreay exists before symlink + # this prevents installing a broken link into the path + if [ -e ${sqitch}/$d ]; then + ln -s ${sqitch}/$d $out/$d + fi + done + '' + lib.optionalString stdenv.isDarwin '' + shortenPerlShebang $out/bin/sqitch + ''; + dontStrip = true; + postFixup = '' + wrapProgram $out/bin/sqitch --prefix PERL5LIB : ${lib.escapeShellArg (perlPackages.makeFullPerlPath modules)} + ''; + + meta = { + inherit (sqitch.meta) description homepage license platforms; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/src-cli/default.nix b/nixpkgs/pkgs/development/tools/misc/src-cli/default.nix new file mode 100644 index 000000000000..28088a89b338 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/src-cli/default.nix @@ -0,0 +1,57 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, stdenv +, xorg +, darwin +, testers +, src-cli +}: + +buildGoModule rec { + pname = "src-cli"; + version = "5.2.0"; + + src = fetchFromGitHub { + owner = "sourcegraph"; + repo = "src-cli"; + rev = version; + hash = "sha256-QUcN71Zvg9BSQHXu8ANye9BOX5cDgMgl2jfhUgz/GVE="; + }; + + vendorHash = "sha256-YhaxgEGYKrRZagnpoMi/mGWXVkbp5fUjQ73xDFdTElw="; + + subPackages = [ + "cmd/src" + ]; + + buildInputs = lib.optionals stdenv.isLinux [ + xorg.libX11 + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Cocoa + ]; + + ldflags = [ + "-s" + "-w" + "-X=github.com/sourcegraph/src-cli/internal/version.BuildTag=${version}" + ]; + + __darwinAllowLocalNetworking = true; + + passthru.tests = { + version = testers.testVersion { + package = src-cli; + command = "src version || true"; + }; + }; + + meta = with lib; { + description = "Sourcegraph CLI"; + homepage = "https://github.com/sourcegraph/src-cli"; + changelog = "https://github.com/sourcegraph/src-cli/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "src"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/srecord/default.nix b/nixpkgs/pkgs/development/tools/misc/srecord/default.nix new file mode 100644 index 000000000000..1d542383bfb0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/srecord/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchurl, boost, libtool, groff, ghostscript, libgcrypt ? null }: + +stdenv.mkDerivation rec { + pname = "srecord"; + version = "1.64"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1qk75q0k5vzmm3932q9hqz2gp8n9rrdfjacsswxc02656f3l3929"; + }; + + buildInputs = [ boost libtool groff ghostscript libgcrypt ]; + + configureFlags = lib.optional (libgcrypt == null) "--without-gcrypt"; + + meta = with lib; { + description = "Collection of powerful tools for manipulating EPROM load files"; + homepage = "https://srecord.sourceforge.net/"; + license = licenses.gpl3Plus; + maintainers = [ maintainers.bjornfor ]; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/stlink/default.nix b/nixpkgs/pkgs/development/tools/misc/stlink/default.nix new file mode 100644 index 000000000000..850d0ea21bf8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/stlink/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, libusb1 +, gtk3 +, pkg-config +, wrapGAppsHook +, withGUI ? false +}: + +let + # The Darwin build of stlink explicitly refers to static libusb. + libusb1' = if stdenv.isDarwin then libusb1.override { withStatic = true; } else libusb1; + +# IMPORTANT: You need permissions to access the stlink usb devices. +# Add services.udev.packages = [ pkgs.stlink ] to your configuration.nix + +in stdenv.mkDerivation rec { + pname = "stlink"; + version = "1.7.0"; + + src = fetchFromGitHub { + owner = "stlink-org"; + repo = "stlink"; + rev = "v${version}"; + sha256 = "03xypffpbp4imrczbxmq69vgkr7mbp0ps9dk815br5wwlz6vgygl"; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/stlink-org/stlink/commit/468b1d2daa853b975c33ab69876c486734f2c6a7.diff"; + sha256 = "sha256-ueSi/zc7xbOATl0yBtCL4U64IQ/yqu6sMYDOiPl1JBI="; + }) + ]; + + buildInputs = [ + libusb1' + ] ++ lib.optionals withGUI [ + gtk3 + ]; + nativeBuildInputs = [ + cmake + ] ++ lib.optionals withGUI [ + pkg-config + wrapGAppsHook + ]; + + cmakeFlags = [ + "-DSTLINK_MODPROBED_DIR=${placeholder "out"}/etc/modprobe.d" + "-DSTLINK_UDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d" + ]; + + meta = with lib; { + description = "In-circuit debug and programming for ST-Link devices"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = [ maintainers.bjornfor maintainers.rongcuid ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/strace-analyzer/default.nix b/nixpkgs/pkgs/development/tools/misc/strace-analyzer/default.nix new file mode 100644 index 000000000000..db0591cab10a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/strace-analyzer/default.nix @@ -0,0 +1,34 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, strace +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "strace-analyzer"; + version = "0.5.2"; + + src = fetchFromGitHub { + owner = "wookietreiber"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-wx0/Jb2uaS1qdRQymfE00IEOyfgLtD4lXYasaJgcoxo="; + }; + + cargoHash = "sha256-3OS3LEEk58+IJDQrgwo+BJq6hblojk22QxDtZY5ofA4="; + + nativeCheckInputs = [ strace ]; + + checkFlags = lib.optionals stdenv.isAarch64 [ + # thread 'analysis::tests::analyze_dd' panicked at 'assertion failed: ...' + "--skip=analysis::tests::analyze_dd" + ]; + + meta = with lib; { + description = "Analyzes strace output"; + homepage = "https://github.com/wookietreiber/strace-analyzer"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/strace/default.nix b/nixpkgs/pkgs/development/tools/misc/strace/default.nix new file mode 100644 index 000000000000..9640981526e4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/strace/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater }: + +stdenv.mkDerivation rec { + pname = "strace"; + version = "6.5"; + + src = fetchurl { + url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-37BRcCOJ4ZeaFRiStZAa/J6Tu8HHDYTJBq3jIkypGYA="; + }; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ perl ]; + + # On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace. + # The build will silently fall back and -k will not work on RISC-V. + buildInputs = [ libunwind ]; # support -k + + configureFlags = [ "--enable-mpers=check" ]; + + passthru.updateScript = gitUpdater { + # No nicer place to find latest release. + url = "https://github.com/strace/strace.git"; + rev-prefix = "v"; + }; + + meta = with lib; { + homepage = "https://strace.io/"; + description = "A system call tracer for Linux"; + license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite + platforms = platforms.linux; + maintainers = with maintainers; [ globin ma27 qyliss ]; + mainProgram = "strace"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix b/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix new file mode 100644 index 000000000000..ac03372d9761 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }: + +stdenv.mkDerivation rec { + pname = "swig"; + version = "2.0.12"; + + src = fetchFromGitHub { + owner = "swig"; + repo = "swig"; + rev = "rel-${version}"; + sha256 = "0khm9gh5pczfcihr0pbicaicc4v9kjm5ip2alvkhmbb3ga6njkcm"; + }; + + nativeBuildInputs = [ autoconf automake libtool bison ]; + buildInputs = [ pcre ]; + + configureFlags = [ "--without-tcl" ]; + + # Disable ccache documentation as it needs yodl + postPatch = '' + sed -i '/man1/d' CCache/Makefile.in + ''; + + preConfigure = '' + ./autogen.sh + ''; + + meta = with lib; { + description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages"; + homepage = "https://swig.org/"; + # Different types of licenses available: http://www.swig.org/Release/LICENSE . + license = licenses.gpl3Plus; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/swig/3.x.nix b/nixpkgs/pkgs/development/tools/misc/swig/3.x.nix new file mode 100644 index 000000000000..f50c02d3e0cd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/swig/3.x.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }: + +stdenv.mkDerivation rec { + pname = "swig"; + version = "3.0.12"; + + src = fetchFromGitHub { + owner = "swig"; + repo = "swig"; + rev = "rel-${version}"; + sha256 = "1wyffskbkzj5zyhjnnpip80xzsjcr3p0q5486z3wdwabnysnhn8n"; + }; + + PCRE_CONFIG = "${pcre.dev}/bin/pcre-config"; + nativeBuildInputs = [ autoconf automake libtool bison ]; + buildInputs = [ pcre ]; + + configureFlags = [ "--without-tcl" ]; + + # Disable ccache documentation as it needs yodl + postPatch = '' + sed -i '/man1/d' CCache/Makefile.in + ''; + + preConfigure = '' + ./autogen.sh + ''; + + meta = with lib; { + description = "An interface compiler that connects C/C++ code to higher-level languages"; + homepage = "https://swig.org/"; + # Different types of licenses available: http://www.swig.org/Release/LICENSE . + license = licenses.gpl3Plus; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/swig/4.nix b/nixpkgs/pkgs/development/tools/misc/swig/4.nix new file mode 100644 index 000000000000..6b6d1bc02db9 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/swig/4.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }: + +stdenv.mkDerivation rec { + pname = "swig"; + version = "4.0.2"; + + src = fetchFromGitHub { + owner = "swig"; + repo = "swig"; + rev = "rel-${version}"; + sha256 = "12vlps766xvwck8q0i280s8yx21qm2dxl34710ybpmz3c1cfdjsc"; + }; + + PCRE_CONFIG = "${pcre.dev}/bin/pcre-config"; + nativeBuildInputs = [ autoconf automake libtool bison ]; + buildInputs = [ pcre ]; + + configureFlags = [ "--without-tcl" ]; + + # Disable ccache documentation as it needs yodl + postPatch = '' + sed -i '/man1/d' CCache/Makefile.in + ''; + + preConfigure = '' + ./autogen.sh + ''; + + meta = with lib; { + description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages"; + homepage = "https://swig.org/"; + # Different types of licenses available: http://www.swig.org/Release/LICENSE . + license = licenses.gpl3Plus; + maintainers = with maintainers; [ orivej ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/swig/default.nix b/nixpkgs/pkgs/development/tools/misc/swig/default.nix new file mode 100644 index 000000000000..41f33f4db67f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/swig/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl, boost, tcl }: + +stdenv.mkDerivation rec { + pname = "swig"; + version = "1.3.40"; + + src = fetchurl { + url = "mirror://sourceforge/swig/${pname}-${version}.tar.gz"; + sha256 = "02dc8g8wy75nd2is1974rl24c6mdl0ai1vszs1xpg9nd7dlv6i8r"; + }; + + doCheck = !stdenv.isCygwin; + # 'make check' uses boost and tcl + buildInputs = lib.optionals doCheck [ boost tcl ]; + + configureFlags = [ "--disable-ccache" ]; + + + meta = with lib; { + description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages"; + homepage = "https://swig.org/"; + # Different types of licenses available: http://www.swig.org/Release/LICENSE . + license = licenses.gpl3Plus; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/sysbench/default.nix b/nixpkgs/pkgs/development/tools/misc/sysbench/default.nix new file mode 100644 index 000000000000..1e15c6ab0f2f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/sysbench/default.nix @@ -0,0 +1,56 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, pkg-config +, libmysqlclient +, libaio +, luajit +# For testing: +, testers +, sysbench +}: + +stdenv.mkDerivation rec { + pname = "sysbench"; + version = "1.0.20"; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ libmysqlclient luajit ] ++ lib.optionals stdenv.isLinux [ libaio ]; + + src = fetchFromGitHub { + owner = "akopytov"; + repo = pname; + rev = version; + sha256 = "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy"; + }; + + enableParallelBuilding = true; + + configureFlags = [ + # The bundled version does not build on aarch64-darwin: + # https://github.com/akopytov/sysbench/issues/416 + "--with-system-luajit" + ]; + + passthru.tests = { + versionTest = testers.testVersion { + package = sysbench; + }; + }; + + meta = { + description = "Modular, cross-platform and multi-threaded benchmark tool"; + longDescription = '' + sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT. + It is most frequently used for database benchmarks, but can also be used + to create arbitrarily complex workloads that do not involve a database + server. + ''; + homepage = "https://github.com/akopytov/sysbench"; + downloadPage = "https://github.com/akopytov/sysbench/releases/tag/${version}"; + changelog = "https://github.com/akopytov/sysbench/blob/${version}/ChangeLog"; + license = lib.licenses.gpl2; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/tcptrack/default.nix b/nixpkgs/pkgs/development/tools/misc/tcptrack/default.nix new file mode 100644 index 000000000000..cf3cdf586cc4 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tcptrack/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, libpcap }: + +stdenv.mkDerivation rec { + pname = "tcptrack"; + version = "unstable-2017-04-29"; + + src = fetchFromGitHub { + owner = "bchretien"; + repo = "tcptrack"; + rev = "2b096ac103af2884bbd7648cff8adcbadbda9394"; + sha256 = "0084g9s0ynv1az67j08q9nz4p07bqqz9k6w5lprzj3ljlh0x10gj"; + }; + + patches = [ + # Fix pending upstream inclusion for ncurses-6.3 support: + # https://github.com/bchretien/tcptrack/pull/10 + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/bchretien/tcptrack/commit/409007afbce8ec5a81312a2a4123dd83b62b4494.patch"; + sha256 = "00641jyr52ksww5bbzvxlprmbb36jnvzg2w1aj1jgnm75jiajcfc"; + }) + ]; + + buildInputs = [ ncurses libpcap ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + + meta = with lib; { + inherit (src.meta) homepage; + description = "libpcap based program for live TCP connection monitoring"; + license = licenses.lgpl21; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor maintainers.vrthra ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terracognita/default.nix b/nixpkgs/pkgs/development/tools/misc/terracognita/default.nix new file mode 100644 index 000000000000..55b13dad748b --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terracognita/default.nix @@ -0,0 +1,29 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "terracognita"; + version = "0.8.4"; + + src = fetchFromGitHub { + owner = "cycloidio"; + repo = pname; + rev = "v${version}"; + hash = "sha256-pPY8y+pQdk9/F7dnUBz/y4lvcR1k/EClywcZATArZVA="; + }; + + vendorHash = "sha256-ApnJH0uIClXbfXK+k4t9Tcayc2mfndoG9iMqZY3iWys="; + + doCheck = false; + + subPackages = [ "." ]; + + ldflags = [ "-s" "-w" "-X github.com/cycloidio/terracognita/cmd.Version=${version}" ]; + + meta = with lib; { + description = "Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration"; + homepage = "https://github.com/cycloidio/terracognita"; + changelog = "https://github.com/cycloidio/terracognita/raw/v${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terraform-ls/default.nix b/nixpkgs/pkgs/development/tools/misc/terraform-ls/default.nix new file mode 100644 index 000000000000..ca1f6337dbdb --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terraform-ls/default.nix @@ -0,0 +1,36 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "terraform-ls"; + version = "0.32.2"; + + src = fetchFromGitHub { + owner = "hashicorp"; + repo = pname; + rev = "v${version}"; + hash = "sha256-jMUPRgo/XS5nAq9fmonkFBgwY75AaLaZ+fw/qhgXpqE="; + }; + + vendorHash = "sha256-pUPZvx6og4aZCAvgLK1AdeRHSfnX89h+/6F/4mmUTFI="; + + ldflags = [ "-s" "-w" ]; + + # There's a mixture of tests that use networking and several that fail on aarch64 + doCheck = false; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/terraform-ls --help + $out/bin/terraform-ls --version | grep "${version}" + runHook postInstallCheck + ''; + + meta = with lib; { + description = "Terraform Language Server (official)"; + homepage = "https://github.com/hashicorp/terraform-ls"; + changelog = "https://github.com/hashicorp/terraform-ls/blob/v${version}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; [ mbaillie jk ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terraform-lsp/default.nix b/nixpkgs/pkgs/development/tools/misc/terraform-lsp/default.nix new file mode 100644 index 000000000000..332913e71130 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terraform-lsp/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "terraform-lsp"; + version = "0.0.12"; + + src = fetchFromGitHub { + owner = "juliosueiras"; + repo = pname; + rev = "v${version}"; + sha256 = "111350jbq0dp0qhk48j12hrlisd1fwzqpcv357igrbqf6ki7r78q"; + }; + + vendorHash = null; + + ldflags = [ "-s" "-w" "-X main.Version=${version}" "-X main.GitCommit=${src.rev}" ]; + + meta = with lib; { + description = "Language Server Protocol for Terraform"; + homepage = "https://github.com/juliosueiras/terraform-lsp"; + license = licenses.mit; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terraformer/default.nix b/nixpkgs/pkgs/development/tools/misc/terraformer/default.nix new file mode 100644 index 000000000000..4b6001a17c70 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terraformer/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "terraformer"; + version = "0.8.24"; + + src = fetchFromGitHub { + owner = "GoogleCloudPlatform"; + repo = pname; + rev = version; + sha256 = "sha256-paBj2vaBicXHMEei2HPW+d4fXWf8VnVhvcanXmo/5KI="; + }; + + vendorHash = "sha256-Rh2ZGSfa95Yw8GGjsZjwmj0o4qKpygbPsLCbzUTOBxQ="; + + subPackages = [ "." ]; + + meta = with lib; { + description = "CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code"; + homepage = "https://github.com/GoogleCloudPlatform/terraformer"; + license = licenses.asl20; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terramate/default.nix b/nixpkgs/pkgs/development/tools/misc/terramate/default.nix new file mode 100644 index 000000000000..b6efe2732dca --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terramate/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, git +}: + +buildGoModule rec { + pname = "terramate"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "terramate-io"; + repo = "terramate"; + rev = "v${version}"; + hash = "sha256-aOKUC1FtDDhdUbPUSLW6GrSwh6r29Y2ObC6y487W4Zc="; + }; + + vendorHash = "sha256-gl5xsaSkGXlh+MfieVBPHGAbYZVF3GBbIkmvVhlJvqw="; + + # required for version info + nativeBuildInputs = [ git ]; + + ldflags = [ "-extldflags" "-static" ]; + + meta = with lib; { + description = "Adds code generation, stacks, orchestration, change detection, data sharing and more to Terraform"; + homepage = "https://github.com/terramate-io/terramate"; + license = licenses.mpl20; + maintainers = with maintainers; [ dit7ya ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/terser/default.nix b/nixpkgs/pkgs/development/tools/misc/terser/default.nix new file mode 100644 index 000000000000..8b862bcc2cd3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/terser/default.nix @@ -0,0 +1,22 @@ +{ buildNpmPackage, fetchFromGitHub, lib }: + +buildNpmPackage rec { + pname = "terser"; + version = "5.19.3"; + + src = fetchFromGitHub { + owner = "terser"; + repo = "terser"; + rev = "v${version}"; + hash = "sha256-ZI5ElHnQwoCJspGL/v0PqddMUAAhQGWDZA9utWZD/nM="; + }; + + npmDepsHash = "sha256-M7LGXoZFBQrXpkiofnam7tgFkk6+N7ckPxTcwAAuqxU="; + + meta = with lib; { + description = "JavaScript parser, mangler and compressor toolkit for ES6+"; + homepage = "https://terser.org"; + license = licenses.bsd2; + maintainers = with maintainers; [ talyz ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/tet/default.nix b/nixpkgs/pkgs/development/tools/misc/tet/default.nix new file mode 100644 index 000000000000..6bfcb3129236 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tet/default.nix @@ -0,0 +1,29 @@ +{ fetchurl, lib, stdenv }: + +stdenv.mkDerivation ({ + version = "3.8"; + pname = "tet"; + + src = fetchurl { + url = "http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.tar.gz"; + sha256 = "1j57hv56df38w249l595b8rsgmsyvjkbysai03a9724gax5jl9av" ; + }; + + buildInputs = [ ]; + + patchPhase = "chmod +x configure"; + + configurePhase = "./configure -t lite"; + + buildPhase = "cd src; make; cd -"; + + installPhase = "cd src; make install; cd -; cp -vr $PWD $out"; + + meta = { + description = "The Test Environment Toolkit is used in test applications like The Open Group's UNIX Certification program and the Free Standards Group's LSB Certification program"; + homepage = "http://tetworks.opengroup.org/Products/tet.htm"; + license = lib.licenses.artistic1; + platforms = lib.platforms.unix; + maintainers = [ ]; + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/texi2html/default.nix b/nixpkgs/pkgs/development/tools/misc/texi2html/default.nix new file mode 100644 index 000000000000..98f846b7c2f7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texi2html/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchurl, perl, gettext, buildPackages }: + +stdenv.mkDerivation rec { + pname = "texi2html"; + version = "5.0"; + + src = fetchurl { + url = "mirror://savannah/texi2html/${pname}-${version}.tar.bz2"; + sha256 = "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"; + }; + + strictDeps = true; + + nativeBuildInputs = [ gettext perl ]; + buildInputs = [ perl ]; + + postPatch = '' + patchShebangs separated_to_hash.pl + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + for f in $out/bin/*; do + substituteInPlace $f --replace "${buildPackages.perl}" "${perl}" + done + ''; + + meta = with lib; { + description = "Perl script which converts Texinfo source files to HTML output"; + homepage = "https://www.nongnu.org/texi2html/"; + license = licenses.gpl2; + maintainers = [ maintainers.marcweber ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/4.13a.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/4.13a.nix new file mode 100644 index 000000000000..b8da38ace6fb --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/4.13a.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, texinfo, ncurses, xz }: + +stdenv.mkDerivation rec { + pname = "texinfo"; + version = "4.13a"; + + src = fetchurl { + url = "mirror://gnu/texinfo/${pname}-${version}.tar.lzma"; + sha256 = "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"; + }; + + buildInputs = [ ncurses ]; + nativeBuildInputs = [ xz ]; + + # Disabled because we don't have zdiff in the stdenv bootstrap. + #doCheck = true; + + meta = texinfo.meta // { branch = version; }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/5.2.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/5.2.nix new file mode 100644 index 000000000000..d395494984d5 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/5.2.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "5.2"; + sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/6.5.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/6.5.nix new file mode 100644 index 000000000000..34596f306581 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/6.5.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "6.5"; + sha256 = "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp"; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/6.7.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/6.7.nix new file mode 100644 index 000000000000..7915d6e3c6be --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/6.7.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "6.7"; + sha256 = "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q"; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/6.8.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/6.8.nix new file mode 100644 index 000000000000..992f695bc92c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/6.8.nix @@ -0,0 +1,8 @@ +import ./common.nix { + version = "6.8"; + sha256 = "1i7yb7mrp3inz25zbzv2pllr4y7d58v818f1as7iz8mw53nm7dwf"; + patches = [ + # glibc 2.34 compat + ./fix-glibc-2.34.patch + ]; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/7.0.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/7.0.nix new file mode 100644 index 000000000000..01788f40d78d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/7.0.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "7.0.3"; + sha256 = "sha256-dLQg0J1/Uo6E+XqjMPDdaamKYFPnpOAXZ+7RFQOIB78="; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/common.nix b/nixpkgs/pkgs/development/tools/misc/texinfo/common.nix new file mode 100644 index 000000000000..d8d63088ee7e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/common.nix @@ -0,0 +1,113 @@ +{ version, sha256, patches ? [] }: + +{ lib, stdenv, buildPackages, fetchurl, perl, xz, libintl, bash +, gnulib, gawk + +# we are a dependency of gcc, this simplifies bootstraping +, interactive ? false, ncurses, procps +}: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +let + crossBuildTools = stdenv.hostPlatform != stdenv.buildPlatform; +in + +with lib; + +stdenv.mkDerivation { + pname = "texinfo${optionalString interactive "-interactive"}"; + inherit version; + + src = fetchurl { + url = "mirror://gnu/texinfo/texinfo-${version}.tar.xz"; + inherit sha256; + }; + + patches = patches ++ optional crossBuildTools ./cross-tools-flags.patch; + + postPatch = '' + patchShebangs tp/maintain + '' + # This patch is needed for IEEE-standard long doubles on + # powerpc64; it does not apply cleanly to texinfo 5.x or + # earlier. It is merged upstream in texinfo 6.8. + + lib.optionalString (version == "6.7") '' + patch -p1 -d gnulib < ${gnulib.passthru.longdouble-redirect-patch} + ''; + + # ncurses is required to build `makedoc' + # this feature is introduced by the ./cross-tools-flags.patch + NATIVE_TOOLS_CFLAGS = if crossBuildTools then "-I${getDev buildPackages.ncurses}/include" else null; + NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null; + + strictDeps = true; + enableParallelBuilding = true; + + # A native compiler is needed to build tools needed at build time + depsBuildBuild = [ buildPackages.stdenv.cc perl ]; + + buildInputs = [ xz.bin bash libintl ] + ++ optionals stdenv.isSunOS [ libiconv gawk ] + ++ optional interactive ncurses; + + configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ] + # Perl XS modules are difficult to cross-compile and texinfo has pure Perl + # fallbacks. + # Also prevent the buildPlatform's awk being used in the texindex script + ++ optionals crossBuildTools [ "--enable-perl-xs=no" "TI_AWK=${gawk}/bin/awk" ] + ++ lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; + + installFlags = [ "TEXMF=$(out)/texmf-dist" ]; + installTargets = [ "install" "install-tex" ]; + + nativeCheckInputs = [ procps ]; + + doCheck = interactive + && !stdenv.isDarwin + && !stdenv.isSunOS; # flaky + + checkFlags = lib.optionals (!stdenv.hostPlatform.isMusl && lib.versionOlder version "7") [ + # Test is known to fail on various locales on texinfo-6.8: + # https://lists.gnu.org/r/bug-texinfo/2021-07/msg00012.html + "XFAIL_TESTS=test_scripts/layout_formatting_fr_icons.sh" + ]; + + postFixup = optionalString crossBuildTools '' + for f in "$out"/bin/{pod2texi,texi2any}; do + substituteInPlace "$f" \ + --replace ${buildPackages.perl}/bin/perl ${perl}/bin/perl + done + ''; + + meta = { + description = "The GNU documentation system"; + homepage = "https://www.gnu.org/software/texinfo/"; + changelog = "https://git.savannah.gnu.org/cgit/texinfo.git/plain/NEWS"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ vrthra oxij ]; + # see comment above in patches section + broken = stdenv.hostPlatform.isPower64 && lib.strings.versionOlder version "6.0"; + + longDescription = '' + Texinfo is the official documentation format of the GNU project. + It was invented by Richard Stallman and Bob Chassell many years + ago, loosely based on Brian Reid's Scribe and other formatting + languages of the time. It is used by many non-GNU projects as + well. + + Texinfo uses a single source file to produce output in a number + of formats, both online and printed (dvi, html, info, pdf, xml, + etc.). This means that instead of writing different documents + for online information and another for a printed manual, you + need write only one document. And when the work is revised, you + need revise only that one document. The Texinfo system is + well-integrated with GNU Emacs. + ''; + branch = version; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/cross-tools-flags.patch b/nixpkgs/pkgs/development/tools/misc/texinfo/cross-tools-flags.patch new file mode 100644 index 000000000000..f0a8c4dfdc1e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/cross-tools-flags.patch @@ -0,0 +1,13 @@ +diff -ur texinfo-6.5/configure texinfo-6.5-patched/configure +--- texinfo-6.5/configure 2017-09-13 03:50:18.000000000 +0900 ++++ texinfo-6.5-patched/configure 2019-12-28 17:39:06.692818866 +0900 +@@ -23281,7 +23281,7 @@ + # env -i gives this build host configure a clean environment; + # consequently, we have to re-initialize $PATH. +- env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \ +- PATH="$PATH" \ ++ env -i CC="$CC_FOR_BUILD" AR="$AR_FOR_BUILD" RANLIB="$RANLIB_FOR_BUILD" \ ++ PATH="$PATH" CFLAGS="$NATIVE_TOOLS_CFLAGS" LDFLAGS="$NATIVE_TOOLS_LDFLAGS" \ + tools_only=1 \ + ${confdir}/configure --build=${build} --host=${build} \ + --disable-rpath --disable-nls diff --git a/nixpkgs/pkgs/development/tools/misc/texinfo/fix-glibc-2.34.patch b/nixpkgs/pkgs/development/tools/misc/texinfo/fix-glibc-2.34.patch new file mode 100644 index 000000000000..60f2e63b7ce0 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texinfo/fix-glibc-2.34.patch @@ -0,0 +1,186 @@ + +Patch by Vitezslav Crhonek <vcrhonek@redhat.com> +Source: https://src.fedoraproject.org/rpms/texinfo/c/9b2cca4817fa4bd8d520fed05e9560fc7183dcdf?branch=rawhide + +diff -up texinfo-6.8/gnulib/lib/cdefs.h.orig texinfo-6.8/gnulib/lib/cdefs.h +--- texinfo-6.8/gnulib/lib/cdefs.h.orig 2021-03-11 19:57:53.000000000 +0100 ++++ texinfo-6.8/gnulib/lib/cdefs.h 2021-07-19 12:26:46.985176475 +0200 +@@ -321,15 +321,15 @@ + + /* The nonnull function attribute marks pointer parameters that + must not be NULL. */ +-#ifndef __attribute_nonnull__ ++#ifndef __nonnull + # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) +-# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) ++# define __nonnull(params) __attribute__ ((__nonnull__ params)) + # else +-# define __attribute_nonnull__(params) ++# define __nonnull(params) + # endif +-#endif +-#ifndef __nonnull +-# define __nonnull(params) __attribute_nonnull__ (params) ++#elif !defined __GLIBC__ ++# undef __nonnull ++# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) + #endif + + /* If fortification mode, we warn about unused results of certain +diff -up texinfo-6.8/gnulib/lib/libc-config.h.orig texinfo-6.8/gnulib/lib/libc-config.h +--- texinfo-6.8/gnulib/lib/libc-config.h.orig 2021-03-11 19:57:54.000000000 +0100 ++++ texinfo-6.8/gnulib/lib/libc-config.h 2021-07-19 12:27:58.810590975 +0200 +@@ -33,9 +33,9 @@ + #include <config.h> + + /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines +- _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and +- DragonFlyBSD 5.9 it includes <sys/cdefs.h> which defines __nonnull. +- Elsewhere it is harmless. */ ++ _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it ++ includes <sys/cdefs.h> which defines __nonnull. Elsewhere it ++ is harmless. */ + #include <errno.h> + + /* From glibc <errno.h>. */ +diff -up texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c +--- texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig 2021-03-11 19:57:54.000000000 +0100 ++++ texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c 2021-07-19 12:24:46.878419397 +0200 +@@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DY + + /* Initialize a dynamic array object. This must be called before any + use of the object. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static void + DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) + { +@@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_ST + } + + /* Deallocate the dynamic array and its elements. */ +-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __nonnull ((1)) + static void + DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) + { +@@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *l + } + + /* Return true if the dynamic array is in an error state. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline bool + DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) + { +@@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct + + /* Mark the dynamic array as failed. All elements are deallocated as + a side effect. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static void + DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) + { +@@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNA + + /* Return the number of elements which have been added to the dynamic + array. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline size_t + DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) + { +@@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNAR + + /* Return a pointer to the array element at INDEX. Terminate the + process if INDEX is out of bounds. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline DYNARRAY_ELEMENT * + DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) + { +@@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRU + /* Return a pointer to the first array element, if any. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline DYNARRAY_ELEMENT * + DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) + { +@@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_S + /* Return a pointer one element past the last array element. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline DYNARRAY_ELEMENT * + DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) + { +@@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_S + /* Add ITEM at the end of the array, enlarging it by one element. + Mark *LIST as failed if the dynamic array allocation size cannot be + increased. */ +-__attribute_nonnull__ ((1)) ++__nonnull ((1)) + static inline void + DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) + { +@@ -348,8 +348,7 @@ DYNARRAY_NAME (emplace__) (struct DYNARR + /* Allocate a place for a new element in *LIST and return a pointer to + it. The pointer can be NULL if the dynamic array cannot be + enlarged due to a memory allocation failure. */ +-__attribute_maybe_unused__ __attribute_warn_unused_result__ +-__attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) + static + /* Avoid inlining with the larger initialization code. */ + #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) +@@ -373,7 +372,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY + existing size, new elements are added (which can be initialized). + Otherwise, the list is truncated, and elements are freed. Return + false on memory allocation failure (and mark *LIST as failed). */ +-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __nonnull ((1)) + static bool + DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) + { +@@ -418,7 +417,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_ + } + + /* Remove the last element of LIST if it is present. */ +-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __nonnull ((1)) + static void + DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) + { +@@ -435,7 +434,7 @@ DYNARRAY_NAME (remove_last) (struct DYNA + + /* Remove all elements from the list. The elements are freed, but the + list itself is not. */ +-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __nonnull ((1)) + static void + DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) + { +@@ -453,8 +452,7 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_S + stored in *RESULT if LIST refers to an empty list. On success, the + pointer in *RESULT is heap-allocated and must be deallocated using + free. */ +-__attribute_maybe_unused__ __attribute_warn_unused_result__ +-__attribute_nonnull__ ((1, 2)) ++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1, 2)) + static bool + DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, + DYNARRAY_FINAL_TYPE *result) +@@ -485,8 +483,7 @@ DYNARRAY_NAME (finalize) (struct DYNARRA + have a sentinel at the end). If LENGTHP is not NULL, the array + length is written to *LENGTHP. *LIST is re-initialized and can be + reused. */ +-__attribute_maybe_unused__ __attribute_warn_unused_result__ +-__attribute_nonnull__ ((1)) ++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) + static DYNARRAY_ELEMENT * + DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) + { diff --git a/nixpkgs/pkgs/development/tools/misc/texlab/default.nix b/nixpkgs/pkgs/development/tools/misc/texlab/default.nix new file mode 100644 index 000000000000..9bc36338ff2e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/texlab/default.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, help2man +, installShellFiles +, libiconv +, Security +, CoreServices +, nix-update-script +}: + +let + isCross = stdenv.hostPlatform != stdenv.buildPlatform; +in +rustPlatform.buildRustPackage rec { + pname = "texlab"; + version = "5.10.1"; + + src = fetchFromGitHub { + owner = "latex-lsp"; + repo = "texlab"; + rev = "refs/tags/v${version}"; + hash = "sha256-ACdiFkV138jDIrRe+baYo+r9vCO4cyRyO2ck7OKakFY="; + }; + + cargoHash = "sha256-bEeQOOucXd4HNTR6SmidAfDkZ1tT7ORmUxrNx+3FNRw="; + + outputs = [ "out" ] ++ lib.optional (!isCross) "man"; + + nativeBuildInputs = [ installShellFiles ] + ++ lib.optional (!isCross) help2man; + + buildInputs = lib.optionals stdenv.isDarwin [ + libiconv + Security + CoreServices + ]; + + # When we cross compile we cannot run the output executable to + # generate the man page + postInstall = lib.optionalString (!isCross) '' + # TexLab builds man page separately in CI: + # https://github.com/latex-lsp/texlab/blob/v5.10.1/.github/workflows/publish.yml#L117-L121 + help2man --no-info "$out/bin/texlab" > texlab.1 + installManPage texlab.1 + ''; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "An implementation of the Language Server Protocol for LaTeX"; + homepage = "https://github.com/latex-lsp/texlab"; + license = licenses.mit; + maintainers = with maintainers; [ doronbehar kira-bruneau ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/tie/default.nix b/nixpkgs/pkgs/development/tools/misc/tie/default.nix new file mode 100644 index 000000000000..52a740ed1c8c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tie/default.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "tie"; + version = "2.4"; + + src = fetchurl { + url = "http://mirrors.ctan.org/web/tie/${pname}-${version}.tar.gz"; + sha256 = "1m5952kdfffiz33p1jw0wv7dh272mmw28mpxw9v7lkb352zv4xsj"; + }; + + buildPhase = '' + ${stdenv.cc.targetPrefix}cc tie.c -o tie + ''; + + installPhase = '' + mkdir -p $out/bin + cp tie $out/bin + ''; + + meta = with lib; { + homepage = "https://www.ctan.org/tex-archive/web/tie"; + description = "Allow multiple web change files"; + platforms = platforms.all; + maintainers = with maintainers; [ vrthra ]; + license = licenses.abstyles; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/tockloader/default.nix b/nixpkgs/pkgs/development/tools/misc/tockloader/default.nix new file mode 100644 index 000000000000..fbca0b0359de --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tockloader/default.nix @@ -0,0 +1,41 @@ +{ lib +, python3 +, fetchPypi +}: + +python3.pkgs.buildPythonApplication rec { + pname = "tockloader"; + version = "1.9.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-7W55jugVtamFUL8N3dD1LFLJP2UDQb74V6o96rd/tEg="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + argcomplete + colorama + crcmod + pycryptodome + pyserial + questionary + toml + tqdm + ]; + + # Project has no test suite + checkPhase = '' + runHook preCheck + $out/bin/tockloader --version | grep -q ${version} + runHook postCheck + ''; + + meta = with lib; { + description = "Tool for programming Tock onto hardware boards"; + homepage = "https://github.com/tock/tockloader"; + changelog = "https://github.com/tock/tockloader/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; +} + diff --git a/nixpkgs/pkgs/development/tools/misc/tokei/default.nix b/nixpkgs/pkgs/development/tools/misc/tokei/default.nix new file mode 100644 index 000000000000..b91460160ce8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tokei/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }: + +rustPlatform.buildRustPackage rec { + pname = "tokei"; + version = "12.1.2"; + + src = fetchFromGitHub { + owner = "XAMPPRocky"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-jqDsxUAMD/MCCI0hamkGuCYa8rEXNZIR8S+84S8FbgI="; + }; + + cargoSha256 = "sha256-U7Bode8qwDsNf4FVppfEHA9uiOFz74CtKgXG6xyYlT8="; + + buildInputs = lib.optionals stdenv.isDarwin [ + libiconv Security + ]; + + # enable all output formats + buildFeatures = [ "all" ]; + + meta = with lib; { + description = "A program that allows you to count your code, quickly"; + longDescription = '' + Tokei is a program that displays statistics about your code. Tokei will show number of files, total lines within those files and code, comments, and blanks grouped by language. + ''; + homepage = "https://github.com/XAMPPRocky/tokei"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ gebner lilyball ]; + mainProgram = "tokei"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/topiary/Cargo.lock b/nixpkgs/pkgs/development/tools/misc/topiary/Cargo.lock new file mode 100644 index 000000000000..0b0af1fcb05d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/topiary/Cargo.lock @@ -0,0 +1,1741 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "assert_cmd" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" +dependencies = [ + "anstyle", + "bstr", + "doc-comment", + "predicates", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + +[[package]] +name = "async-scoped" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7a6a57c8aeb40da1ec037f5d455836852f7a57e69e1b1ad3d8f38ac1d6cadf" +dependencies = [ + "futures", + "pin-project", + "slab", + "tokio", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "bstr" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +dependencies = [ + "memchr", + "regex-automata", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_complete" +version = "4.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4110a1e6af615a9e6d0a36f805d5c99099f8bab9b8042f5bc1fa220a4a89e36f" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys", +] + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "indoc" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix 0.38.4", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "pad" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "predicates" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +dependencies = [ + "anstyle", + "difflib", + "float-cmp", + "itertools 0.10.5", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "prettydiff" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11" +dependencies = [ + "ansi_term", + "pad", +] + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustix" +version = "0.37.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", + "windows-sys", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-toml-merge" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78072b550e5c20bc4a9d1384be28809cbdb7b25b2b4707ddc6d908b7e6de3bf" +dependencies = [ + "toml", +] + +[[package]] +name = "serde_derive" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "serde_json" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde", +] + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +dependencies = [ + "autocfg", + "cfg-if", + "fastrand", + "redox_syscall 0.3.5", + "rustix 0.37.23", + "windows-sys", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +dependencies = [ + "rustix 0.37.23", + "windows-sys", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "test-log" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9601d162c1d77e62c1ea0bc8116cd1caf143ce3af947536c3c9052a1677fe0c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tokio" +version = "1.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +dependencies = [ + "backtrace", + "num_cpus", + "pin-project-lite", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.26", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-test" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "toml" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "topiary" +version = "0.3.0" +dependencies = [ + "clap", + "criterion", + "env_logger", + "futures", + "itertools 0.11.0", + "log", + "pretty_assertions", + "prettydiff", + "regex", + "serde", + "serde_json", + "test-log", + "tokio", + "tokio-test", + "toml", + "tree-sitter-bash", + "tree-sitter-facade", + "tree-sitter-json", + "tree-sitter-nickel", + "tree-sitter-ocaml", + "tree-sitter-ocamllex", + "tree-sitter-query", + "tree-sitter-rust", + "tree-sitter-toml", + "unescape", + "web-tree-sitter-sys", +] + +[[package]] +name = "topiary-cli" +version = "0.3.0" +dependencies = [ + "assert_cmd", + "async-scoped", + "clap", + "clap_complete", + "directories", + "env_logger", + "futures", + "indoc", + "itertools 0.11.0", + "log", + "predicates", + "serde-toml-merge", + "tempfile", + "tokio", + "toml", + "topiary", + "topiary-queries", + "tree-sitter-bash", + "tree-sitter-facade", + "tree-sitter-json", + "tree-sitter-nickel", + "tree-sitter-ocaml", + "tree-sitter-ocamllex", + "tree-sitter-query", + "tree-sitter-rust", + "tree-sitter-toml", +] + +[[package]] +name = "topiary-playground" +version = "0.3.0" +dependencies = [ + "cfg-if", + "itertools 0.11.0", + "topiary", + "tree-sitter-facade", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "topiary-queries" +version = "0.3.0" + +[[package]] +name = "tree-sitter" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" +dependencies = [ + "cc", + "regex", +] + +[[package]] +name = "tree-sitter-bash" +version = "0.19.0" +source = "git+https://github.com/tree-sitter/tree-sitter-bash#1b0321ee85701d5036c334a6f04761cdc672e64c" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-facade" +version = "0.9.3" +source = "git+https://github.com/tweag/tree-sitter-facade#1b290e795e700a57d8bd303f98a9715ab1c4f598" +dependencies = [ + "js-sys", + "tree-sitter", + "wasm-bindgen", + "web-sys", + "web-tree-sitter-sys", +] + +[[package]] +name = "tree-sitter-json" +version = "0.20.0" +source = "git+https://github.com/tree-sitter/tree-sitter-json.git#ca3f8919800e3c1ad4508de3bfd7b0b860ce434f" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-nickel" +version = "0.0.1" +source = "git+https://github.com/nickel-lang/tree-sitter-nickel?rev=b1a4718601ebd29a62bf3a7fd1069a99ccf48093#b1a4718601ebd29a62bf3a7fd1069a99ccf48093" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-ocaml" +version = "0.20.4" +source = "git+https://github.com/tree-sitter/tree-sitter-ocaml.git#694c57718fd85d514f8b81176038e7a4cfabcaaf" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-ocamllex" +version = "0.20.2" +source = "git+https://github.com/314eter/tree-sitter-ocamllex.git#4b9898ccbf198602bb0dec9cd67cc1d2c0a4fad2" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-query" +version = "0.1.0" +source = "git+https://github.com/nvim-treesitter/tree-sitter-query#3a9808b22742d5bd906ef5d1a562f2f1ae57406d" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-rust" +version = "0.20.4" +source = "git+https://github.com/tree-sitter/tree-sitter-rust.git#17a6b15562b09db1f27b8f5f26f17edbb2aac097" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-toml" +version = "0.5.1" +source = "git+https://github.com/tree-sitter/tree-sitter-toml.git#342d9be207c2dba869b9967124c679b5e6fd0ebe" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "unescape" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 1.0.109", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + +[[package]] +name = "web-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-tree-sitter-sys" +version = "1.3.0" +source = "git+https://github.com/tweag/web-tree-sitter-sys#9e9755b9ab59055092de4717ba0bafe6483f4e5c" +dependencies = [ + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" +dependencies = [ + "memchr", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" diff --git a/nixpkgs/pkgs/development/tools/misc/topiary/default.nix b/nixpkgs/pkgs/development/tools/misc/topiary/default.nix new file mode 100644 index 000000000000..2128115165ba --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/topiary/default.nix @@ -0,0 +1,54 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, nix-update-script +}: + +rustPlatform.buildRustPackage rec { + pname = "topiary"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "tweag"; + repo = pname; + rev = "v${version}"; + hash = "sha256-zt4uXkO6Y0Yc1Wt8l5O79oKbgNLrgip40ftD7UfUPwo="; + }; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "tree-sitter-bash-0.19.0" = "sha256-a0/KyHV2jUpytsZSHI7tVw8GfYnuqVjfs5KScLZkB0I="; + "tree-sitter-facade-0.9.3" = "sha256-M/npshnHJkU70pP3I4WMXp3onlCSWM5mMIqXP45zcUs="; + "tree-sitter-json-0.20.0" = "sha256-cyrea0Y13OVGkXbYE0Cwc7nUsDGEZyoQmPAS9wVuHw0="; + "tree-sitter-nickel-0.0.1" = "sha256-aYsEx1Y5oDEqSPCUbf1G3J5Y45ULT9OkD+fn6stzrOU="; + "tree-sitter-ocaml-0.20.4" = "sha256-j3Hv2qOMxeBNOW+WIgIYzG3zMIFWPQpoHe94b2rT+A8="; + "tree-sitter-ocamllex-0.20.2" = "sha256-YhmEE7I7UF83qMuldHqc/fD/no/7YuZd6CaAIaZ1now="; + "tree-sitter-query-0.1.0" = "sha256-5N7FT0HTK3xzzhAlk3wBOB9xlEpKSNIfakgFnsxEi18="; + "tree-sitter-rust-0.20.4" = "sha256-seWoMuA87ZWCq3mUXopVeDCcTxX/Bh+B4PFLVa0CBQA="; + "tree-sitter-toml-0.5.1" = "sha256-5nLNBxFeOGE+gzbwpcrTVnuL1jLUA0ZLBVw2QrOLsDQ="; + "web-tree-sitter-sys-1.3.0" = "sha256-9rKB0rt0y9TD/HLRoB9LjEP9nO4kSWR9ylbbOXo2+2M="; + }; + }; + + cargoBuildFlags = [ "-p" "topiary-cli" ]; + cargoTestFlags = cargoBuildFlags; + + env = { + TOPIARY_LANGUAGE_DIR = "${placeholder "out"}/share/queries"; + }; + + postInstall = '' + install -Dm444 queries/* -t $out/share/queries + ''; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "A uniform formatter for simple languages, as part of the Tree-sitter ecosystem"; + homepage = "https://github.com/tweag/topiary"; + changelog = "https://github.com/tweag/topiary/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/travis/Gemfile b/nixpkgs/pkgs/development/tools/misc/travis/Gemfile new file mode 100644 index 000000000000..3da9975913e8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/travis/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "travis" +gem "pry", "~> 0.11.0" diff --git a/nixpkgs/pkgs/development/tools/misc/travis/Gemfile.lock b/nixpkgs/pkgs/development/tools/misc/travis/Gemfile.lock new file mode 100644 index 000000000000..91df15a9bb65 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/travis/Gemfile.lock @@ -0,0 +1,71 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.2.4.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + coderay (1.1.3) + concurrent-ruby (1.1.6) + ethon (0.12.0) + ffi (>= 1.3.0) + faraday (1.0.1) + multipart-post (>= 1.2, < 3) + faraday_middleware (1.0.0) + faraday (~> 1.0) + ffi (1.13.1) + gh (0.17.0) + activesupport (~> 5.0) + addressable (~> 2.4) + faraday (~> 1.0) + faraday_middleware (~> 1.0) + multi_json (~> 1.0) + net-http-persistent (~> 2.9) + net-http-pipeline + highline (2.0.3) + i18n (1.8.3) + concurrent-ruby (~> 1.0) + json (2.3.0) + launchy (2.4.3) + addressable (~> 2.3) + method_source (0.9.2) + minitest (5.14.1) + multi_json (1.14.1) + multipart-post (2.1.1) + net-http-persistent (2.9.4) + net-http-pipeline (1.0.1) + pry (0.11.3) + coderay (~> 1.1.0) + method_source (~> 0.9.0) + public_suffix (4.0.5) + pusher-client (0.6.2) + json + websocket (~> 1.0) + thread_safe (0.3.6) + travis (1.9.1) + faraday (~> 1.0) + faraday_middleware (~> 1.0) + gh (~> 0.13) + highline (~> 2.0) + json (~> 2.3) + launchy (~> 2.1, < 2.5.0) + pusher-client (~> 0.4) + typhoeus (~> 0.6, >= 0.6.8) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.7) + thread_safe (~> 0.1) + websocket (1.2.8) + +PLATFORMS + ruby + +DEPENDENCIES + pry (~> 0.11.0) + travis + +BUNDLED WITH + 2.1.4 diff --git a/nixpkgs/pkgs/development/tools/misc/travis/default.nix b/nixpkgs/pkgs/development/tools/misc/travis/default.nix new file mode 100644 index 000000000000..0be7721fe080 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/travis/default.nix @@ -0,0 +1,16 @@ +{ lib, bundlerEnv, ruby, bundlerUpdateScript }: + +bundlerEnv { + inherit ruby; + pname = "travis"; + gemdir = ./.; + + passthru.updateScript = bundlerUpdateScript "travis"; + + meta = with lib; { + description = "CLI and Ruby client library for Travis CI"; + homepage = "https://github.com/travis-ci/travis.rb"; + license = licenses.mit; + maintainers = with maintainers; [ zimbatm nicknovitski ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/travis/gemset.nix b/nixpkgs/pkgs/development/tools/misc/travis/gemset.nix new file mode 100644 index 000000000000..02b39bfca947 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/travis/gemset.nix @@ -0,0 +1,269 @@ +{ + activesupport = { + dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "02fdawr3wyvpzpja3r7mvb8lmn2mm5jdw502bx3ncr2sy2nw1kx6"; + type = "gem"; + }; + version = "5.2.4.3"; + }; + addressable = { + dependencies = ["public_suffix"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; + type = "gem"; + }; + version = "2.7.0"; + }; + coderay = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0jvxqxzply1lwp7ysn94zjhh57vc14mcshw1ygw14ib8lhc00lyw"; + type = "gem"; + }; + version = "1.1.3"; + }; + concurrent-ruby = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "094387x4yasb797mv07cs3g6f08y56virc2rjcpb1k79rzaj3nhl"; + type = "gem"; + }; + version = "1.1.6"; + }; + ethon = { + dependencies = ["ffi"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"; + type = "gem"; + }; + version = "0.12.0"; + }; + faraday = { + dependencies = ["multipart-post"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0wwks9652xwgjm7yszcq5xr960pjypc07ivwzbjzpvy9zh2fw6iq"; + type = "gem"; + }; + version = "1.0.1"; + }; + faraday_middleware = { + dependencies = ["faraday"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0jik2kgfinwnfi6fpp512vlvs0mlggign3gkbpkg5fw1jr9his0r"; + type = "gem"; + }; + version = "1.0.0"; + }; + ffi = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "12lpwaw82bb0rm9f52v1498bpba8aj2l2q359mkwbxsswhpga5af"; + type = "gem"; + }; + version = "1.13.1"; + }; + gh = { + dependencies = ["activesupport" "addressable" "faraday" "faraday_middleware" "multi_json" "net-http-persistent" "net-http-pipeline"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1nj2dm2pahfa4d39y8csvjv5l3hpsm6yjq2y96vj2bqgg0qs26bj"; + type = "gem"; + }; + version = "0.17.0"; + }; + highline = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yclf57n2j3cw8144ania99h1zinf8q3f5zrhqa754j6gl95rp9d"; + type = "gem"; + }; + version = "2.0.3"; + }; + i18n = { + dependencies = ["concurrent-ruby"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "10nq1xjqvkhngiygji831qx9bryjwws95r4vrnlq9142bzkg670s"; + type = "gem"; + }; + version = "1.8.3"; + }; + json = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0nrmw2r4nfxlfgprfgki3hjifgrcrs3l5zvm3ca3gb4743yr25mn"; + type = "gem"; + }; + version = "2.3.0"; + }; + launchy = { + dependencies = ["addressable"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2"; + type = "gem"; + }; + version = "2.4.3"; + }; + method_source = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1pviwzvdqd90gn6y7illcdd9adapw8fczml933p5vl739dkvl3lq"; + type = "gem"; + }; + version = "0.9.2"; + }; + minitest = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "09bz9nsznxgaf06cx3b5z71glgl0hdw469gqx3w7bqijgrb55p5g"; + type = "gem"; + }; + version = "5.14.1"; + }; + multi_json = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xy54mjf7xg41l8qrg1bqri75agdqmxap9z466fjismc1rn2jwfr"; + type = "gem"; + }; + version = "1.14.1"; + }; + multipart-post = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj"; + type = "gem"; + }; + version = "2.1.1"; + }; + net-http-persistent = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1y9fhaax0d9kkslyiqi1zys6cvpaqx9a0y0cywp24rpygwh4s9r4"; + type = "gem"; + }; + version = "2.9.4"; + }; + net-http-pipeline = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0bxjy33yhxwsbnld8xj3zv64ibgfjn9rjpiqkyd5ipmz50pww8v9"; + type = "gem"; + }; + version = "1.0.1"; + }; + pry = { + dependencies = ["coderay" "method_source"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1mh312k3y94sj0pi160wpia0ps8f4kmzvm505i6bvwynfdh7v30g"; + type = "gem"; + }; + version = "0.11.3"; + }; + public_suffix = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"; + type = "gem"; + }; + version = "4.0.5"; + }; + pusher-client = { + dependencies = ["json" "websocket"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18ymxz34gmg7jff3h0nyzp5vdg5i06dbdxlrdl2nq4hf14qwj1f4"; + type = "gem"; + }; + version = "0.6.2"; + }; + thread_safe = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"; + type = "gem"; + }; + version = "0.3.6"; + }; + travis = { + dependencies = ["faraday" "faraday_middleware" "gh" "highline" "json" "launchy" "pusher-client" "typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1yizj5nqvyrfbyiv1kfwc33dylhsmk5l007z06djj152v04z63i3"; + type = "gem"; + }; + version = "1.9.1"; + }; + typhoeus = { + dependencies = ["ethon"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03x3fxjsnhgayl4s96h0a9975awlvx2v9nmx2ba0cnliglyczdr8"; + type = "gem"; + }; + version = "0.8.0"; + }; + tzinfo = { + dependencies = ["thread_safe"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1i3jh086w1kbdj3k5l60lc3nwbanmzdf8yjj3mlrx9b2gjjxhi9r"; + type = "gem"; + }; + version = "1.2.7"; + }; + websocket = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0f11rcn4qgffb1rq4kjfwi7di79w8840x9l74pkyif5arp0mb08x"; + type = "gem"; + }; + version = "1.2.8"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/travis/shell.nix b/nixpkgs/pkgs/development/tools/misc/travis/shell.nix new file mode 100644 index 000000000000..ddcf493bb468 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/travis/shell.nix @@ -0,0 +1,11 @@ +# Env to update Gemfile.lock / gemset.nix + +with import <nixpkgs> {}; +stdenv.mkDerivation { + name = "env"; + buildInputs = [ + ruby.devEnv + gnumake + bundix + ]; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ttags/default.nix b/nixpkgs/pkgs/development/tools/misc/ttags/default.nix new file mode 100644 index 000000000000..f07f2d3ef5e8 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ttags/default.nix @@ -0,0 +1,44 @@ +{ lib, fetchFromGitHub, rustPlatform, testers, ttags }: +let version = "0.3.0"; +in rustPlatform.buildRustPackage { + pname = "ttags"; + inherit version; + + src = fetchFromGitHub { + owner = "npezza93"; + repo = "ttags"; + rev = "${version}"; + hash = "sha256-yqrCcA/+FyGPpX3hhULiwhMfrDWjq+rzT04M+o9ry5s="; + }; + + cargoHash = "sha256-jW3xIlo2cN5aoEUp3FxN4pwGFvlg50i5RMNgQopGb88="; + + passthru.tests.version = testers.testVersion { + package = ttags; + command = "ttags --version"; + version = version; + }; + + meta = with lib; { + description = "Generate tags using tree-sitter"; + longDescription = '' + ttags generates tags (similar to ctags) for various + languages, using tree-sitter. + + Can be run as a language server that updates the tags + for a file when it is saved. + + Supported languages: + - Haskell + - JavaScript + - Nix + - Ruby + - Rust + - Swift + ''; + homepage = "https://github.com/npezza93/ttags"; + license = licenses.mit; + maintainers = with maintainers; [ mrcjkb ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/typical/default.nix b/nixpkgs/pkgs/development/tools/misc/typical/default.nix new file mode 100644 index 000000000000..7944f14ca4d6 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/typical/default.nix @@ -0,0 +1,43 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "typical"; + version = "0.9.7"; + + src = fetchFromGitHub { + owner = "stepchowfun"; + repo = "typical"; + rev = "v${version}"; + hash = "sha256-UoTzgYxLdlWefNLeege7+tlqWh4uzotO5EbcyqvU2Xo="; + }; + + cargoHash = "sha256-GIyvwByzNKFvEdVSLo2cxuQ7JvKRFezhyKQrWjbj7Kk="; + + nativeBuildInputs = [ + installShellFiles + ]; + + preCheck = '' + export NO_COLOR=true + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd typical \ + --bash <($out/bin/typical shell-completion bash) \ + --fish <($out/bin/typical shell-completion fish) \ + --zsh <($out/bin/typical shell-completion zsh) + ''; + + meta = with lib; { + description = "Data interchange with algebraic data types"; + homepage = "https://github.com/stepchowfun/typical"; + changelog = "https://github.com/stepchowfun/typical/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/tyson/default.nix b/nixpkgs/pkgs/development/tools/misc/tyson/default.nix new file mode 100644 index 000000000000..b10b78708b58 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/tyson/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: + +buildGoModule rec { + pname = "tyson"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "jetpack-io"; + repo = "tyson"; + rev = "v${version}"; + hash = "sha256-c4ROLn+BSX7v/4C9/IeU6HiE2YvnqDuXXGp2iZhAVk4="; + }; + + vendorHash = "sha256-NhDv7oH8LK/vebwjs55tsCCWVhbZZd15z5ewOF5z9+Y="; + + nativeBuildInputs = [ + installShellFiles + ]; + + ldflags = [ "-s" "-w" ]; + + postInstall = '' + installShellCompletion --cmd tyson \ + --bash <($out/bin/tyson completion bash) \ + --fish <($out/bin/tyson completion fish) \ + --zsh <($out/bin/tyson completion zsh) + ''; + + meta = with lib; { + description = "TypeScript as a configuration language"; + homepage = "https://github.com/jetpack-io/tyson"; + changelog = "https://github.com/jetpack-io/tyson/releases/tag/${src.rev}"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/uncrustify/default.nix b/nixpkgs/pkgs/development/tools/misc/uncrustify/default.nix new file mode 100644 index 000000000000..6899c590e95f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/uncrustify/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchFromGitHub, cmake, python3 }: + +stdenv.mkDerivation rec { + pname = "uncrustify"; + version = "0.77.1"; + + src = fetchFromGitHub { + owner = "uncrustify"; + repo = "uncrustify"; + rev = "uncrustify-${version}"; + sha256 = "sha256-9U6PTeU/LVFL9XzP9XSFjDx18CR3athThEz+h2+5qZ8="; + }; + + nativeBuildInputs = [ cmake python3 ]; + + meta = with lib; { + description = "Source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA"; + homepage = "https://uncrustify.sourceforge.net/"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix b/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix new file mode 100644 index 000000000000..ebb034a92e72 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "unifdef"; + version = "2.12"; + + src = fetchurl { + url = "https://dotat.at/prog/unifdef/unifdef-${version}.tar.xz"; + sha256 = "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3"; + }; + + makeFlags = [ + "prefix=$(out)" + "DESTDIR=" + ]; + + meta = with lib; { + homepage = "https://dotat.at/prog/unifdef/"; + description = "Selectively remove C preprocessor conditionals"; + license = licenses.bsd2; + platforms = platforms.unix; + maintainers = with maintainers; [ orivej vrthra ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch b/nixpkgs/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch new file mode 100644 index 000000000000..8445b36b204a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch @@ -0,0 +1,14 @@ +This small Nix-specific patch removes a source of impurity from source code, +namely the date and time of compilation. + +diff -Naur uctags-old/main/options.c uctags-new/main/options.c +--- uctags-old/main/options.c 1969-12-31 21:00:01.000000000 -0300 ++++ uctags-new/main/options.c 2022-11-06 11:43:00.028550121 -0300 +@@ -1609,7 +1609,6 @@ + printf ("Universal Ctags is derived from Exuberant Ctags.\n"); + printf ("Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert\n"); + +- printf (" Compiled: %s, %s\n", __DATE__, __TIME__); + printf (" URL: %s\n", PROGRAM_URL); + + printFeatureList (); diff --git a/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix b/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix new file mode 100644 index 000000000000..30c0800f2c5f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/universal-ctags/default.nix @@ -0,0 +1,83 @@ +{ lib +, stdenv +, autoreconfHook +, buildPackages +, coreutils +, fetchFromGitHub +, jansson +, libiconv +, perl +, pkg-config +, python3 +, libseccomp +, libyaml +, pcre2 +, libxml2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "universal-ctags"; + version = "6.0.0"; + + src = fetchFromGitHub { + owner = "universal-ctags"; + repo = "ctags"; + rev = "v${finalAttrs.version}"; + hash = "sha256-XlqBndo8g011SDGp3zM7S+AQ0aCp6rpQlqJF6e5Dd6w="; + }; + + depsBuildBuild = [ + buildPackages.stdenv.cc + ]; + + nativeBuildInputs = [ + autoreconfHook + perl + pkg-config + (python3.withPackages (p: [ p.docutils ])) + ]; + + buildInputs = [ + libyaml + pcre2 + libxml2 + jansson + ] + ++ lib.optional stdenv.isDarwin libiconv + ++ lib.optional stdenv.isLinux libseccomp; + + configureFlags = [ "--enable-tmpdir=/tmp" ]; + + patches = [ + ./000-nixos-specific.patch + ]; + + postPatch = '' + substituteInPlace Tmain/utils.sh \ + --replace /bin/echo ${coreutils}/bin/echo + + patchShebangs misc/* + ''; + + doCheck = true; + + checkFlags = [ + "man-test" "tlib" "tmain" "tutil" "units" + ]; + + meta = with lib; { + homepage = "https://docs.ctags.io/en/latest/"; + description = "A maintained ctags implementation"; + longDescription = '' + Universal Ctags (abbreviated as u-ctags) is a maintained implementation of + ctags. ctags generates an index (or tag) file of language objects found in + source files for programming languages. This index makes it easy for text + editors and other tools to locate the indexed items. + ''; + license = licenses.gpl2Plus; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.all; + mainProgram = "ctags"; + priority = 1; # over the emacs implementation + }; +}) diff --git a/nixpkgs/pkgs/development/tools/misc/unixbench/common.patch b/nixpkgs/pkgs/development/tools/misc/unixbench/common.patch new file mode 100644 index 000000000000..68961cbe2edd --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/unixbench/common.patch @@ -0,0 +1,108 @@ +diff --git a/UnixBench/Run b/UnixBench/Run +index 34d2c72..130b56e 100755 +--- a/UnixBench/Run ++++ b/UnixBench/Run +@@ -81,23 +81,23 @@ my $longIterCount = 10; + my $shortIterCount = 3; + + # C compiler to use in compilation tests. +-my $cCompiler = 'gcc'; ++my $cCompiler = 'cc -w'; + + # Establish full paths to directories. These need to be full pathnames + # (or do they, any more?). They can be set in env. + # variable names are the first parameter to getDir() below. + + # Directory where the test programs live. +-my $BINDIR = getDir('UB_BINDIR', $FindBin::Bin . "/pgms"); ++my $BINDIR = getDir('UB_BINDIR', '@out@/libexec/pgms'); + + # Temp directory, for temp files. +-my $TMPDIR = getDir('UB_TMPDIR', $FindBin::Bin . "/tmp"); ++my $TMPDIR = getDir('UB_TMPDIR', "$ENV{'PWD'}/unixbench/temp"); + + # Directory to put results in. +-my $RESULTDIR = getDir('UB_RESULTDIR', $FindBin::Bin . "/results"); ++my $RESULTDIR = getDir('UB_RESULTDIR', "$ENV{'PWD'}/unixbench/results"); + + # Directory where the tests are executed. +-my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir"); ++my $TESTDIR = getDir('UB_TESTDIR', '@out@/share/testdir'); + + + ############################################################################ +@@ -330,19 +330,19 @@ my $testParams = { + "logmsg" => "Shell Scripts (1 concurrent)", + "cat" => 'system', + "prog" => "${BINDIR}/looper", +- "options" => "60 \"${BINDIR}/multi.sh\" 1", ++ "options" => "60 \"${BINDIR}/multi.sh\" 1 ${TMPDIR} ${TESTDIR}", + }, + "shell8" => { + "logmsg" => "Shell Scripts (8 concurrent)", + "cat" => 'system', + "prog" => "${BINDIR}/looper", +- "options" => "60 \"${BINDIR}/multi.sh\" 8", ++ "options" => "60 \"${BINDIR}/multi.sh\" 8 ${TMPDIR} ${TESTDIR}", + }, + "shell16" => { + "logmsg" => "Shell Scripts (16 concurrent)", + "cat" => 'system', + "prog" => "${BINDIR}/looper", +- "options" => "60 \"${BINDIR}/multi.sh\" 16", ++ "options" => "60 \"${BINDIR}/multi.sh\" 16 ${TMPDIR} ${TESTDIR}", + }, + + ########################## +@@ -434,7 +434,7 @@ my $testParams = { + "logmsg" => "C Compiler Throughput ($cCompiler)", + "cat" => 'misc', + "prog" => "${BINDIR}/looper", +- "options" => "60 $cCompiler cctest.c", ++ "options" => "60 $cCompiler $TESTDIR/cctest.c -o $TMPDIR/cctest", + }, + "arithoh" => { + "logmsg" => "Arithoh", +@@ -873,16 +873,6 @@ sub preChecks { + # Set the language. + $ENV{'LANG'} = $language; + +- # Check that the required files are in the proper places. +- my $make = $ENV{MAKE} || "make"; +- system("$make check"); +- if ($? != 0) { +- system("$make all"); +- if ($? != 0) { +- abortRun("\"$make all\" failed"); +- } +- } +- + # Create a script to kill this run. + system("echo \"kill -9 $$\" > \"${TMPDIR}/kill_run\""); + chmod(0755, $TMPDIR . "/kill_run"); +@@ -923,7 +913,10 @@ sub parseArgs { + $params->{'copies'} = [ ]; + } + push(@{$params->{'copies'}}, shift(@words)); +- } else { ++ } elsif ($word eq "--help" || $word eq "-h") { ++ print "Run: please see ubench(1) for available options\n"; ++ exit 0; ++ }else { + die("Run: unknown option $word\n"); + } + } +diff --git a/UnixBench/pgms/multi.sh b/UnixBench/pgms/multi.sh +index 72e8716..d2f5f48 100755 +--- a/UnixBench/pgms/multi.sh ++++ b/UnixBench/pgms/multi.sh +@@ -15,7 +15,8 @@ + ############################################################################### + ID="@(#)multi.sh:3.4 -- 5/15/91 19:30:24"; + instance=1 +-sort_src=sort.src ++sort_src=$3/sort.src ++cd $2 + work_factor=${MULTI_SH_WORK_FACTOR:-1} + if [ $work_factor -gt 1 ]; then + inputs= diff --git a/nixpkgs/pkgs/development/tools/misc/unixbench/default.nix b/nixpkgs/pkgs/development/tools/misc/unixbench/default.nix new file mode 100644 index 000000000000..9f4546248e5e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/unixbench/default.nix @@ -0,0 +1,109 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, pandoc +, installShellFiles +, perl +, xorg +, libGL +, coreutils +, unixtools +, targetPackages +, gnugrep +, gawk +, withGL? true +, withX11perf? true +}: + +stdenv.mkDerivation rec { + pname = "unixbench"; + version = "unstable-2023-02-27"; + + src = fetchFromGitHub { + owner = "kdlucas"; + repo = "byte-unixbench"; + rev = "a07fcc03264915c624f0e4818993c5b4df3fa703"; + hash = "sha256-gmRWAqE9/HBb0S9rK0DXoaCoiGbtat0gmdeozhbv0NI="; + }; + + patches = [ + ./common.patch + ]; + + patchFlags = [ "-p2" ]; + + sourceRoot = "${src.name}/UnixBench"; + + postPatch = '' + substituteInPlace Makefile \ + --replace "-Wa,-q" "" + ''; + + nativeBuildInputs = [ + makeWrapper + pandoc + installShellFiles + ]; + + buildInputs = [ perl ] ++ lib.optionals withGL [ + xorg.libX11 + xorg.libXext + libGL + ]; + + runtimeDependencies = [ + coreutils + unixtools.nettools + unixtools.locale + targetPackages.stdenv.cc + gnugrep + gawk + ] ++ lib.optionals withX11perf [ + xorg.x11perf + ]; + + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ] ++ lib.optionals withGL [ + "GRAPHIC_TESTS=defined" + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,libexec,share} + install -D Run $out/bin/ubench + cp -r pgms $out/libexec/ + cp -r testdir $out/share/ + runHook postInstall + ''; + + postInstall = '' + substituteInPlace USAGE \ + --replace 'Run"' 'ubench"' \ + --replace './Run' 'ubench' \ + --replace 'Run ' 'ubench ' + pandoc -f rst -t man USAGE -o ubench.1 + installManPage ubench.1 + ''; + + preFixup = '' + substituteInPlace $out/libexec/pgms/multi.sh \ + --replace '/bin/sh "$' '${targetPackages.runtimeShell} "$' + + substituteInPlace $out/bin/ubench \ + --subst-var out + + wrapProgram $out/bin/ubench \ + --prefix PATH : ${lib.makeBinPath runtimeDependencies} + ''; + + meta = with lib; { + description = "A basic indicator of the performance of a Unix-like system"; + homepage = "https://github.com/kdlucas/byte-unixbench"; + license = licenses.gpl2Plus; + mainProgram = "ubench"; + maintainers = with maintainers; [ aleksana ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/unused/default.nix b/nixpkgs/pkgs/development/tools/misc/unused/default.nix new file mode 100644 index 000000000000..b644a762908e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/unused/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchFromGitHub, rustPlatform, cmake }: +rustPlatform.buildRustPackage rec { + pname = "unused"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "unused-code"; + repo = pname; + rev = version; + sha256 = "sha256-+1M8dUfjjrT4llS0C6WYDyNxJ9QZ5s9v+W185TbgwMw="; + }; + + nativeBuildInputs = [ cmake ]; + + cargoSha256 = "sha256-hCtkR20+xs1UHZP7oJVpJACVGcMQLQmSS1QE2tmIVhs="; + + meta = with lib; { + description = "A tool to identify potentially unused code"; + homepage = "https://unused.codes"; + license = licenses.mit; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch new file mode 100644 index 000000000000..d55caab22e69 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch @@ -0,0 +1,283 @@ +Index: usb-modeswitch-2.6.0/Makefile +=================================================================== +--- usb-modeswitch-2.6.0.orig/Makefile ++++ usb-modeswitch-2.6.0/Makefile +@@ -5,17 +5,24 @@ CFLAGS += -Wall -Wno-deprecated-dec + LIBS = `pkg-config --libs --cflags libusb-1.0` + RM = /bin/rm -f + OBJS = usb_modeswitch.c +-PREFIX = $(DESTDIR)/usr +-ETCDIR = $(DESTDIR)/etc ++PREFIX = /usr/local ++ETCDIR = $(PREFIX)/etc + SYSDIR = $(ETCDIR)/systemd/system + UPSDIR = $(ETCDIR)/init +-UDEVDIR = $(DESTDIR)/lib/udev ++UDEVDIR = $(PREFIX)/lib/udev + SBINDIR = $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man/man1 + ++USE_UPSTART=$(shell if command -v initctl > /dev/null; then echo "true"; fi) ++USE_SYSTEMD=$(shell if command -v systemctl > /dev/null; then echo "true"; fi) ++ + .PHONY: clean install install-common uninstall \ + dispatcher-script dispatcher-dynlink dispatcher-statlink \ +- install-script install-dynlink install-statlink ++ install-script install-dynlink install-statlink \ ++ install-upstart install-systemd \ ++ configure-dispatcher configure-script \ ++ configure-upstart configure-systemd \ ++ configure + + all: all-with-script-dispatcher + +@@ -28,7 +35,25 @@ all-with-statlink-dispatcher: $(PROG) di + $(PROG): $(OBJS) usb_modeswitch.h + $(CC) -o $(PROG) $(OBJS) $(CFLAGS) $(LIBS) $(LDFLAGS) + +-dispatcher-script: usb_modeswitch_dispatcher.tcl ++configure-dispatcher: ++ sed -i \ ++ -e 's,^\(set setup(sbindir) \).*$$,\1$(SBINDIR),' \ ++ -e 's,^\(set setup(etcdir) \).*$$,\1$(ETCDIR),' \ ++ usb_modeswitch_dispatcher.tcl ++ ++configure-script: ++ sed -i -e 's,^\(SBINDIR=\).*$$,\1$(SBINDIR),' usb_modeswitch.sh ++ ++configure-systemd: ++ sed -i -e 's,@sbindir@,$(SBINDIR),' usb_modeswitch@.service ++ ++configure-upstart: ++ sed -i -e 's,@sbindir@,$(SBINDIR),' usb-modeswitch-upstart.conf ++ ++configure: configure-dispatcher configure-script \ ++ configure-systemd configure-upstart ++ ++dispatcher-script: configure-dispatcher usb_modeswitch_dispatcher.tcl + DISPATCH=dispatcher-script + cp -f usb_modeswitch_dispatcher.tcl usb_modeswitch_dispatcher + +@@ -53,16 +78,28 @@ distclean: clean + # If the systemd folder is present, install the service for starting the dispatcher + # If not, use the dispatcher directly from the udev rule as in previous versions + +-install-common: $(PROG) $(DISPATCH) +- install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch +- install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch +- install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf +- install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1 +- install -D --mode=644 usb_modeswitch_dispatcher.1 $(MANDIR)/usb_modeswitch_dispatcher.1 +- install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher ++install-common: $(PROG) configure $(DISPATCH) ++ install -D --mode=755 usb_modeswitch $(DESTDIR)$(SBINDIR)/usb_modeswitch ++ install -D --mode=755 usb_modeswitch.sh $(DESTDIR)$(UDEVDIR)/usb_modeswitch ++ install -D --mode=644 usb_modeswitch.conf $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf ++ install -D --mode=644 usb_modeswitch.1 $(DESTDIR)$(MANDIR)/usb_modeswitch.1 ++ install -D --mode=644 usb_modeswitch_dispatcher.1 $(DESTDIR)$(MANDIR)/usb_modeswitch_dispatcher.1 ++ install -D --mode=755 usb_modeswitch_dispatcher $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch +- test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1 ++ ++install-upstart: ++ install -D --mode=644 usb-modeswitch-upstart.conf $(DESTDIR)$(UPSDIR)/usb-modeswitch-upstart.conf ++ ++install-systemd: ++ install -D --mode=644 usb_modeswitch@.service $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service ++ ++ifeq ($(USE_UPSTART),true) ++install-common: install-upstart ++endif ++ ++ifeq ($(USE_SYSTEMD),true) ++install-common: install-systemd ++endif + + install: install-script + +@@ -73,10 +110,10 @@ install-dynlink: dispatcher-dynlink inst + install-statlink: dispatcher-statlink install-common + + uninstall: +- $(RM) $(SBINDIR)/usb_modeswitch +- $(RM) $(SBINDIR)/usb_modeswitch_dispatcher +- $(RM) $(UDEVDIR)/usb_modeswitch +- $(RM) $(ETCDIR)/usb_modeswitch.conf +- $(RM) $(MANDIR)/usb_modeswitch.1 ++ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch ++ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher ++ $(RM) $(DESTDIR)$(UDEVDIR)/usb_modeswitch ++ $(RM) $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf ++ $(RM) $(DESTDIR)$(MANDIR)/usb_modeswitch.1 + $(RM) -R $(DESTDIR)/var/lib/usb_modeswitch +- $(RM) $(SYSDIR)/usb_modeswitch@.service ++ $(RM) $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service +Index: usb-modeswitch-2.6.0/usb-modeswitch-upstart.conf +=================================================================== +--- usb-modeswitch-2.6.0.orig/usb-modeswitch-upstart.conf ++++ usb-modeswitch-2.6.0/usb-modeswitch-upstart.conf +@@ -1,5 +1,5 @@ + start on usb-modeswitch-upstart + task + script +- exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM ++ exec @sbindir@/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM + end script +Index: usb-modeswitch-2.6.0/usb_modeswitch.sh +=================================================================== +--- usb-modeswitch-2.6.0.orig/usb_modeswitch.sh ++++ usb-modeswitch-2.6.0/usb_modeswitch.sh +@@ -1,5 +1,9 @@ + #!/bin/sh + # part of usb_modeswitch 2.6.0 ++ ++# Compile time configuration, injected by the Makefile ++SBINDIR=/usr/sbin ++ + device_in() + { + if [ ! -e /var/lib/usb_modeswitch/$1 ]; then +@@ -37,7 +41,7 @@ if [ $(expr "$1" : "--.*") ]; then + v_id=$3 + fi + fi +-PATH=/sbin:/usr/sbin:$PATH ++ + case "$1" in + --driver-bind) + # driver binding code removed +@@ -46,9 +50,7 @@ case "$1" in + --symlink-name) + device_in "link_list" $v_id $p_id + if [ "$?" = "1" ]; then +- if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then +- exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null +- fi ++ exec $SBINDIR/usb_modeswitch_dispatcher $1 $2 2>>/dev/null + fi + exit 0 + ;; +@@ -61,15 +63,13 @@ if [ "$p2" = "" -a "$p1" != "" ]; then + p2=$p1 + fi + +-PATH=/bin:/sbin:/usr/bin:/usr/sbin +-init_path=`readlink -f /sbin/init` +-if [ `basename $init_path` = "systemd" ]; then ++if command -v systemctl > /dev/null; then + systemctl --no-block restart usb_modeswitch@$p2.service +-elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then ++elif command -v initctl > /dev/null; then + initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$p2 + else + # only old distros, new udev will kill all subprocesses + exec 1<&- 2<&- 5<&- 7<&- +- exec usb_modeswitch_dispatcher --switch-mode $p2 & ++ exec $SBINDIR/usb_modeswitch_dispatcher --switch-mode $p2 & + fi + exit 0 +Index: usb-modeswitch-2.6.0/usb_modeswitch@.service +=================================================================== +--- usb-modeswitch-2.6.0.orig/usb_modeswitch@.service ++++ usb-modeswitch-2.6.0/usb_modeswitch@.service +@@ -3,6 +3,6 @@ Description=USB_ModeSwitch_%i + + [Service] + Type=oneshot +-ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i ++ExecStart=@sbindir@/usb_modeswitch_dispatcher --switch-mode %i + #ExecStart=/bin/echo %i + +Index: usb-modeswitch-2.6.0/usb_modeswitch_dispatcher.tcl +=================================================================== +--- usb-modeswitch-2.6.0.orig/usb_modeswitch_dispatcher.tcl ++++ usb-modeswitch-2.6.0/usb_modeswitch_dispatcher.tcl +@@ -12,6 +12,16 @@ + # Part of usb-modeswitch-2.6.0 package + # (C) Josua Dietze 2009-2019 + ++# Compile-time configuration, injected by the Makefile. ++set setup(sbindir) /usr/sbin ++set setup(etcdir) /etc ++ ++# External dependency default location ++set setup(dbdir) /usr/share/usb_modeswitch ++ ++# Derived configuration ++set setup(dbdir_etc) $setup(etcdir)/usb_modeswitch.d ++ + set arg0 [lindex $argv 0] + if [regexp {\.tcl$} $arg0] { + if [file exists $arg0] { +@@ -115,10 +125,8 @@ if {![regexp {(.*?):.*$} $arg1 d device] + } + } + +-set setup(dbdir) /usr/share/usb_modeswitch +-set setup(dbdir_etc) /etc/usb_modeswitch.d + if {![file exists $setup(dbdir)] && ![file exists $setup(dbdir_etc)]} { +- Log "\nError: no config database found in /usr/share or /etc. Exit" ++ Log "\nError: no config database found in $setup(dbdir) or $setup(dbdir_etc). Exit" + SafeExit + } + +@@ -285,7 +293,7 @@ if {$config(NoMBIMCheck)==0 && $usb(bNum + if [CheckMBIM] { + Log " driver for MBIM devices is available" + Log "Find MBIM configuration number ..." +- if [catch {set cfgno [exec /usr/sbin/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] { ++ if [catch {set cfgno [exec $setup(sbindir)/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] { + Log "Error when trying to find MBIM configuration, switch to legacy modem mode" + } else { + set cfgno [string trim $cfgno] +@@ -321,7 +329,7 @@ if {$report == ""} { + # Now we are actually switching + if $flags(logging) { + Log "Command line:\nusb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f \$flags(config)" +- catch {set report [exec /usr/sbin/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report ++ catch {set report [exec $setup(sbindir)/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report + Log "\nVerbose debug output of usb_modeswitch and libusb follows" + Log "(Note that some USB errors are to be expected in the process)" + Log "--------------------------------" +@@ -329,7 +337,7 @@ if {$report == ""} { + Log "--------------------------------" + Log "(end of usb_modeswitch output)\n" + } else { +- catch {set report [exec /usr/sbin/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report ++ catch {set report [exec $setup(sbindir)/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report + } + } + +@@ -522,12 +530,12 @@ return 1 + + proc {ParseGlobalConfig} {path} { + +-global flags ++global flags setup + set configFile "" + if [string length $path] { + set places [list $path] + } else { +- set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch] ++ set places [list $setup(etcdir)/usb_modeswitch.conf $setup(etcdir)/sysconfig/usb_modeswitch $setup(etcdir)/default/usb_modeswitch] + } + foreach cfg $places { + if [file exists $cfg] { +@@ -923,10 +931,12 @@ proc {SysLog} {msg} { + + global flags + if {![info exists flags(logger)]} { +- set flags(logger) "" +- foreach fn {/bin/logger /usr/bin/logger} { +- if [file exists $fn] { +- set flags(logger) $fn ++ set flags(logger) [exec sh -c "command -v logger || true"] ++ if {$flags(logger) == ""} { ++ foreach fn {/bin/logger /usr/bin/logger} { ++ if [file exists $fn] { ++ set flags(logger) $fn ++ } + } + } + Log "Logger is $flags(logger)" diff --git a/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/data.nix b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/data.nix new file mode 100644 index 000000000000..7bb9fc69c58a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/data.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, tcl, usb-modeswitch }: + +stdenv.mkDerivation rec { + pname = "usb-modeswitch-data"; + version = "20191128"; + + src = fetchurl { + url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2"; + sha256 = "1ygahl3r26r38ai8yyblq9nhf3v5i6n6r6672p5wf88wg5h9n0rz"; + }; + + makeFlags = [ + "PREFIX=$(out)" + "DESTDIR=$(out)" + ]; + + prePatch = '' + sed -i 's@usb_modeswitch@${usb-modeswitch}/lib/udev/usb_modeswitch@g' 40-usb_modeswitch.rules + ''; + + # we add tcl here so we can patch in support for new devices by dropping config into + # the usb_modeswitch.d directory + nativeBuildInputs = [ tcl ]; + + meta = with lib; { + description = "Device database and the rules file for 'multi-mode' USB devices"; + inherit (usb-modeswitch.meta) license maintainers platforms; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/default.nix b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/default.nix new file mode 100644 index 000000000000..4f9dbe92d2b7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/usb-modeswitch/default.nix @@ -0,0 +1,46 @@ +{ stdenv, lib, fetchurl, pkg-config, makeWrapper +, libusb1, tcl, util-linux, coreutils, bash }: + +stdenv.mkDerivation rec { + pname = "usb-modeswitch"; + version = "2.6.0"; + + src = fetchurl { + url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2"; + sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2"; + }; + + patches = [ ./configurable-usb-modeswitch.patch ]; + + # Remove attempts to write to /etc and /var/lib. + postPatch = '' + sed -i \ + -e '/^\tinstall .* usb_modeswitch.conf/s,$(ETCDIR),$(out)/etc,' \ + -e '\,^\tinstall -d .*/var/lib/usb_modeswitch,d' \ + Makefile + ''; + + makeFlags = [ + "PREFIX=$(out)" + "ETCDIR=/etc" + "USE_UPSTART=false" + "USE_SYSTEMD=true" + "SYSDIR=$(out)/lib/systemd/system" + "UDEVDIR=$(out)/lib/udev" + ]; + + postFixup = '' + wrapProgram $out/bin/usb_modeswitch_dispatcher \ + --set PATH ${lib.makeBinPath [ util-linux coreutils bash ]} + ''; + + buildInputs = [ libusb1 tcl ]; + nativeBuildInputs = [ pkg-config makeWrapper ]; + + meta = with lib; { + description = "A mode switching tool for controlling 'multi-mode' USB devices"; + license = licenses.gpl2; + maintainers = with maintainers; [ marcweber peterhoeg ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix b/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix new file mode 100644 index 000000000000..5fda623d819f --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix @@ -0,0 +1,22 @@ +{ lib, python3Packages, fetchPypi }: + +python3Packages.buildPythonApplication rec { + pname = "usbsdmux"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-gCxwR5jxzkH22B6nxBwAd0HpwWMIj/zp5VROJ0IWq7c="; + }; + + # usbsdmux is not meant to be used as an importable module and has no tests + doCheck = false; + + meta = with lib; { + description = "Control software for the LXA USB-SD-Mux"; + homepage = "https://github.com/linux-automation/usbsdmux"; + license = licenses.lgpl21; + maintainers = with maintainers; [ emantor ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/vtable-dumper/default.nix b/nixpkgs/pkgs/development/tools/misc/vtable-dumper/default.nix new file mode 100644 index 000000000000..1bd59aa9944a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/vtable-dumper/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchFromGitHub, libelf }: + +stdenv.mkDerivation rec { + pname = "vtable-dumper"; + version = "1.2"; + + src = fetchFromGitHub { + owner = "lvc"; + repo = "vtable-dumper"; + rev = version; + sha256 = "0sl7lnjr2l4c2f7qaazvpwpzsp4gckkvccfam88wcq9f7j9xxbyp"; + }; + + buildInputs = [ libelf ]; + makeFlags = [ "prefix=$(out)" ]; + + meta = with lib; { + homepage = "https://github.com/lvc/vtable-dumper"; + description = "A tool to list content of virtual tables in a C++ shared library"; + license = licenses.lgpl21; + maintainers = [ maintainers.bhipple ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/wasmer-pack/default.nix b/nixpkgs/pkgs/development/tools/misc/wasmer-pack/default.nix new file mode 100644 index 000000000000..0f5e85349833 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/wasmer-pack/default.nix @@ -0,0 +1,37 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "wasmer-pack"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "wasmerio"; + repo = "wasmer-pack"; + rev = "v${version}"; + hash = "sha256-+wqgYkdkuhPFkJBdQLnUKAGmUfGBU9mBfMRNBFmiT4E="; + }; + + cargoHash = "sha256-nyhjwEZyT8IEb0pTbou/EtN47gehge3fUCQVPs2TkIY="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + cargoBuildFlags = [ "-p=wasmer-pack-cli" ]; + + # requires internet access + doCheck = false; + + meta = with lib; { + description = "Import your WebAssembly code just like any other dependency"; + homepage = "https://github.com/wasmerio/wasmer-pack"; + changelog = "https://github.com/wasmerio/wasmer-pack/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile b/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile new file mode 100644 index 000000000000..fc739389e84e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'watson-ruby' diff --git a/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile.lock b/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile.lock new file mode 100644 index 000000000000..9e3c166400f3 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/watson-ruby/Gemfile.lock @@ -0,0 +1,15 @@ +GEM + remote: https://rubygems.org/ + specs: + json (2.1.0) + watson-ruby (1.6.3) + json + +PLATFORMS + ruby + +DEPENDENCIES + watson-ruby + +BUNDLED WITH + 2.1.4 diff --git a/nixpkgs/pkgs/development/tools/misc/watson-ruby/default.nix b/nixpkgs/pkgs/development/tools/misc/watson-ruby/default.nix new file mode 100644 index 000000000000..eb6c8bd76199 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/watson-ruby/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, bundlerEnv, ruby, bundlerUpdateScript }: + +stdenv.mkDerivation rec { + pname = "watson-ruby"; + version = (import ./gemset.nix).watson-ruby.version; + + dontUnpack = true; + + installPhase = let + env = bundlerEnv { + name = "watson-ruby-gems-${version}"; + inherit ruby; + # expects Gemfile, Gemfile.lock and gemset.nix in the same directory + gemdir = ./.; + }; + in '' + mkdir -p $out/bin + ln -s ${env}/bin/watson $out/bin/watson + ''; + + passthru.updateScript = bundlerUpdateScript "watson-ruby"; + + meta = with lib; { + description = "An inline issue manager"; + homepage = "https://goosecode.com/watson/"; + license = with licenses; mit; + maintainers = with maintainers; [ robertodr nicknovitski ]; + mainProgram = "watson"; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/watson-ruby/gemset.nix b/nixpkgs/pkgs/development/tools/misc/watson-ruby/gemset.nix new file mode 100644 index 000000000000..2f865820f5aa --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/watson-ruby/gemset.nix @@ -0,0 +1,18 @@ +{ + json = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"; + type = "gem"; + }; + version = "2.1.0"; + }; + watson-ruby = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d5m29nr0i030q8ygmbapwri5ndcg2q6lf8a15bk79lfcp9xyj9w"; + type = "gem"; + }; + version = "1.6.3"; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/whatstyle/default.nix b/nixpkgs/pkgs/development/tools/misc/whatstyle/default.nix new file mode 100644 index 000000000000..08f5b85bc5ed --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/whatstyle/default.nix @@ -0,0 +1,30 @@ +{ lib, python3, fetchFromGitHub, clang-unwrapped }: + +python3.pkgs.buildPythonApplication rec { + pname = "whatstyle"; + version = "0.1.8"; + src = fetchFromGitHub { + owner = "mikr"; + repo = pname; + rev = "v${version}"; + sha256 = "08lfd8h5fnvy5gci4f3an411cypad7p2yiahvbmlp51r9xwpaiwr"; + }; + + # Fix references to previous version, to avoid confusion: + postPatch = '' + substituteInPlace setup.py --replace 0.1.6 ${version} + substituteInPlace ${pname}.py --replace 0.1.6 ${version} + ''; + + nativeCheckInputs = [ clang-unwrapped /* clang-format */ ]; + + doCheck = false; # 3 or 4 failures depending on version, haven't investigated. + + meta = with lib; { + description = "Find a code format style that fits given source files"; + homepage = "https://github.com/mikr/whatstyle"; + license = licenses.mit; + maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/wishbone-tool/default.nix b/nixpkgs/pkgs/development/tools/misc/wishbone-tool/default.nix new file mode 100644 index 000000000000..0465fb74aa1a --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/wishbone-tool/default.nix @@ -0,0 +1,33 @@ +{ lib, fetchFromGitHub, rustPlatform, libusb-compat-0_1 }: + +let + version = "0.6.9"; + src = fetchFromGitHub { + owner = "litex-hub"; + repo = "wishbone-utils"; + rev = "v${version}"; + sha256 = "0gq359ybxnqvcp93cn154bs9kwlai62gnm71yvl2nhzjdlcr3fhp"; + }; +in +rustPlatform.buildRustPackage { + pname = "wishbone-tool"; + inherit version; + + src = "${src}/wishbone-tool"; + + # N.B. The cargo vendor consistency checker searches in "source" for lockfile + cargoDepsHook = '' + ln -s wishbone-tool source + ''; + cargoSha256 = "1b12wpmzv7wxidc4hd8hmp8iwqhqlycxh8bdv3rf701sqsazkc5x"; + + buildInputs = [ libusb-compat-0_1 ]; + + meta = with lib; { + description = "Manipulate a Wishbone device over some sort of bridge"; + homepage = "https://github.com/litex-hub/wishbone-utils"; + license = licenses.bsd2; + maintainers = with maintainers; [ edef ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/xorg-autoconf/default.nix b/nixpkgs/pkgs/development/tools/misc/xorg-autoconf/default.nix new file mode 100644 index 000000000000..34aa363550ae --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/xorg-autoconf/default.nix @@ -0,0 +1,29 @@ +{ lib +, stdenv +, autoreconfHook +, fetchFromGitLab +}: + +stdenv.mkDerivation rec { + pname = "xorg-autoconf"; + version = "1.19.3"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "util"; + repo = "macros"; + rev = "util-macros-${version}"; + sha256 = "sha256-+yEMCjLztdY5LKTNjfhudDS0fdaOj4LKZ3YL5witFR4="; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + meta = with lib; { + description = "GNU autoconf macros shared across X.Org projects"; + homepage = "https://gitlab.freedesktop.org/xorg/util/macros"; + maintainers = with maintainers; [ raboof ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/xspim/default.nix b/nixpkgs/pkgs/development/tools/misc/xspim/default.nix new file mode 100644 index 000000000000..ccef80747a40 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/xspim/default.nix @@ -0,0 +1,58 @@ +{ lib, stdenv, fetchsvn, imake, bison, flex, xorg }: + +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 = [ + xorg.libICE + xorg.libSM + xorg.libX11 + xorg.libXaw + xorg.libXext + xorg.libXmu + xorg.libXpm + xorg.libXt + ]; + + 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 = "https://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ emilytrau ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/xxdiff/default.nix b/nixpkgs/pkgs/development/tools/misc/xxdiff/default.nix new file mode 100644 index 000000000000..8f30a165df3c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/xxdiff/default.nix @@ -0,0 +1,51 @@ +{ lib, mkDerivation, fetchFromBitbucket, docutils, bison, flex, qmake +, qtbase +}: + +mkDerivation rec { + pname = "xxdiff"; + version = "5.0b1"; + + src = fetchFromBitbucket { + owner = "blais"; + repo = pname; + rev = "5e5f885dfc43559549a81c59e9e8c9525306356a"; + sha256 = "0gbvxrkwkbvag3298j89smszghpr8ilxxfb0cvsknfqdf15b296w"; + }; + + nativeBuildInputs = [ bison docutils flex qmake ]; + + buildInputs = [ qtbase ]; + + dontUseQmakeConfigure = true; + + # c++11 and above is needed for building with Qt 5.9+ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; + + sourceRoot = "${src.name}/src"; + + postPatch = '' + substituteInPlace xxdiff.pro --replace ../bin ./bin + ''; + + preConfigure = '' + make -f Makefile.bootstrap + ''; + + installPhase = '' + runHook preInstall + + install -Dm555 -t $out/bin ./bin/xxdiff + install -Dm444 -t $out/share/doc/${pname} ${src}/README + + runHook postInstall + ''; + + meta = with lib; { + description = "Graphical file and directories comparator and merge tool"; + homepage = "http://furius.ca/xxdiff/"; + license = licenses.gpl2; + maintainers = with maintainers; [ pSub raskin ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/xxgdb/default.nix b/nixpkgs/pkgs/development/tools/misc/xxgdb/default.nix new file mode 100644 index 000000000000..cc093476fec7 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/xxgdb/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchurl +, imake +, gccmakedep +, libX11 +, libXaw +, libXext +, libXmu +, libXt +}: + +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 = [ libX11 libXaw libXext libXmu libXt ]; + + 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; { + broken = stdenv.isDarwin; + description = "A simple but powerful graphical interface to gdb"; + license = licenses.mit; + maintainers = with maintainers; [ emilytrau ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch b/nixpkgs/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch new file mode 100644 index 000000000000..735bb1b0b5fc --- /dev/null +++ b/nixpkgs/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"); diff --git a/nixpkgs/pkgs/development/tools/misc/ycmd/default.nix b/nixpkgs/pkgs/development/tools/misc/ycmd/default.nix new file mode 100644 index 000000000000..f281a70f8029 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ycmd/default.nix @@ -0,0 +1,97 @@ +{ stdenv, lib, fetchFromGitHub, cmake, ninja, python +, withGocode ? true, gocode +, withGodef ? true, godef +, withGotools? true, gotools +, withTypescript ? true, typescript +, abseil-cpp, boost, llvmPackages +, fixDarwinDylibNames, Cocoa +}: + +stdenv.mkDerivation { + pname = "ycmd"; + version = "unstable-2022-08-15"; + disabled = !python.isPy3k; + + # required for third_party directory creation + src = fetchFromGitHub { + owner = "ycm-core"; + repo = "ycmd"; + rev = "323d4b60f077bd07945f25a60c4584843ca851fb"; + sha256 = "sha256-5IpXMQc3QIkKJkUrOPSRzciLvL1nhQw6wlP+pVnIucE="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake ninja ] + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = with python.pkgs; with llvmPackages; [ abseil-cpp boost libllvm.all libclang.all ] + ++ [ jedi jedi-language-server pybind11 ] + ++ lib.optional stdenv.isDarwin Cocoa; + + buildPhase = '' + export EXTRA_CMAKE_ARGS="-DPATH_TO_LLVM_ROOT=${llvmPackages.libllvm} -DUSE_SYSTEM_ABSEIL=true" + ${python.pythonForBuild.interpreter} build.py --system-libclang --clang-completer --ninja + ''; + + dontConfigure = true; + + # remove the tests + # + # make __main__.py executable and add shebang + # + # copy over third-party libs + # note: if we switch to using our packaged libs, we'll need to symlink them + # into the same spots, as YouCompleteMe (the vim plugin) expects those paths + # to be available + # + # symlink completion backends where ycmd expects them + installPhase = '' + rm -rf ycmd/tests + + chmod +x ycmd/__main__.py + sed -i "1i #!${python.interpreter}\ + " ycmd/__main__.py + + mkdir -p $out/lib/ycmd + cp -r ycmd/ CORE_VERSION *.so* *.dylib* $out/lib/ycmd/ + + mkdir -p $out/bin + ln -s $out/lib/ycmd/ycmd/__main__.py $out/bin/ycmd + + # Copy everything: the structure of third_party has been known to change. + # When linking our own libraries below, do so with '-f' + # to clobber anything we may have copied here. + mkdir -p $out/lib/ycmd/third_party + cp -r third_party/* $out/lib/ycmd/third_party/ + + '' + lib.optionalString withGocode '' + TARGET=$out/lib/ycmd/third_party/gocode + mkdir -p $TARGET + ln -sf ${gocode}/bin/gocode $TARGET + '' + lib.optionalString withGodef '' + TARGET=$out/lib/ycmd/third_party/godef + mkdir -p $TARGET + ln -sf ${godef}/bin/godef $TARGET + '' + lib.optionalString withGotools '' + TARGET=$out/lib/ycmd/third_party/go/src/golang.org/x/tools/cmd/gopls + mkdir -p $TARGET + ln -sf ${gotools}/bin/gopls $TARGET + '' + lib.optionalString withTypescript '' + TARGET=$out/lib/ycmd/third_party/tsserver + ln -sf ${typescript} $TARGET + ''; + + # fixup the argv[0] and replace __file__ with the corresponding path so + # python won't be thrown off by argv[0] + postFixup = '' + substituteInPlace $out/lib/ycmd/ycmd/__main__.py \ + --replace __file__ "'$out/lib/ycmd/ycmd/__main__.py'" + ''; + + meta = with lib; { + description = "A code-completion and comprehension server"; + homepage = "https://github.com/ycm-core/ycmd"; + license = licenses.gpl3; + maintainers = with maintainers; [ rasendubi lnl7 siriobalmelli ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/yodl/default.nix b/nixpkgs/pkgs/development/tools/misc/yodl/default.nix new file mode 100644 index 000000000000..2eee78c1c19c --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/yodl/default.nix @@ -0,0 +1,52 @@ +{ lib, stdenv, fetchFromGitLab, perl, icmake, util-linux }: + +stdenv.mkDerivation rec { + pname = "yodl"; + version = "4.03.03"; + + nativeBuildInputs = [ icmake ]; + + buildInputs = [ perl ]; + + src = fetchFromGitLab { + sha256 = "sha256-MeD/jjhwoiWTb/G8pHrnEEX22h+entPr9MhJ6WHO3DM="; + rev = version; + repo = "yodl"; + owner = "fbb-git"; + }; + + setSourceRoot = '' + sourceRoot=$(echo */yodl) + ''; + + preConfigure = '' + patchShebangs ./build + patchShebangs scripts/ + substituteInPlace INSTALL.im --replace /usr $out + substituteInPlace macros/rawmacros/startdoc.pl --replace /usr/bin/perl ${perl}/bin/perl + substituteInPlace scripts/yodl2whatever.in --replace getopt ${util-linux}/bin/getopt + ''; + + # Set TERM because icmbuild calls tput. + TERM = "xterm"; + + buildPhase = '' + ./build programs + ./build macros + ./build man + ''; + + installPhase = '' + ./build install programs + ./build install macros + ./build install man + ''; + + meta = with lib; { + description = "A package that implements a pre-document language and tools to process it"; + homepage = "https://fbb-git.gitlab.io/yodl/"; + license = licenses.gpl3; + maintainers = with maintainers; [ pSub ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/ztags/default.nix b/nixpkgs/pkgs/development/tools/misc/ztags/default.nix new file mode 100644 index 000000000000..25010cc0cc67 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/ztags/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, scdoc +, zig_0_11 +}: + +stdenv.mkDerivation { + pname = "ztags"; + version = "unstable-2023-09-07"; + + src = fetchFromGitHub { + owner = "gpanders"; + repo = "ztags"; + rev = "6cdbd6dcdeda0d1ab9ad30261000e3d21b2407e6"; + hash = "sha256-lff5L7MG8RJdJM/YebJKDkKfkG4oumC0HytiCUOUG5Q="; + }; + + nativeBuildInputs = [ + scdoc + zig_0_11.hook + ]; + + postInstall = '' + zig build docs --prefix $out + ''; + + meta = with lib; { + description = "Generate tags files for Zig projects"; + homepage = "https://github.com/gpanders/ztags"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "ztags"; + inherit (zig_0_11.meta) platforms; + }; +} |