uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
33
pkgs/development/tools/misc/abi-dumper/default.nix
Normal file
33
pkgs/development/tools/misc/abi-dumper/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
33
pkgs/development/tools/misc/acr/default.nix
Normal file
33
pkgs/development/tools/misc/acr/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "acr";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "radareorg";
|
||||
repo = "acr";
|
||||
rev = version;
|
||||
hash = "sha256-ma4KhwGFlLCfRQvQ11OdyovgGbKQUBo6qVRrE7V2pNo=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
chmod +x ./autogen.sh && ./autogen.sh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
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 = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
}
|
||||
27
pkgs/development/tools/misc/act/default.nix
Normal file
27
pkgs/development/tools/misc/act/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "act";
|
||||
version = "0.2.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nektos";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DBiBJf4hEjn/sJXjAvsiARWz66sDBIz0hFEdCgS8D4g=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-5RvFdtEZEQBWvkUKIcV/A+tCSy9V9DJj4HujGQgTxq0=";
|
||||
|
||||
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 SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
85
pkgs/development/tools/misc/arcanist/default.nix
Normal file
85
pkgs/development/tools/misc/arcanist/default.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ 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 = "20220425";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "phacility";
|
||||
repo = "arcanist";
|
||||
rev = "da206314cf59f71334b187283e18823bddc16ddd";
|
||||
sha256 = "sha256-6VVUjFMwPQvk22Ni1YUSgks4ZM0j1JP+71VnYKD8onM=";
|
||||
};
|
||||
|
||||
patches = [ ./dont-require-python3-in-path.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 = "http://phabricator.org";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
@ -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/';
|
||||
39
pkgs/development/tools/misc/argbash/default.nix
Normal file
39
pkgs/development/tools/misc/argbash/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoconf, runtimeShell, python3Packages, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "argbash";
|
||||
|
||||
version = "2.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matejak";
|
||||
repo = "argbash";
|
||||
rev = version;
|
||||
sha256 = "1xdhpbnc0xjv6ydcm122hhdjcl77jhiqnccjfqjp3cd1lfmzvg8v";
|
||||
};
|
||||
|
||||
sourceRoot = "source/resources";
|
||||
|
||||
postPatch = ''
|
||||
chmod -R +w ..
|
||||
patchShebangs ..
|
||||
substituteInPlace Makefile \
|
||||
--replace '/bin/bash' "${runtimeShell}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoconf python3Packages.docutils makeWrapper ];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/argbash \
|
||||
--prefix PATH : '${autoconf}/bin'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bash argument parsing code generator";
|
||||
homepage = "https://argbash.io/";
|
||||
license = licenses.free; # custom license. See LICENSE in source repo.
|
||||
maintainers = with maintainers; [ rencire ];
|
||||
};
|
||||
}
|
||||
25
pkgs/development/tools/misc/asls/default.nix
Normal file
25
pkgs/development/tools/misc/asls/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, erlangR22
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "asls";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/saulecabrera/asls/releases/download/v${version}/bin.tar.gz";
|
||||
sha256 = "05kp44p4q4sdykfw0b4k9j3qdp0qvwgjbs48ncmnd0ass0xrmi3s";
|
||||
};
|
||||
|
||||
buildInputs = [ erlangR22 ];
|
||||
installPhase = "install -Dm755 -t $out/bin asls";
|
||||
|
||||
meta = with lib; {
|
||||
description = "AssemblyScript Language Server";
|
||||
homepage = "https://github.com/saulecabrera/asls";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ saulecabrera ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/misc/astyle/default.nix
Normal file
26
pkgs/development/tools/misc/astyle/default.nix
Normal file
|
|
@ -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 = "http://astyle.sourceforge.net/";
|
||||
license = licenses.lgpl3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
36
pkgs/development/tools/misc/autobuild/default.nix
Normal file
36
pkgs/development/tools/misc/autobuild/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/misc/autoconf-archive/default.nix
Normal file
23
pkgs/development/tools/misc/autoconf-archive/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl, xz }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "autoconf-archive";
|
||||
version = "2021.02.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/autoconf-archive/autoconf-archive-${version}.tar.xz";
|
||||
sha256 = "sha256-6KbrnSjdy6j/7z+iEWUyOem/I5q6agGmt8/Hzq7GnL0=";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
41
pkgs/development/tools/misc/autoconf/2.13.nix
Normal file
41
pkgs/development/tools/misc/autoconf/2.13.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
52
pkgs/development/tools/misc/autoconf/2.64.nix
Normal file
52
pkgs/development/tools/misc/autoconf/2.64.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ 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";
|
||||
};
|
||||
|
||||
buildInputs = [ m4 perl ];
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
53
pkgs/development/tools/misc/autoconf/2.69.nix
Normal file
53
pkgs/development/tools/misc/autoconf/2.69.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
36
pkgs/development/tools/misc/autoconf/2.71-fix-race.patch
Normal file
36
pkgs/development/tools/misc/autoconf/2.71-fix-race.patch
Normal file
|
|
@ -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
|
||||
|
||||
69
pkgs/development/tools/misc/autoconf/default.nix
Normal file
69
pkgs/development/tools/misc/autoconf/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
101
pkgs/development/tools/misc/autogen/default.nix
Normal file
101
pkgs/development/tools/misc/autogen/default.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{ lib, stdenv, buildPackages, fetchurl, fetchpatch, autoreconfHook, which, pkg-config, perl, guile, 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-4", pname, name ? (pname + ".diff"), sha256 }: fetchurl {
|
||||
url = "https://salsa.debian.org/debian/autogen/-/raw/debian/${ver}"
|
||||
+ "/debian/patches/${pname}.diff?inline=false";
|
||||
inherit name sha256;
|
||||
};
|
||||
in [
|
||||
(dp {
|
||||
pname = "20_no_Werror";
|
||||
sha256 = "08z4s2ifiqyaacjpd9pzr59w8m4j3548kkaq1bwvp2gjn29m680x";
|
||||
})
|
||||
(dp {
|
||||
pname = "30_ag_macros.m4_syntax_error";
|
||||
sha256 = "1z8vmbwbkz3505wd33i2xx91mlf8rwsa7klndq37nw821skxwyh3";
|
||||
})
|
||||
(dp {
|
||||
pname = "31_allow_overriding_AGexe_for_crossbuild";
|
||||
sha256 = "0h9wkc9bqb509knh8mymi43hg6n6sxg2lixvjlchcx7z0j7p8xkf";
|
||||
})
|
||||
# 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 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 = [ ];
|
||||
};
|
||||
}
|
||||
50
pkgs/development/tools/misc/automake/automake-1.11.x.nix
Normal file
50
pkgs/development/tools/misc/automake/automake-1.11.x.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ 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 ];
|
||||
|
||||
buildInputs = [ perl autoconf ];
|
||||
|
||||
# Disable indented log output from Make, otherwise "make.test" will
|
||||
# fail.
|
||||
preCheck = "unset NIX_INDENT_MAKE";
|
||||
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;
|
||||
};
|
||||
}
|
||||
46
pkgs/development/tools/misc/automake/automake-1.15.x.nix
Normal file
46
pkgs/development/tools/misc/automake/automake-1.15.x.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ 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 ];
|
||||
|
||||
# Disable indented log output from Make, otherwise "make.test" will
|
||||
# fail.
|
||||
preCheck = "unset NIX_INDENT_MAKE";
|
||||
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;
|
||||
};
|
||||
}
|
||||
43
pkgs/development/tools/misc/automake/automake-1.16.x.nix
Normal file
43
pkgs/development/tools/misc/automake/automake-1.16.x.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ 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;
|
||||
|
||||
# Disable indented log output from Make, otherwise "make.test" will
|
||||
# fail.
|
||||
preCheck = "unset NIX_INDENT_MAKE";
|
||||
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;
|
||||
};
|
||||
}
|
||||
47
pkgs/development/tools/misc/automake/builder.sh
Normal file
47
pkgs/development/tools/misc/automake/builder.sh
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
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
|
||||
10
pkgs/development/tools/misc/automake/fix-perl-5.26.patch
Normal file
10
pkgs/development/tools/misc/automake/fix-perl-5.26.patch
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
||||
5
pkgs/development/tools/misc/automake/setup-hook.sh
Normal file
5
pkgs/development/tools/misc/automake/setup-hook.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
addAclocals () {
|
||||
addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal
|
||||
}
|
||||
|
||||
addEnvHooks "$hostOffset" addAclocals
|
||||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/misc/aviator/default.nix
Normal file
23
pkgs/development/tools/misc/aviator/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "aviator";
|
||||
version = "1.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "herrjulz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Oa4z8n+q7LKWMnwk+xj9UunzOa3ChaPBCTo828yYJGQ=";
|
||||
};
|
||||
|
||||
deleteVendor = true;
|
||||
vendorSha256 = "sha256-rYOphvI1ZE8X5UExfgxHnWBn697SDkNnmxeY7ihIZ1s=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Merge YAML/JSON files in a in a convenient fashion";
|
||||
homepage = "https://github.com/herrjulz/aviator";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ risson ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/tools/misc/awf/default.nix
Normal file
37
pkgs/development/tools/misc/awf/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/misc/babeltrace/default.nix
Normal file
23
pkgs/development/tools/misc/babeltrace/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl, 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";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
|
||||
}
|
||||
42
pkgs/development/tools/misc/bashdb/default.nix
Normal file
42
pkgs/development/tools/misc/bashdb/default.nix
Normal file
|
|
@ -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 = "http://bashdb.sourceforge.net/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
29
pkgs/development/tools/misc/binutils/R_ARM_COPY.patch
Normal file
29
pkgs/development/tools/misc/binutils/R_ARM_COPY.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
@@ -, +, @@
|
||||
---
|
||||
bfd/elf32-arm.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
--- a/bfd/elf32-arm.c
|
||||
+++ a/bfd/elf32-arm.c
|
||||
@@ -15398,7 +15398,11 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
|
||||
linker to copy the initial value out of the dynamic object and into
|
||||
the runtime process image. We need to remember the offset into the
|
||||
.rel(a).bss section we are going to use. */
|
||||
- if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
|
||||
+ if (info->nocopyreloc == 0
|
||||
+ && (h->root.u.def.section->flags & SEC_ALLOC) != 0
|
||||
+ /* PR 16177: A copy is only needed if the input section is readonly. */
|
||||
+ && (h->root.u.def.section->flags & SEC_READONLY) != 0
|
||||
+ && h->size != 0)
|
||||
{
|
||||
s = globals->root.sdynrelro;
|
||||
srel = globals->root.sreldynrelro;
|
||||
@@ -15410,6 +15414,8 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
|
||||
}
|
||||
if (info->nocopyreloc == 0
|
||||
&& (h->root.u.def.section->flags & SEC_ALLOC) != 0
|
||||
+ /* PR 16177: A copy is only needed if the input section is readonly. */
|
||||
+ && (h->root.u.def.section->flags & SEC_READONLY) != 0
|
||||
&& h->size != 0)
|
||||
{
|
||||
elf32_arm_allocate_dynrelocs (info, srel, 1);
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
||||
226
pkgs/development/tools/misc/binutils/default.nix
Normal file
226
pkgs/development/tools/misc/binutils/default.nix
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
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.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
|
||||
# This patch was suggested by Nick Clifton to fix
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
# It can be removed when that 7-year-old bug is closed.
|
||||
# This binutils bug causes GHC to emit broken binaries on armv7, and indeed
|
||||
# GHC will refuse to compile with a binutils suffering from it. See this
|
||||
# comment for more information:
|
||||
# https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
|
||||
++ lib.optional (targetPlatform.isAarch32 && hostPlatform.system != targetPlatform.system) ./R_ARM_COPY.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)
|
||||
;
|
||||
|
||||
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)
|
||||
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 overriden 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 = "";
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
12
pkgs/development/tools/misc/binutils/deterministic.patch
Normal file
12
pkgs/development/tools/misc/binutils/deterministic.patch
Normal file
|
|
@ -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"));
|
||||
|
|
@ -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
|
||||
;;
|
||||
168
pkgs/development/tools/misc/binutils/support-ios.patch
Normal file
168
pkgs/development/tools/misc/binutils/support-ios.patch
Normal file
|
|
@ -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
|
||||
|
|
@ -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 */
|
||||
105
pkgs/development/tools/misc/blackfire/default.nix
Normal file
105
pkgs/development/tools/misc/blackfire/default.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, writeShellScript
|
||||
, curl
|
||||
, jq
|
||||
, common-updater-scripts
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.8.1";
|
||||
|
||||
sources = {
|
||||
"x86_64-linux" = fetchurl {
|
||||
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_amd64.deb";
|
||||
sha256 = "znaM00jM6yrpb+bGTxzJUxViCUzv4G+CYK2EB5dxhfY=";
|
||||
};
|
||||
"i686-linux" = fetchurl {
|
||||
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_i386.deb";
|
||||
sha256 = "QIY4qGm333H5MWhe3CIfEieqTEk8st5A7SJHkwGnnxw=";
|
||||
};
|
||||
"aarch64-linux" = fetchurl {
|
||||
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_arm64.deb";
|
||||
sha256 = "eZbKoKYC2tt4Rxn5OJr7iA1aJlYFC0tpRmbLq7qSrIU=";
|
||||
};
|
||||
"aarch64-darwin" = fetchurl {
|
||||
url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_arm64.pkg.tar.gz";
|
||||
sha256 = "tn2vF3v7KfF7CfWqyydL5Iyh5tP9Tez87PJH+URgSIw=";
|
||||
};
|
||||
"x86_64-darwin" = fetchurl {
|
||||
url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_amd64.pkg.tar.gz";
|
||||
sha256 = "CRFlnqpX4j2CMGzS+UvXwNty2mHpONOjym6UJPE2Yg4=";
|
||||
};
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "blackfire";
|
||||
inherit version;
|
||||
|
||||
src = sources.${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 = {
|
||||
updateScript = writeShellScript "update-${pname}" ''
|
||||
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.concatStringsSep " " meta.platforms}; do
|
||||
update-source-version "blackfire" "0" "${lib.fakeSha256}" "--system=$platform"
|
||||
update-source-version "blackfire" "$NEW_VERSION" "--system=$platform" --ignore-same-hash
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Blackfire Profiler agent and client";
|
||||
homepage = "https://blackfire.io/";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ jtojnar shyim ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
};
|
||||
}
|
||||
207
pkgs/development/tools/misc/blackfire/php-probe.nix
Normal file
207
pkgs/development/tools/misc/blackfire/php-probe.nix
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, autoPatchelfHook
|
||||
, php
|
||||
, writeShellScript
|
||||
, curl
|
||||
, jq
|
||||
, common-updater-scripts
|
||||
}:
|
||||
|
||||
let
|
||||
phpMajor = lib.versions.majorMinor php.version;
|
||||
soFile = {
|
||||
"7.4" = "blackfire-20190902";
|
||||
"8.0" = "blackfire-20200930";
|
||||
"8.1" = "blackfire-20210902";
|
||||
}.${phpMajor} or (throw "Unsupported PHP version.");
|
||||
|
||||
version = "1.77.0";
|
||||
|
||||
hashes = {
|
||||
"x86_64-linux" = {
|
||||
system = "amd64";
|
||||
sha256 = "oC4pANYT2XtF3ju+pT2TCb6iJSlNm6t+Xkawb88xWUo=";
|
||||
};
|
||||
"i686-linux" = {
|
||||
system = "i386";
|
||||
sha256 = "zdebak5RWuPqCJ3eReKjtDLnCXtjtVFnSqvqC4U0+RE=";
|
||||
};
|
||||
"aarch64-linux" = {
|
||||
system = "arm64";
|
||||
sha256 = "5J1JcD/ZFxV0FWaySv037x1xjmCdM/zHiBfmRuCidjs=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
system = "arm64";
|
||||
sha256 = {
|
||||
"7.4" = {
|
||||
normal = "vKOH+yPDyf8KxX0DoEnrp2HXYfDAxVD708MZrRGMEEk=";
|
||||
zts = "cpeOtDRhPA35utai8G1Dosuqhf76hiqvwe+Em9cFhDo=";
|
||||
};
|
||||
"8.0" = {
|
||||
normal = "v6PD1+Ghvtoq1wzAXwqi9elyC9/NwzX0EDdtQtCfeL4=";
|
||||
zts = "Dqs0P8X7ScDJCPYKuqlumnLz4kB7cEOnVbDACQ02sko=";
|
||||
};
|
||||
"8.1" = {
|
||||
normal = "mCZ1avC8FsqYdGYNepeqWgSK2kqVo1E0VjhofxdaSyk=";
|
||||
zts = "zliaM2VbaDEgNBr5ETe1GdYNyTZy5te92LedZiolx/8=";
|
||||
};
|
||||
};
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
system = "amd64";
|
||||
sha256 = {
|
||||
"7.4" = {
|
||||
normal = "nLsrpRnR9zo3d/a0+TFBlNcAebknpBQc101ysqPs+dU=";
|
||||
zts = "o7R8zmhIOtiNDS8Se3Dog+cn9HyTHzS4jquXdzGQQOU=";
|
||||
};
|
||||
"8.0" = {
|
||||
normal = "Pe2/GNDiS5DuSXCffO0jo5dRl0qkh1RgBVL3JzLwVkQ=";
|
||||
zts = "zu7QgaKbBNQkby7bLv+NKLSIa79UXMONEf171EO+uNE=";
|
||||
};
|
||||
"8.1" = {
|
||||
normal = "3SOlLeLCM4crWY6U+/zmtWmNYg2j0HC/3FWCmCi7lOo=";
|
||||
zts = "GG8s+Pd0K6SEUzRV96Ba2mYfLgQMuGNzRoUtmz9m0NY=";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
makeSource =
|
||||
{
|
||||
system,
|
||||
phpMajor,
|
||||
ztsSupport,
|
||||
}:
|
||||
|
||||
let
|
||||
isLinux = builtins.match ".+-linux" system != null;
|
||||
in
|
||||
assert !isLinux -> (phpMajor != null && ztsSupport != null);
|
||||
fetchurl {
|
||||
url =
|
||||
if isLinux
|
||||
then "https://packages.blackfire.io/debian/pool/any/main/b/blackfire-php/blackfire-php_${version}_${hashes.${system}.system}.deb"
|
||||
else "https://packages.blackfire.io/homebrew/blackfire-php_${version}-darwin_${hashes.${system}.system}-php${builtins.replaceStrings ["."] [""] phpMajor}${lib.optionalString ztsSupport "-zts"}.tar.gz";
|
||||
sha256 =
|
||||
if isLinux
|
||||
then hashes.${system}.sha256
|
||||
else hashes.${system}.sha256.${phpMajor}.${if ztsSupport then "zts" else "normal"};
|
||||
};
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "php-blackfire";
|
||||
inherit version;
|
||||
|
||||
src = makeSource {
|
||||
system = stdenv.hostPlatform.system;
|
||||
inherit phpMajor;
|
||||
inherit (php) ztsSupport;
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
||||
dpkg
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
setSourceRoot = if stdenv.isDarwin then "sourceRoot=`pwd`" else null;
|
||||
|
||||
unpackPhase = if stdenv.isLinux then ''
|
||||
runHook preUnpack
|
||||
dpkg-deb -x $src pkg
|
||||
sourceRoot=pkg
|
||||
|
||||
runHook postUnpack
|
||||
'' else null;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
if ${ lib.boolToString stdenv.isLinux }
|
||||
then
|
||||
install -D usr/lib/blackfire-php/*/${soFile}${lib.optionalString php.ztsSupport "-zts"}.so $out/lib/php/extensions/blackfire.so
|
||||
else
|
||||
install -D blackfire.so $out/lib/php/extensions/blackfire.so
|
||||
fi
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = writeShellScript "update-${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 passthru.updateables)}; do
|
||||
update-source-version "$UPDATE_NIX_ATTR_PATH.updateables.$source" "0" "${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;
|
||||
ztsSupport =
|
||||
if builtins.length rest == 0
|
||||
then null
|
||||
else
|
||||
builtins.head (builtins.tail rest) == "zts";
|
||||
};
|
||||
|
||||
createUpdateable =
|
||||
path:
|
||||
_value:
|
||||
|
||||
lib.nameValuePair
|
||||
(createName path)
|
||||
(self.overrideAttrs (attrs: {
|
||||
src = makeSource (createSourceParams path);
|
||||
}));
|
||||
|
||||
hashesOnly =
|
||||
# Filter out all attributes other than hashes.
|
||||
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 = with lib; {
|
||||
description = "Blackfire Profiler PHP module";
|
||||
homepage = "https://blackfire.io/";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ jtojnar shyim ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
self
|
||||
54
pkgs/development/tools/misc/bonnmotion/default.nix
Normal file
54
pkgs/development/tools/misc/bonnmotion/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
75
pkgs/development/tools/misc/bonnmotion/install.patch
Normal file
75
pkgs/development/tools/misc/bonnmotion/install.patch
Normal file
|
|
@ -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
|
||||
68
pkgs/development/tools/misc/bsdbuild/default.nix
Normal file
68
pkgs/development/tools/misc/bsdbuild/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
56
pkgs/development/tools/misc/c2ffi/default.nix
Normal file
56
pkgs/development/tools/misc/c2ffi/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
49
pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff
Normal file
49
pkgs/development/tools/misc/cbrowser/backslashes-quotes.diff
Normal file
|
|
@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
36
pkgs/development/tools/misc/cbrowser/default.nix
Normal file
36
pkgs/development/tools/misc/cbrowser/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
126
pkgs/development/tools/misc/ccache/default.nix
Normal file
126
pkgs/development/tools/misc/ccache/default.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, binutils
|
||||
, asciidoctor
|
||||
, cmake
|
||||
, perl
|
||||
, zstd
|
||||
, bashInteractive
|
||||
, xcodebuild
|
||||
, makeWrapper
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
let ccache = stdenv.mkDerivation rec {
|
||||
pname = "ccache";
|
||||
version = "4.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-XcelGBb5bRLZKSbtC2J40d6CsSF/ZF3eJW0UXe1Y40A=";
|
||||
};
|
||||
|
||||
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.
|
||||
(substituteAll {
|
||||
src = ./force-objdump-on-darwin.patch;
|
||||
objdump = "${binutils.bintools}/bin/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;
|
||||
checkInputs = [
|
||||
# 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.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 {
|
||||
name = "ccache-links";
|
||||
passthru = {
|
||||
isClang = unwrappedCC.isClang or false;
|
||||
isGNU = unwrappedCC.isGNU or false;
|
||||
};
|
||||
inherit (unwrappedCC) lib;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
wrap() {
|
||||
local cname="$1"
|
||||
if [ -x "${unwrappedCC}/bin/$cname" ]; then
|
||||
makeWrapper ${ccache}/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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compiler cache for fast recompilation of C/C++ code";
|
||||
homepage = "https://ccache.dev";
|
||||
downloadPage = "https://ccache.dev/download.html";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau r-burns ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
in ccache
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
diff --git a/test/run b/test/run
|
||||
index 9623e49d..3df1c5a8 100755
|
||||
--- a/test/run
|
||||
+++ b/test/run
|
||||
@@ -126,23 +126,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
|
||||
- fgrep -q "\"$1\""
|
||||
- else
|
||||
- fgrep -q ": $1"
|
||||
- fi
|
||||
+ fgrep -q ": $1"
|
||||
}
|
||||
|
||||
expect_stat() {
|
||||
41
pkgs/development/tools/misc/ccls/default.nix
Normal file
41
pkgs/development/tools/misc/ccls/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, llvmPackages, rapidjson, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ccls";
|
||||
version = "0.20210330";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MaskRay";
|
||||
repo = "ccls";
|
||||
rev = version;
|
||||
sha256 = "sha256-jipSipgD0avd7XODlpxnqjHK3s6nacaxbIQIddix7X8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake llvmPackages.llvm.dev ];
|
||||
buildInputs = with llvmPackages; [ libclang llvm rapidjson ];
|
||||
|
||||
cmakeFlags = [ "-DCCLS_VERSION=${version}" ];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti")
|
||||
'';
|
||||
|
||||
clang = llvmPackages.clang;
|
||||
shell = runtimeShell;
|
||||
|
||||
postFixup = ''
|
||||
export wrapped=".ccls-wrapped"
|
||||
mv $out/bin/ccls $out/bin/$wrapped
|
||||
substituteAll ${./wrapper} $out/bin/ccls
|
||||
chmod --reference=$out/bin/$wrapped $out/bin/ccls
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A c/c++ language server powered by clang";
|
||||
homepage = "https://github.com/MaskRay/ccls";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ mic92 tobim ];
|
||||
};
|
||||
}
|
||||
9
pkgs/development/tools/misc/ccls/wrapper
Normal file
9
pkgs/development/tools/misc/ccls/wrapper
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#! @shell@ -e
|
||||
|
||||
printf -v extraArgs ',\"%s\"' \
|
||||
$(cat @clang@/nix-support/libc-cflags \
|
||||
@clang@/nix-support/libcxx-cxxflags) \
|
||||
${NIX_CFLAGS_COMPILE}
|
||||
initString="--init={\"clang\":{\"extraArgs\":[${extraArgs:1}],\"resourceDir\":\"@clang@/resource-root\"}}"
|
||||
|
||||
exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@"
|
||||
51
pkgs/development/tools/misc/cflow/default.nix
Normal file
51
pkgs/development/tools/misc/cflow/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/misc/cgdb/default.nix
Normal file
24
pkgs/development/tools/misc/cgdb/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
39
pkgs/development/tools/misc/checkbashisms/default.nix
Normal file
39
pkgs/development/tools/misc/checkbashisms/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl, perl, installShellFiles }:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.21.1";
|
||||
pname = "checkbashisms";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
|
||||
hash = "sha256-1ZbIiUrFd38uMVLy7YayLLm5RrmcovsA++JTb8PbTFI=";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/misc/chrpath/default.nix
Normal file
24
pkgs/development/tools/misc/chrpath/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
28
pkgs/development/tools/misc/chruby-fish/default.nix
Normal file
28
pkgs/development/tools/misc/chruby-fish/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
44
pkgs/development/tools/misc/chruby/default.nix
Normal file
44
pkgs/development/tools/misc/chruby/default.nix
Normal file
|
|
@ -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; [ cstrahan ];
|
||||
mainProgram = "chruby-exec";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
12
pkgs/development/tools/misc/chruby/env.patch
Normal file
12
pkgs/development/tools/misc/chruby/env.patch
Normal file
|
|
@ -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
|
||||
39
pkgs/development/tools/misc/circleci-cli/default.nix
Normal file
39
pkgs/development/tools/misc/circleci-cli/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "circleci-cli";
|
||||
version = "0.1.17142";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CircleCI-Public";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-69GGJfnOHry+N3hKZapKz6eFSerqIHt4wRAhm/q/SOQ=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-7u2y1yBVpXf+D19tslD4s3B1KmABl4OWNzzLaBNL/2U=";
|
||||
|
||||
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" ];
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace data/data.go \
|
||||
--replace 'packr.New("circleci-cli-box", "../_data")' 'packr.New("circleci-cli-box", "${placeholder "out"}/share/circleci-cli")'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -t $out/share/circleci-cli _data/data.yml
|
||||
'';
|
||||
|
||||
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 ];
|
||||
license = licenses.mit;
|
||||
homepage = "https://circleci.com/";
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/misc/cl-launch/default.nix
Normal file
26
pkgs/development/tools/misc/cl-launch/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
41
pkgs/development/tools/misc/cli11/default.nix
Normal file
41
pkgs/development/tools/misc/cli11/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
lib, stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
gtest,
|
||||
python3,
|
||||
boost
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cli11";
|
||||
version = "1.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CLIUtils";
|
||||
repo = "CLI11";
|
||||
rev = "v${version}";
|
||||
sha256 = "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
checkInputs = [ boost python3 ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
preConfigure = ''
|
||||
rm -rfv extern/googletest
|
||||
ln -sfv ${gtest.src} extern/googletest
|
||||
sed -i '/TrueFalseTest/d' tests/CMakeLists.txt
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
}
|
||||
65
pkgs/development/tools/misc/clojure-lsp/default.nix
Normal file
65
pkgs/development/tools/misc/clojure-lsp/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ lib, stdenv, buildGraalvmNativeImage, babashka, fetchurl, fetchFromGitHub, clojure, writeScript }:
|
||||
|
||||
buildGraalvmNativeImage rec {
|
||||
pname = "clojure-lsp";
|
||||
version = "2022.05.23-13.18.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-puoHuFk1ZF6pu5SFflL0Zn5Xe4j4be9eCG5svYMSf4I=";
|
||||
};
|
||||
|
||||
jar = fetchurl {
|
||||
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/clojure-lsp-standalone.jar";
|
||||
sha256 = "47da76d6b6438abf31f32f1e12ce4aca944fb4c88527a61f721f7928e58a2b38";
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
41
pkgs/development/tools/misc/coccinelle/default.nix
Normal file
41
pkgs/development/tools/misc/coccinelle/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ fetchurl, lib, stdenv, python3, ncurses, ocamlPackages, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "coccinelle";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://coccinelle.gitlabpages.inria.fr/website/distrib/${pname}-${version}.tar.gz";
|
||||
sha256 = "0k0x4qnxzj8fymkp6y9irggcah070hj7hxq8l6ddj8ccpmjbhnsb";
|
||||
};
|
||||
|
||||
buildInputs = with ocamlPackages; [
|
||||
ocaml findlib menhir
|
||||
ocaml_pcre parmap stdcompat
|
||||
python3 ncurses pkg-config
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
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 = "http://coccinelle.lip6.fr/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
32
pkgs/development/tools/misc/complexity/default.nix
Normal file
32
pkgs/development/tools/misc/complexity/default.nix
Normal file
|
|
@ -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 = [ ];
|
||||
};
|
||||
}
|
||||
77
pkgs/development/tools/misc/coreboot-toolchain/default.nix
Normal file
77
pkgs/development/tools/misc/coreboot-toolchain/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, callPackage }:
|
||||
let
|
||||
common = arch: callPackage (
|
||||
{ bison
|
||||
, callPackage
|
||||
, curl
|
||||
, fetchgit
|
||||
, flex
|
||||
, getopt
|
||||
, git
|
||||
, gnat11
|
||||
, lib
|
||||
, perl
|
||||
, stdenvNoCC
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "coreboot-toolchain-${arch}";
|
||||
version = "4.16";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://review.coreboot.org/coreboot";
|
||||
rev = version;
|
||||
sha256 = "073n8yid3v0l9wgwnrdqrlgzaj9mnhs33a007dgr7xq3z0iw3i52";
|
||||
fetchSubmodules = false;
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
patchShebangs $out/util/crossgcc/buildgcc
|
||||
PATH=${lib.makeBinPath [ getopt ]}:$PATH $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
|
||||
rm -rf $out/.git
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison curl git perl ];
|
||||
buildInputs = [ flex gnat11 zlib ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontConfigure = true;
|
||||
dontInstall = true;
|
||||
|
||||
postPatch = ''
|
||||
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"
|
||||
])
|
||||
51
pkgs/development/tools/misc/coreboot-toolchain/stable.nix
Normal file
51
pkgs/development/tools/misc/coreboot-toolchain/stable.nix
Normal file
|
|
@ -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.1.0.tar.xz";
|
||||
archive = fetchurl {
|
||||
sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c";
|
||||
url = "mirror://gnu/mpfr/mpfr-4.1.0.tar.xz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "mpc-1.2.1.tar.gz";
|
||||
archive = fetchurl {
|
||||
sha256 = "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p";
|
||||
url = "mirror://gnu/mpc/mpc-1.2.1.tar.gz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "gcc-11.2.0.tar.xz";
|
||||
archive = fetchurl {
|
||||
sha256 = "12zs6vd2rapp42x154m479hg3h3lsafn3xhg06hp5hsldd9xr3nh";
|
||||
url = "mirror://gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "binutils-2.37.tar.xz";
|
||||
archive = fetchurl {
|
||||
sha256 = "0b53hhgfnafw27y0c3nbmlfidny2cc5km29pnfffd8r0y0j9f3c2";
|
||||
url = "mirror://gnu/binutils/binutils-2.37.tar.xz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "acpica-unix2-20211217.tar.gz";
|
||||
archive = fetchurl {
|
||||
sha256 = "0521hmaw2zhi0mpgnaf2i83dykfgql4bx98cg7xqy8wmj649z194";
|
||||
url = "https://acpica.org/sites/acpica/files/acpica-unix2-20211217.tar.gz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nasm-2.15.05.tar.bz2";
|
||||
archive = fetchurl {
|
||||
sha256 = "1l1gxs5ncdbgz91lsl4y7w5aapask3w02q9inayb2m5bwlwq6jrw";
|
||||
url = "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2";
|
||||
};
|
||||
}
|
||||
]
|
||||
36
pkgs/development/tools/misc/coreboot-toolchain/update.sh
Executable file
36
pkgs/development/tools/misc/coreboot-toolchain/update.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell --pure -i bash -p nix cacert git getopt
|
||||
|
||||
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
|
||||
32
pkgs/development/tools/misc/cppi/default.nix
Normal file
32
pkgs/development/tools/misc/cppi/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
11
pkgs/development/tools/misc/cproto/cproto.patch
Normal file
11
pkgs/development/tools/misc/cproto/cproto.patch
Normal file
|
|
@ -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
|
||||
34
pkgs/development/tools/misc/cproto/default.nix
Normal file
34
pkgs/development/tools/misc/cproto/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchurl, flex, bison }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cproto";
|
||||
version = "4.7t";
|
||||
|
||||
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-PM6CpxaHtp4KPiNIn+glunLmk+VZzPGTOVIIrA65b+U=";
|
||||
};
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
54
pkgs/development/tools/misc/creduce/default.nix
Normal file
54
pkgs/development/tools/misc/creduce/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
54
pkgs/development/tools/misc/cscope/default.nix
Normal file
54
pkgs/development/tools/misc/cscope/default.nix
Normal file
|
|
@ -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 = "http://cscope.sourceforge.net/";
|
||||
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
49
pkgs/development/tools/misc/csmith/default.nix
Normal file
49
pkgs/development/tools/misc/csmith/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
43
pkgs/development/tools/misc/ctags/default.nix
Normal file
43
pkgs/development/tools/misc/ctags/default.nix
Normal file
|
|
@ -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 = "http://ctags.sourceforge.net/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
|
||||
# So that Exuberant ctags is preferred over emacs's ctags
|
||||
priority = 1;
|
||||
};
|
||||
|
||||
}
|
||||
246
pkgs/development/tools/misc/ctags/unused-collision.patch
Normal file
246
pkgs/development/tools/misc/ctags/unused-collision.patch
Normal file
|
|
@ -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;
|
||||
78
pkgs/development/tools/misc/ctags/wrapped.nix
Normal file
78
pkgs/development/tools/misc/ctags/wrapped.nix
Normal file
|
|
@ -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 funtions beeing 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/"
|
||||
];
|
||||
}
|
||||
52
pkgs/development/tools/misc/cvise/default.nix
Normal file
52
pkgs/development/tools/misc/cvise/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, buildPythonApplication, fetchFromGitHub, bash, cmake, flex
|
||||
, libclang, llvm, unifdef
|
||||
, chardet, pebble, psutil, pytestCheckHook, pytest-flake8
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "cvise";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "marxin";
|
||||
repo = "cvise";
|
||||
rev = "v${version}";
|
||||
sha256 = "0cfzikkhp91hjgxjk3izzczb8d9p8v9zsfyk6iklk92n5qf1aakq";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Refer to unifdef by absolute path.
|
||||
./unifdef.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake flex llvm.dev ];
|
||||
buildInputs = [ bash libclang llvm llvm.dev unifdef ];
|
||||
propagatedBuildInputs = [ chardet pebble psutil ];
|
||||
checkInputs = [ pytestCheckHook pytest-flake8 unifdef ];
|
||||
|
||||
# 'cvise --command=...' generates a script with hardcoded shebang.
|
||||
postPatch = ''
|
||||
substituteInPlace cvise.py \
|
||||
--replace "#!/bin/bash" "#!${bash}/bin/bash"
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
patchShebangs cvise.py
|
||||
'';
|
||||
disabledTests = [
|
||||
# Needs gcc, fails when run noninteractively (without tty).
|
||||
"test_simple_reduction"
|
||||
];
|
||||
|
||||
dontUsePipInstall = true;
|
||||
dontUseSetuptoolsBuild = true;
|
||||
dontUseSetuptoolsCheck = true;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
8
pkgs/development/tools/misc/cvise/unifdef.patch
Normal file
8
pkgs/development/tools/misc/cvise/unifdef.patch
Normal file
|
|
@ -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
|
||||
59
pkgs/development/tools/misc/cwebbin/default.nix
Normal file
59
pkgs/development/tools/misc/cwebbin/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
94
pkgs/development/tools/misc/d-feet/default.nix
Normal file
94
pkgs/development/tools/misc/d-feet/default.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{ 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
|
||||
];
|
||||
|
||||
# Temporary fix
|
||||
# See https://github.com/NixOS/nixpkgs/issues/56943
|
||||
strictDeps = false;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
67
pkgs/development/tools/misc/d-spy/default.nix
Normal file
67
pkgs/development/tools/misc/d-spy/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, desktop-file-utils
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, glib
|
||||
, gtk4
|
||||
, libadwaita
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, wrapGAppsHook4
|
||||
, gnome
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "d-spy";
|
||||
version = "1.2.0";
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/dspy/${lib.versions.majorMinor version}/dspy-${version}.tar.xz";
|
||||
sha256 = "XKL0z00w0va9m1OfuVq5YJyE1jzeynBxb50jc+O99tQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Remove pointless dependencies
|
||||
# https://gitlab.gnome.org/GNOME/d-spy/-/merge_requests/6
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/d-spy/-/commit/5a0ec8d53d006e95e93c6d6e32a381eb248b12a1.patch";
|
||||
sha256 = "jalfdAXcH8GZ50qb2peG+2841cGan4EhwN88z5Ewf+k=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
desktop-file-utils
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
gtk4
|
||||
libadwaita
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = "dspy";
|
||||
attrPath = "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;
|
||||
};
|
||||
}
|
||||
46
pkgs/development/tools/misc/dbench/default.nix
Normal file
46
pkgs/development/tools/misc/dbench/default.nix
Normal file
|
|
@ -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 ];
|
||||
NIX_CFLAGS_COMPILE = [ "-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 ];
|
||||
};
|
||||
}
|
||||
10
pkgs/development/tools/misc/dbench/fix-missing-stdint.patch
Normal file
10
pkgs/development/tools/misc/dbench/fix-missing-stdint.patch
Normal file
|
|
@ -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)))
|
||||
|
||||
31
pkgs/development/tools/misc/ddd/default.nix
Normal file
31
pkgs/development/tools/misc/ddd/default.nix
Normal file
|
|
@ -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
|
||||
];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
11
pkgs/development/tools/misc/ddd/gcc44.patch
Normal file
11
pkgs/development/tools/misc/ddd/gcc44.patch
Normal file
|
|
@ -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
|
||||
30
pkgs/development/tools/misc/debugedit/default.nix
Normal file
30
pkgs/development/tools/misc/debugedit/default.nix
Normal file
|
|
@ -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 ];
|
||||
checkInputs = [ 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 ];
|
||||
};
|
||||
}
|
||||
63
pkgs/development/tools/misc/dejagnu/default.nix
Normal file
63
pkgs/development/tools/misc/dejagnu/default.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ 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 = true;
|
||||
|
||||
# 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 = ''
|
||||
wrapProgram "$out/bin/runtest" \
|
||||
--prefix PATH ":" "${expect}/bin"
|
||||
'';
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/tools/misc/devspace/default.nix
Normal file
37
pkgs/development/tools/misc/devspace/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "devspace";
|
||||
version = "5.18.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "loft-sh";
|
||||
repo = "devspace";
|
||||
rev = "v${version}";
|
||||
sha256 = "1i4ir8p3xpfy8z8w8gzpk1hyzs04b5llrjd6hl2hzrxd1likl0sh";
|
||||
};
|
||||
|
||||
vendorSha256 = 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 ];
|
||||
};
|
||||
}
|
||||
21
pkgs/development/tools/misc/dfu-programmer/default.nix
Normal file
21
pkgs/development/tools/misc/dfu-programmer/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
31
pkgs/development/tools/misc/dfu-util/default.nix
Normal file
31
pkgs/development/tools/misc/dfu-util/default.nix
Normal file
|
|
@ -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 = "http://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 = "http://dfu-util.sourceforge.net";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.fpletz ];
|
||||
};
|
||||
}
|
||||
21
pkgs/development/tools/misc/direvent/default.nix
Normal file
21
pkgs/development/tools/misc/direvent/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
84
pkgs/development/tools/misc/distcc/default.nix
Normal file
84
pkgs/development/tools/misc/distcc/default.nix
Normal file
|
|
@ -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 pkg-config 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
|
||||
${if sysconfDir == "" then "" else "--sysconfdir=${sysconfDir}"}
|
||||
${if static then "LDFLAGS=-static" else ""}
|
||||
--with${if static == true || popt == null then "" else "out"}-included-popt
|
||||
--with${if avahi != null then "" else "out"}-avahi
|
||||
--with${if gtk3 != null then "" else "out"}-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
|
||||
45
pkgs/development/tools/misc/distcc/masq.nix
Normal file
45
pkgs/development/tools/misc/distcc/masq.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
35
pkgs/development/tools/misc/doclifter/default.nix
Normal file
35
pkgs/development/tools/misc/doclifter/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
31
pkgs/development/tools/misc/docopts/default.nix
Normal file
31
pkgs/development/tools/misc/docopts/default.nix
Normal file
|
|
@ -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.linux;
|
||||
};
|
||||
}
|
||||
11
pkgs/development/tools/misc/docopts/deps.nix
generated
Normal file
11
pkgs/development/tools/misc/docopts/deps.nix
generated
Normal file
|
|
@ -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=";
|
||||
};
|
||||
}
|
||||
]
|
||||
31
pkgs/development/tools/misc/drush/default.nix
Normal file
31
pkgs/development/tools/misc/drush/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "drush";
|
||||
version = "8.4.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar";
|
||||
sha256 = "sha256-yXSoTDFLsjDiYkRfrIxv2WTVdHzgxZRvtn3Pht5XF4k=";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
40
pkgs/development/tools/misc/dura/default.nix
Normal file
40
pkgs/development/tools/misc/dura/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, openssl, pkg-config }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "dura";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tkellogg";
|
||||
repo = "dura";
|
||||
rev = "v0.1.0";
|
||||
sha256 = "sha256-XnsR1oL9iImtj0X7wJ8Pp/An0/AVF5y+sD551yX4IGo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-+Tq0a5cs2XZoT7yzTf1oIPd3kgD6SyrQqxQ1neTcMwk=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A background process that saves uncommited 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;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ drupol ];
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue