diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-02-15 00:02:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 00:02:11 +0000 |
commit | 56fa4571c1ee2a0517b70fe1528039408accb055 (patch) | |
tree | 80923f12b7abbcde79e8972689fa61f977f8dbce /pkgs/tools | |
parent | b72f4a4a2ad01104f39f151bca77b15f55b5c461 (diff) | |
parent | 998cac7284ee335729094e6fb2f8d681d21e6872 (diff) | |
download | nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar.gz nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar.bz2 nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar.lz nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar.xz nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.tar.zst nixpkgs-56fa4571c1ee2a0517b70fe1528039408accb055.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/filesystems/glusterfs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/graphics/adriconf/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/misc/btdu/default.nix | 83 | ||||
-rwxr-xr-x | pkgs/tools/misc/btdu/update.py | 82 | ||||
-rw-r--r-- | pkgs/tools/misc/starship/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/misc/taoup/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/misc/wimboot/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/security/libmodsecurity/default.nix | 44 | ||||
-rw-r--r-- | pkgs/tools/security/modsecurity-crs/default.nix | 42 |
9 files changed, 256 insertions, 23 deletions
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix index dab69649fdc..3c1e0c50d61 100644 --- a/pkgs/tools/filesystems/glusterfs/default.nix +++ b/pkgs/tools/filesystems/glusterfs/default.nix @@ -55,13 +55,13 @@ let ]; in stdenv.mkDerivation rec { pname = "glusterfs"; - version = "10.0"; + version = "10.1"; src = fetchFromGitHub { owner = "gluster"; repo = pname; rev = "v${version}"; - sha256 = "sha256-n6HdXs5kLbEI8Gaw2KBtO3i8hhadb+MsshUve/DOYg0="; + sha256 = "sha256-vVFC2kQNneaOwrezPehOX32dpJb88ZhGHBApEXc9MOg="; }; inherit buildInputs propagatedBuildInputs; diff --git a/pkgs/tools/graphics/adriconf/default.nix b/pkgs/tools/graphics/adriconf/default.nix index 74ff4f1ed66..738c5316882 100644 --- a/pkgs/tools/graphics/adriconf/default.nix +++ b/pkgs/tools/graphics/adriconf/default.nix @@ -8,26 +8,25 @@ , atkmm , pcre , gtkmm3 -, boost -, libxmlxx3 +, pugixml , mesa , pciutils }: stdenv.mkDerivation rec { pname = "adriconf"; - version = "2.4.1"; + version = "2.5.0"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "mesa"; repo = pname; rev = "v${version}"; - sha256 = "hZy+FpKKBKuho/fALu2O+44zzK6s/M8CTbhrO00ANgo="; + sha256 = "sha256-nxqrs8c1sRruZLwFwK/JfXQPfpEq08Pe2n7ojQkH3SM="; }; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ libdrm libGL atkmm pcre gtkmm3 boost libxmlxx3 mesa pciutils ]; + buildInputs = [ libdrm libGL atkmm pcre gtkmm3 pugixml mesa pciutils ]; cmakeFlags = [ "-DENABLE_UNIT_TESTS=off" ]; diff --git a/pkgs/tools/misc/btdu/default.nix b/pkgs/tools/misc/btdu/default.nix new file mode 100644 index 00000000000..d297af0d440 --- /dev/null +++ b/pkgs/tools/misc/btdu/default.nix @@ -0,0 +1,83 @@ +{stdenv, lib, fetchurl, dub, ncurses, ldc, zlib, removeReferencesTo }: + +let + _d_ae_ver = "0.0.3100"; + _d_btrfs_ver = "0.0.12"; + _d_ncurses_ver = "0.0.149"; + _d_emsi_containers_ver = "0.9.0"; +in +stdenv.mkDerivation rec { + pname = "btdu"; + version = "0.3.1"; + + srcs = [ + (fetchurl { + url = "https://github.com/CyberShadow/${pname}/archive/v${version}.tar.gz"; + sha256 = "760b2f0d28920a78b7967dd34c429125135688a3aefc57ab3a92d07bc3ef10cb"; + }) + (fetchurl { + url = "https://github.com/CyberShadow/ae/archive/v${_d_ae_ver}.tar.gz"; + sha256 = "86fa09ef6c1be4cbe8ad1c85729054e5d691b41ff57c7980d99937ec0f45b950"; + }) + (fetchurl { + url = "https://github.com/CyberShadow/d-btrfs/archive/v${_d_btrfs_ver}.tar.gz"; + sha256 = "cf2b1fa3e94a0aa239d465adbac239514838835283521d632f571948aa517f92"; + }) + (fetchurl { + url = "https://github.com/D-Programming-Deimos/ncurses/archive/v${_d_ncurses_ver}.tar.gz"; + sha256 = "2c8497f5dd93f9d3a05ca7ed57c4fcaee1e988fd25a24de106917ddf72f34646"; + }) + (fetchurl { + url = "https://github.com/dlang-community/containers/archive/v${_d_emsi_containers_ver}.tar.gz"; + sha256 = "5e256b84bbdbd2bd625cba0472ea27a1fde6d673d37a85fe971a20d52874acaa"; + }) + ]; + + sourceRoot = "."; + + postUnpack = '' + mv ae-${_d_ae_ver} "ae" + ''; + + + nativeBuildInputs = [ dub ldc ]; + buildInputs = [ ncurses zlib ]; + + configurePhase = '' + runHook preConfigure + mkdir home + HOME="home" dub add-local ae ${_d_ae_ver} + HOME="home" dub add-local d-btrfs-${_d_btrfs_ver} ${_d_btrfs_ver} + HOME="home" dub add-local ncurses-${_d_ncurses_ver} ${_d_ncurses_ver} + HOME="home" dub add-local containers-${_d_emsi_containers_ver} ${_d_emsi_containers_ver} + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + cd ${pname}-${version} + HOME="../home" dub --skip-registry=all build -b release + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp btdu $out/bin/ + runHook postInstall + ''; + + postInstall = '' + ${removeReferencesTo}/bin/remove-references-to -t ${ldc} $out/bin/btdu + ''; + + passthru.updateScript = ./update.py; + + meta = with lib; { + description = "Sampling disk usage profiler for btrfs"; + homepage = "https://github.com/CyberShadow/btdu"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = with maintainers; [ atila ]; + }; +} diff --git a/pkgs/tools/misc/btdu/update.py b/pkgs/tools/misc/btdu/update.py new file mode 100755 index 00000000000..aa3b149d733 --- /dev/null +++ b/pkgs/tools/misc/btdu/update.py @@ -0,0 +1,82 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python -p python39Packages.requests + +import requests +import subprocess + +pkgbuild = requests.get('https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=btdu').text + +def grabDepVersions(depDict, pkgbuild=pkgbuild): + for line in pkgbuild.split('\n'): + if depDict["string"] in line: + start = len(depDict["string"]) + 1 + depDict["version"] = line[start:] + break + +def grabDepHashes(key,pkgbuild=pkgbuild): + start = pkgbuild.find(key) + len(key) + end = start+64 + hashes = [] + for i in range(5): + hashes.append(pkgbuild[start:end]) + start = pkgbuild.find("'",end+1) + 1 + end = start+64 + return hashes + +def findLine(key,derivation): + count = 0 + lines = [] + for line in derivation: + if key in line: + lines.append(count) + count += 1 + return lines + +def updateVersions(btdu,ae,btrfs,ncurses,containers,derivation): + key = "let" + line = findLine(key,derivation)[0] + 1 + derivation[line+0] = f' _d_ae_ver = "{ae["version"]}";\n' + derivation[line+1] = f' _d_btrfs_ver = "{btrfs["version"]}";\n' + derivation[line+2] = f' _d_ncurses_ver = "{ncurses["version"]}";\n' + derivation[line+3] = f' _d_emsi_containers_ver = "{containers["version"]}";\n' + + key = "version = " + line = findLine(key,derivation)[0] + derivation[line] = f' version = "{btdu["version"]}";\n' + + return derivation + +def updateHashes(btdu,ae,btrfs,ncurses,containers,derivation): + key = "sha256 = " + hashLines = findLine(key,derivation) + for i in range(len(hashes)): + derivation[hashLines[i]] = f' sha256 = "{hashes[i]}";\n' + + return derivation + +if __name__ == "__main__": + + btdu = {"string": "pkgver"} + ae = {"string": "_d_ae_ver"} + btrfs = {"string": "_d_btrfs_ver"} + ncurses = {"string": "_d_ncurses_ver"} + containers = {"string": "_d_emsi_containers_ver"} + + grabDepVersions(btdu) + grabDepVersions(ae) + grabDepVersions(btrfs) + grabDepVersions(ncurses) + grabDepVersions(containers) + + hashes = grabDepHashes("sha256sums=('") + + nixpkgs = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip('\n') + btduFolder = "/pkgs/tools/misc/btdu/" + with open(nixpkgs + btduFolder + "default.nix", 'r') as arq: + derivation = arq.readlines() + + derivation = updateVersions(btdu,ae,btrfs,ncurses,containers,derivation) + derivation = updateHashes(btdu,ae,btrfs,ncurses,containers,derivation) + + with open(nixpkgs + btduFolder + "default.nix", 'w') as arq: + arq.writelines(derivation) diff --git a/pkgs/tools/misc/starship/default.nix b/pkgs/tools/misc/starship/default.nix index 6205106858e..d61fd9ddda9 100644 --- a/pkgs/tools/misc/starship/default.nix +++ b/pkgs/tools/misc/starship/default.nix @@ -8,6 +8,7 @@ , libiconv , nixosTests , Security +, Foundation }: rustPlatform.buildRustPackage rec { @@ -24,7 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; buildInputs = lib.optionals stdenv.isLinux [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + ++ lib.optionals stdenv.isDarwin [ libiconv Security Foundation ]; postInstall = '' for shell in bash fish zsh; do diff --git a/pkgs/tools/misc/taoup/default.nix b/pkgs/tools/misc/taoup/default.nix index 969df132be8..df61794185d 100644 --- a/pkgs/tools/misc/taoup/default.nix +++ b/pkgs/tools/misc/taoup/default.nix @@ -4,13 +4,13 @@ let in stdenv.mkDerivation rec { pname = "taoup"; - version = "1.1.14"; + version = "1.1.16"; src = fetchFromGitHub { owner = "globalcitizen"; repo = pname; rev = "v${version}"; - sha256 = "1gs6f66fg1l504riw481nvyw7cchbr3qjks4mkj2qb3s9147ad8j"; + hash = "sha256-LNS4m7Er4dQKYDuHMF/5mAi4yGcYzppxfqVKFOT6I/s="; }; buildInputs = [ rubyEnv bash ncurses ]; @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { dontBuild = true; installPhase = '' + runHook preInstall + mkdir -p $out/{bin,lib/taoup} cp taoup $out/lib/taoup @@ -51,6 +53,8 @@ stdenv.mkDerivation rec { cp taoup-fortune $out/bin chmod +x $out/bin/taoup-fortune + + runHook postInstall ''; meta = { diff --git a/pkgs/tools/misc/wimboot/default.nix b/pkgs/tools/misc/wimboot/default.nix index 538f5113fd8..67df4056b5f 100644 --- a/pkgs/tools/misc/wimboot/default.nix +++ b/pkgs/tools/misc/wimboot/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "wimboot"; - version = "2.7.3"; + version = "2.7.4"; src = fetchFromGitHub { owner = "ipxe"; repo = "wimboot"; rev = "v${version}"; - sha256 = "12c677agkmiqs35qfpqfj7c4kxkizhbk9l6hig36dslzp4fwpl70"; + sha256 = "sha256-LaPH6nGQanweAG0niS75hr7zbO/9A3iZjS8wHD//oJ4="; }; sourceRoot = "source/src"; diff --git a/pkgs/tools/security/libmodsecurity/default.nix b/pkgs/tools/security/libmodsecurity/default.nix index 03aed8c50e0..65512eb8be6 100644 --- a/pkgs/tools/security/libmodsecurity/default.nix +++ b/pkgs/tools/security/libmodsecurity/default.nix @@ -1,34 +1,57 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config -, doxygen, perl, valgrind -, curl, geoip, libxml2, lmdb, lua, pcre, yajl }: +{ lib, stdenv, fetchFromGitHub +, autoreconfHook, bison, flex, pkg-config +, curl, geoip, libmaxminddb, libxml2, lmdb, lua, pcre +, ssdeep, valgrind, yajl +}: stdenv.mkDerivation rec { pname = "libmodsecurity"; - version = "3.0.4"; + version = "3.0.6"; src = fetchFromGitHub { owner = "SpiderLabs"; repo = "ModSecurity"; - fetchSubmodules = true; rev = "v${version}"; - sha256 = "07vry10cdll94sp652hwapn0ppjv3mb7n2s781yhy7hssap6f2vp"; + sha256 = "sha256-V+NBT2YN8qO3Px8zEzSA2ZsjSf1pv8+VlLxYlrpqfGg="; + fetchSubmodules = true; }; - nativeBuildInputs = [ autoreconfHook pkg-config doxygen ]; + nativeBuildInputs = [ autoreconfHook bison flex pkg-config ]; + buildInputs = [ curl geoip libmaxminddb libxml2 lmdb lua pcre ssdeep valgrind yajl ]; - buildInputs = [ perl valgrind curl geoip libxml2 lmdb lua pcre yajl ]; + outputs = [ "out" "dev" ]; configureFlags = [ - "--enable-static" + "--enable-parser-generation" "--with-curl=${curl.dev}" "--with-libxml=${libxml2.dev}" + "--with-lmdb=${lmdb.out}" + "--with-maxmind=${libmaxminddb}" "--with-pcre=${pcre.dev}" - "--with-yajl=${yajl}" + "--with-ssdeep=${ssdeep}" ]; + postPatch = '' + substituteInPlace build/lmdb.m4 \ + --replace "\''${path}/include/lmdb.h" "${lmdb.dev}/include/lmdb.h" \ + --replace "lmdb_inc_path=\"\''${path}/include\"" "lmdb_inc_path=\"${lmdb.dev}/include\"" + substituteInPlace build/ssdeep.m4 \ + --replace "/usr/local/libfuzzy" "${ssdeep}/lib" \ + --replace "\''${path}/include/fuzzy.h" "${ssdeep}/include/fuzzy.h" \ + --replace "ssdeep_inc_path=\"\''${path}/include\"" "ssdeep_inc_path=\"${ssdeep}/include\"" + substituteInPlace modsecurity.conf-recommended \ + --replace "SecUnicodeMapFile unicode.mapping 20127" "SecUnicodeMapFile $out/share/modsecurity/unicode.mapping 20127" + ''; + + postInstall = '' + mkdir -p $out/share/modsecurity + cp ${src}/{AUTHORS,CHANGES,LICENSE,README.md,modsecurity.conf-recommended,unicode.mapping} $out/share/modsecurity + ''; + enableParallelBuilding = true; meta = with lib; { + homepage = "https://github.com/SpiderLabs/ModSecurity"; description = '' ModSecurity v3 library component. ''; @@ -40,7 +63,6 @@ stdenv.mkDerivation rec { the ModSecurity SecRules format and apply them to HTTP content provided by your application via Connectors. ''; - homepage = "https://modsecurity.org/"; license = licenses.asl20; platforms = platforms.all; maintainers = with maintainers; [ izorkin ]; diff --git a/pkgs/tools/security/modsecurity-crs/default.nix b/pkgs/tools/security/modsecurity-crs/default.nix new file mode 100644 index 00000000000..124eca09ca4 --- /dev/null +++ b/pkgs/tools/security/modsecurity-crs/default.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + version = "3.3.2"; + pname = "modsecurity-crs"; + + src = fetchFromGitHub { + owner = "coreruleset"; + repo = "coreruleset"; + rev = "v${version}"; + sha256 = "sha256-m/iVLhk2y5BpYu8EwC2adrrDnbaVCQ0SE25ltvMokCw="; + }; + + installPhase = '' + install -D -m444 -t $out/rules ${src}/rules/*.conf + install -D -m444 -t $out/rules ${src}/rules/*.data + install -D -m444 -t $out/share/doc/modsecurity-crs ${src}/*.md + install -D -m444 -t $out/share/doc/modsecurity-crs ${src}/{CHANGES,INSTALL,LICENSE} + install -D -m444 -t $out/share/modsecurity-crs ${src}/rules/*.example + install -D -m444 -t $out/share/modsecurity-crs ${src}/crs-setup.conf.example + cat > $out/share/modsecurity-crs/modsecurity-crs.load.example <<EOF + ## + ## This is a sample file for loading OWASP CRS's rules. + ## + Include /etc/modsecurity/crs/crs-setup.conf + IncludeOptional /etc/modsecurity/crs/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf + Include $out/rules/*.conf + IncludeOptional /etc/modsecurity/crs/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf + EOF + ''; + + meta = with lib; { + homepage = "https://coreruleset.org"; + description = '' + The OWASP ModSecurity Core Rule Set is a set of generic attack detection + rules for use with ModSecurity or compatible web application firewalls. + ''; + license = licenses.asl20; + platforms = platforms.all; + maintainers = with maintainers; [ izorkin ]; + }; +} |