pythonPackages.pwntools: add bash completions (#121907)

Also fixed some PR review warnings
This commit is contained in:
Kristoffer Søholm 2021-05-06 22:05:27 +02:00 committed by GitHub
parent 3b3671ba99
commit ae58a56abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,7 @@
, buildPythonPackage , buildPythonPackage
, debugger , debugger
, fetchPypi , fetchPypi
, isPy3k
, Mako , Mako
, makeWrapper
, packaging , packaging
, pysocks , pysocks
, pygments , pygments
@ -20,7 +18,7 @@
, tox , tox
, unicorn , unicorn
, intervaltree , intervaltree
, fetchpatch , installShellFiles
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -39,6 +37,10 @@ buildPythonPackage rec {
sed -i 's/unicorn>=1.0.2rc1,<1.0.2rc4/unicorn>=1.0.2rc1/' setup.py sed -i 's/unicorn>=1.0.2rc1,<1.0.2rc4/unicorn>=1.0.2rc1/' setup.py
''; '';
nativeBuildInputs = [
installShellFiles
];
propagatedBuildInputs = [ propagatedBuildInputs = [
Mako Mako
packaging packaging
@ -60,6 +62,10 @@ buildPythonPackage rec {
doCheck = false; # no setuptools tests for the package doCheck = false; # no setuptools tests for the package
postInstall = ''
installShellCompletion --bash extra/bash_completion.d/shellcraft
'';
postFixup = '' postFixup = ''
mkdir -p "$out/bin" mkdir -p "$out/bin"
makeWrapper "${debugger}/bin/${lib.strings.getName debugger}" "$out/bin/pwntools-gdb" makeWrapper "${debugger}/bin/${lib.strings.getName debugger}" "$out/bin/pwntools-gdb"