Skip to content

python3Packages.libdebug: init at 0.9.0#469398

Open
MrSmoer wants to merge 4 commits intoNixOS:masterfrom
MrSmoer:master
Open

python3Packages.libdebug: init at 0.9.0#469398
MrSmoer wants to merge 4 commits intoNixOS:masterfrom
MrSmoer:master

Conversation

@MrSmoer
Copy link

@MrSmoer MrSmoer commented Dec 9, 2025

Libdebug is "A Python library to debug binary executables, your own way."

It is easlily scriptable, common in the CTF-community and also very handy for crude binary-patching.
The README has a great overview:
https://github.com/libdebug/libdebug

I had to replace the pythonImportsCheckPhase, which is really not optimal, because during import it tries to create a history-log in $HOME/libdebug/.cache directory, which fails at /homeless-shelter.
I could probably provide a patch to disable this feature during building (which doesn't sound like the way patches should work); I am not really sure about that.

This is my first time opening a PR in nixpkgs, so I added myself to the maintainers-list.nix.
I am not full sure on what exactly to do with the todo list down there, so any help with that would be appreciated.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added the 12.first-time contribution This PR is the author's first one; please be gentle! label Dec 9, 2025
@MrSmoer MrSmoer force-pushed the master branch 2 times, most recently from 4656b37 to f6c9343 Compare December 10, 2025 00:42
@nixpkgs-ci nixpkgs-ci bot requested a review from natsukium December 10, 2025 00:47
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: python Python is a high-level, general-purpose programming language. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Dec 10, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a few weeks ago, back then a few test seemed fundamentally broken to me, but that was probably my fault; I will try again

Copy link
Author

@MrSmoer MrSmoer Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the issues i ran into before - outside of the nix-build environment - it tries to debug a few executeables as part of the tests and seems to be unable to open /proc/1129/maps, failing with No such file or directory.
I am not sure why this fails; whether it is because of sandboxing (probably) and whether one would like to give those privileges to build-process anyways.
I am honestly not sure on how to continue with that from this point, what do you think? @Sigmanificient

The tests will also fail in general when the builder has /proc/sys/kernel/yama/ptrace_scope set to 2 - admin-only attach or 3 - no attach

Libdebug is "A Python library to debug binary executables, your own way."
It is easlily scriptable common in the ctf-community and handy for crude binary-patching.
MrSmoer and others added 2 commits January 5, 2026 19:28
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
@nixpkgs-ci nixpkgs-ci bot added the 8.has: package (new) This PR adds a new package label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants