mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
install gef optional dependencies
This commit is contained in:
parent
32fd85a4d3
commit
aa2de56953
1 changed files with 17 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
{ stdenv, fetchFromGitHub, makeWrapper, gdb }:
|
||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, gdb, python3 }:
|
||||
let
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hugsy";
|
||||
repo = "gef";
|
||||
|
@ -7,6 +8,20 @@ let
|
|||
sha256 = "zKn3yS9h8bzjsb/iPgNU8g5IgXFBaKvM7osTqzzv16s=";
|
||||
};
|
||||
|
||||
reqs =
|
||||
(builtins.filter (x: x != "")
|
||||
(lib.splitString "\n"
|
||||
(builtins.readFile "${src}/requirements.txt")));
|
||||
|
||||
# python3.pkgs.ropper does not work with makePythonPath. Swap it out.
|
||||
pyp = python3.pkgs // {
|
||||
ropper = python3.pkgs.buildPythonPackage {
|
||||
inherit (python3.pkgs.ropper) name src propagatedBuildInputs;
|
||||
};
|
||||
};
|
||||
|
||||
optionals = pyp.makePythonPath (map (x: pyp.${x}) reqs);
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "gef";
|
||||
|
@ -15,6 +30,7 @@ stdenv.mkDerivation {
|
|||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
makeWrapper "${gdb}/bin/gdb" "$out/bin/gef" \
|
||||
--suffix PYTHONPATH : "${optionals}" \
|
||||
--add-flags "-x ${src}/gef.py" \
|
||||
--add-flags "-ex 'gef config context.clear_screen 0'"
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue