From 9b09e3f7ad53aee821b5b119ffb65060b4c33aea Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Tue, 5 Apr 2022 06:53:40 -0600 Subject: [PATCH] whatweb: init at 0.5.5 --- pkgs/tools/security/whatweb/Gemfile | 6 ++ pkgs/tools/security/whatweb/Gemfile.lock | 25 ++++++++ pkgs/tools/security/whatweb/default.nix | 50 ++++++++++++++++ pkgs/tools/security/whatweb/gemset.nix | 74 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 5 files changed, 157 insertions(+) create mode 100644 pkgs/tools/security/whatweb/Gemfile create mode 100644 pkgs/tools/security/whatweb/Gemfile.lock create mode 100644 pkgs/tools/security/whatweb/default.nix create mode 100644 pkgs/tools/security/whatweb/gemset.nix diff --git a/pkgs/tools/security/whatweb/Gemfile b/pkgs/tools/security/whatweb/Gemfile new file mode 100644 index 000000000000..a376a3baae36 --- /dev/null +++ b/pkgs/tools/security/whatweb/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' +gem 'ipaddr' +gem 'addressable' +gem 'json' +gem 'mongo' +gem 'rchardet' diff --git a/pkgs/tools/security/whatweb/Gemfile.lock b/pkgs/tools/security/whatweb/Gemfile.lock new file mode 100644 index 000000000000..7bfd24112b1a --- /dev/null +++ b/pkgs/tools/security/whatweb/Gemfile.lock @@ -0,0 +1,25 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + bson (4.14.1) + ipaddr (1.2.4) + json (2.6.1) + mongo (2.17.1) + bson (>= 4.8.2, < 5.0.0) + public_suffix (4.0.6) + rchardet (1.8.0) + +PLATFORMS + ruby + +DEPENDENCIES + addressable + ipaddr + json + mongo + rchardet + +BUNDLED WITH + 2.1.4 diff --git a/pkgs/tools/security/whatweb/default.nix b/pkgs/tools/security/whatweb/default.nix new file mode 100644 index 000000000000..30d866da869a --- /dev/null +++ b/pkgs/tools/security/whatweb/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetchFromGitHub, bundlerEnv, ruby }: + +let + gems = bundlerEnv { + name = "whatweb-env"; + inherit ruby; + gemdir = ./.; + }; + +in stdenv.mkDerivation rec { + pname = "whatweb"; + version = "0.5.5"; + + src = fetchFromGitHub { + owner = "urbanadventurer"; + repo = "whatweb"; + rev = "v${version}"; + sha256 = "sha256-HLF55x4C8n8aPO4SI0d6Z9wZe80krtUaGUFmMaYRBIE="; + }; + + prePatch = '' + substituteInPlace Makefile \ + --replace "/usr/local" "$out" \ + --replace "/usr" "$out" + ''; + + buildInputs = [ gems ]; + + installPhase = '' + runHook preInstall + + raw=$out/share/whatweb/whatweb + rm $out/bin/whatweb + cat << EOF >> $out/bin/whatweb + #!/bin/sh -e + exec ${gems}/bin/bundle exec ${ruby}/bin/ruby "$raw" "\$@" + EOF + chmod +x $out/bin/whatweb + + runHook postInstall + ''; + + meta = with lib; { + description = "Next generation web scanner"; + homepage = "https://github.com/urbanadventurer/whatweb"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ wolfangaukang ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/security/whatweb/gemset.nix b/pkgs/tools/security/whatweb/gemset.nix new file mode 100644 index 000000000000..22d469b53e27 --- /dev/null +++ b/pkgs/tools/security/whatweb/gemset.nix @@ -0,0 +1,74 @@ +{ + addressable = { + dependencies = ["public_suffix"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp"; + type = "gem"; + }; + version = "2.8.0"; + }; + bson = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03n3w96vpblaxvk1qk8hq7sbsmg4nv7qdkdr8f7nfvalgpakp5i5"; + type = "gem"; + }; + version = "4.14.1"; + }; + ipaddr = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "13qd34nzpgp3fxfjbvaqg3dcnfr0cgl5vjvcqy0hfllbvfcklnbq"; + type = "gem"; + }; + version = "1.2.4"; + }; + json = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz"; + type = "gem"; + }; + version = "2.6.1"; + }; + mongo = { + dependencies = ["bson"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19sihy8ihi3hmdg3gxbf4qvzmjnzx8xygg9534012j9z0wmhs7h1"; + type = "gem"; + }; + version = "2.17.1"; + }; + public_suffix = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9"; + type = "gem"; + }; + version = "4.0.6"; + }; + rchardet = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1isj1b3ywgg2m1vdlnr41lpvpm3dbyarf1lla4dfibfmad9csfk9"; + type = "gem"; + }; + version = "1.8.0"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a330618c6a14..2496bc3765c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11106,6 +11106,8 @@ with pkgs; wf-recorder = callPackage ../applications/video/wf-recorder { }; + whatweb = callPackage ../tools/security/whatweb { }; + whipper = callPackage ../applications/audio/whipper { }; whitebophir = callPackage ../servers/web-apps/whitebophir { };