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

Improve release.nix #443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,9 @@ in { dockerName ? "registry.gitlab.com/faradaysec/faraday", dockerTag ? version
# TODO: use python 3.8 after migrating to 20.09
python37Packages.callPackage "${src}/nix/packages/pynixify" { };

in original.overridePythonAttrs (drv: {
# based in https://github.com/cript0nauta/pynixify/blob/main/default.nix
checkInputs = drv.checkInputs ++ [ nix nixfmtCustom bats ];

checkPhase = ''
mypy pynixify/ tests/ acceptance_tests/
pytest tests/ -m 'not usesnix' # We can't run Nix inside Nix builds
'';

postInstall = ''
# Add nixfmt to pynixify's PATH
wrapProgram $out/bin/pynixify --prefix PATH : "${nixfmtCustom}/bin"
'';
});
in (import "${src}") {
nixfmt = nixfmtCustom;
};

nixfmtCustom =
# custom wrapper of nixfmt that sets the column width to 1. This will force
Expand Down