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

stapler: init at 2016-04-24 #30386

Closed
wants to merge 1 commit into from
Closed

Conversation

dotlambda
Copy link
Member

Motivation for this change

I use fetchFromGitHub instead of fetchPypi because the files needed to run the tests were not uploaded to PyPI.
Also, it doens't make sense to use the commit for a specific version, since I don't think a new version will ever be published.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

buildPythonApplication rec {
pname = "stapler";
version = "2016-04-24";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Since this is an unreleased version the name should be "${pname}-unstable-${version}".

propagatedBuildInputs = [ pypdf2 more-itertools ];

checkPhase = ''
staplelib/tests.py
Copy link
Member

Choose a reason for hiding this comment

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

Python is not in PATH here so need to do patchShebangs staplelib/tests.py before running the test script.

Copy link
Member

Choose a reason for hiding this comment

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

Actually also need to patchShebangs stapler since the test script runs the stapler command. I'd suggest to have something like

  patchPhase = ''
    patchShebangs staplelib/tests.py
    patchShebangs stapler
  '';

  checkPhase = "staplelib/tests.py";

@dotlambda
Copy link
Member Author

Closing until I have time to work on this.

@dotlambda dotlambda closed this Nov 22, 2017
@dotlambda dotlambda deleted the stapler branch January 17, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants