From 2b587e67fdac6ab098aaa12d65fcf15732da086a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Jan 2021 13:45:20 +0100 Subject: [PATCH] badchars: init at 0.4.0 --- pkgs/tools/security/badchars/default.nix | 32 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/security/badchars/default.nix diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/tools/security/badchars/default.nix new file mode 100644 index 000000000000..3125ff0c28c9 --- /dev/null +++ b/pkgs/tools/security/badchars/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonApplication +, fetchPypi +}: + +buildPythonApplication rec { + pname = "badchars"; + version = "0.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1xqki8qnfwl97d60xj69alyzwa1mnfbwki25j0vhvhb05varaxz2"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "argparse" "" + ''; + + # no tests are available and it can't be imported (it's only a script, not a module) + doCheck = false; + + meta = with lib; { + description = "HEX badchar generator for different programming languages"; + longDescription = '' + A HEX bad char generator to instruct encoders such as shikata-ga-nai to + transform those to other chars. + ''; + homepage = "https://github.com/cytopia/badchars"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1a41f130c78..09138e566121 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1476,6 +1476,8 @@ in babeld = callPackage ../tools/networking/babeld { }; + badchars = python3Packages.callPackage ../tools/security/badchars { }; + badvpn = callPackage ../tools/networking/badvpn {}; barcode = callPackage ../tools/graphics/barcode {};