nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit ccd332b22d6c7e307e617ac88303be5b614dd9b5
parent 4031fe9e6edc143f6f1dac37b8618aaab7dcc250
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat, 11 Apr 2020 18:24:56 +0300

Add gef

Diffstat:
Mnix/sources.json | 13+++++++++++++
Mpkgs/default.nix | 1+
Apkgs/development/tools/gef/default.nix | 36++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -103,6 +103,19 @@ "url": "https://github.com/embox/embox/archive/ad5ed2947ae7ad68e6b0b0400c1a12d1a5114fa2.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "gef": { + "branch": "dev", + "builtin": false, + "description": "GEF - GDB Enhanced Features for exploit devs & reversers", + "homepage": "http://gef.rtfd.io", + "owner": "hugsy", + "repo": "gef", + "rev": "f17bea5301adce271fe307320272346ac733a895", + "sha256": "0bfwkygyik5sd9kddfs3q8wylxh70yvvapxyg98qjmz1dqv41md1", + "type": "tarball", + "url": "https://github.com/hugsy/gef/archive/f17bea5301adce271fe307320272346ac733a895.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "geofabrik-estonia": { "builtin": false, "sha256": "1r7f8q4par0jnnfc0v7y0a2zp7xv27lgjwanm99x81ipcncrhq34", diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -21,6 +21,7 @@ lib.makeScope newScope ( inherit sources click; }; embox = callPackage ./embox {}; + gef = callPackage ./development/tools/gef {}; gimgtools = callPackage ./tools/geo/gimgtools {}; gmaptool = callPackage ./tools/geo/gmaptool {}; goldendict-dark-theme = diff --git a/pkgs/development/tools/gef/default.nix b/pkgs/development/tools/gef/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, sources, runtimeShell, procps, binutils-unwrapped, bash, python3, gdb }: + +stdenv.mkDerivation rec { + pname = "gef"; + version = stdenv.lib.substring 0 7 src.rev; + src = sources.gef; + + postPatch = '' + substituteInPlace gef.py \ + --replace "/bin/ps" "ps" \ + --replace "/bin/bash" "${bash}/bin/bash" \ + --replace "/usr/bin/python" "${python3.interpreter}" + ''; + + dontBuild = true; + doCheck = false; + + installPhase = '' + install -Dm644 gef.py -t $out/share/gef + echo "source $out/share/gef/gef.py" > $out/share/gef/init-gef + install -dm755 $out/bin + cat << EOF > $out/bin/gdb-gef + #!${runtimeShell} + export PATH="${stdenv.lib.makeBinPath [ procps binutils-unwrapped ]}:\$PATH" + ${gdb}/bin/gdb -x $out/share/gef/init-gef "\$@" + EOF + chmod +x $out/bin/gdb-gef + ''; + + meta = with stdenv.lib; { + inherit (src) description homepage; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ sikmir ]; + }; +}