A collection of various nix packages useful for CTFs and security stuff. Should upstream it. May or may not get more updates after jwt_tool :^
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pwnix/jwt-tool.nix

32 lines
681 B

{ nixpkgs, jwt-tool }:
let
python = (nixpkgs.python3.withPackages (p: with p; [ termcolor pycryptodomex requests ]));
in
nixpkgs.python3Packages.buildPythonApplication
{
format = "other";
pname = "jwt-tool";
version = "v2.2.4";
propagatedBuildInputs = [ python ];
src = jwt-tool.outPath;
buildPhase = ''
chmod +x jwt_tool.py
'';
postPatch = ''
patchShebangs .
'';
installPhase = ''
mkdir -p $out/bin
mv * $out
ln -s $out/jwt_tool.py $out/bin/jwt_tool
chmod +x $out/bin/jwt_tool
for i in "$out/bin/"*
do
wrapProgram "$i" --prefix PYTHONPATH : \
"$out/${python.sitePackages}" || \
exit 2
done
'';
}