Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.pefile: init at 2019.4.18 #68424

Merged
merged 1 commit into from Nov 14, 2019
Merged

Conversation

Pamplemousse
Copy link
Member

Motivation for this change

I am trying to make angr, the binary analysis framework, available on NixOS.
This is part of the modules it requires.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Pamplemousse
Copy link
Member Author

Tests are not present in the tarball fetched from PyPI.
However, when pulling from GitHub, some target binaries are not available: see pefile/issues#82 .

According to another comment on pefile/issues#171, there exists a repo, with binaries availables, and a battery of tests for pefile: viper-framework/pefile-tests .

I briefly tried using fetchFromGitHub to get the content to use in checkPhase, without much success.
Any guidance in how we could make use of this other repo to test this package?

Thanks!

Copy link
Contributor

@kira-bruneau kira-bruneau left a comment

Choose a reason for hiding this comment

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

The test data is encrypted so there is no way to extract it (see https://github.com/erocarrera/pefile/blob/master/.travis.yml).

This looks good too me. Thanks @Pamplemousse!

Copy link
Contributor

@kira-bruneau kira-bruneau left a comment

Choose a reason for hiding this comment

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

It might also be good to document why the tests don't work and verify that pefile can still be imported.

pkgs/development/python-modules/pefile/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
commits LGTM
repo doesn't look the most active, but it's a popular package

[5 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/68424
3 package were build:
python27Packages.pefile python37Packages.pefile python38Packages.pefile

@jonringer
Copy link
Contributor

@GrahamcOfBorg build python27Packages.pefile python37Packages.pefile python38Packages.pefile

@jonringer jonringer merged commit f224751 into NixOS:master Nov 14, 2019
@Pamplemousse Pamplemousse deleted the pefile branch November 14, 2019 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants