about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-03-28 08:51:43 +0100
committerGitHub <noreply@github.com>2024-03-28 08:51:43 +0100
commit8689db5630483b725ac416a8118cad62d241c6dd (patch)
tree1c0fadfd2c0d3bdbe43863f16997d94499f7adf8 /pkgs/tools
parent4635cbb9df4ff20bc70eaed0e09cb8db94e5e676 (diff)
parentf97761e47b21761b4cce6a14183a385b19c4168d (diff)
Merge pull request #299494 from fabaff/badchars-refactor
badchars: refactor
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/security/badchars/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/tools/security/badchars/default.nix
index a6e5666c189f8..4c4d566c9074e 100644
--- a/pkgs/tools/security/badchars/default.nix
+++ b/pkgs/tools/security/badchars/default.nix
@@ -1,33 +1,41 @@
 { lib
 , buildPythonApplication
 , fetchPypi
+, python3
 }:
 
-buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "badchars";
   version = "0.4.0";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1xqki8qnfwl97d60xj69alyzwa1mnfbwki25j0vhvhb05varaxz2";
+    hash = "sha256-4neV1S5gwQ03kEXEyZezNSj+PVXJyA5MO4lyZzGKE/c=";
   };
 
   postPatch = ''
-    substituteInPlace setup.py --replace "argparse" ""
+    substituteInPlace setup.py \
+      --replace-fail "argparse" ""
   '';
 
+  build-system = with python3.pkgs; [
+    setuptools
+  ];
+
   # 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";
-    mainProgram = "badchars";
     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";
+    changelog = "https://github.com/cytopia/badchars/releases/tag/${version}";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
+    mainProgram = "badchars";
   };
 }