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

ydiff,gitAndTools.ydiff: unify #109353

Merged
merged 1 commit into from Jan 14, 2021
Merged

ydiff,gitAndTools.ydiff: unify #109353

merged 1 commit into from Jan 14, 2021

Conversation

alyssais
Copy link
Member

Motivation for this change

We were packaging ydiff twice!

In this patch, I've merged the two expressions into one, trying to
take the best of each. ydiff (top-level) didn't support being used as
a Python library, which is required by one other package (patroni), so
I chose gitAndTools.ydiff as the starting point, then moved in the
longDescription from the top-level one, as well as the code used to
run the tests.

While I was there, I fixed the tests, which were intended to be run by
the top-level ydiff but actually were not, because unlike mkDerivation
buildPythonApplication will not run `make test' by default.

Also, top-level ydiff previously propagated less and patchutils,
meaning they'd have been installed globally instead of just referenced
by ydiff. gitAndTools.ydiff just did nothing. Both also expected to
find git, hg, and svn in the environment, which was impure. So now
all these programs are referenced by store path from ydiff, for
purity.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

We were packaging ydiff twice!

In this patch, I've merged the two expressions into one, trying to
take the best of each.  ydiff (top-level) didn't support being used as
a Python library, which is required by one other package (patroni), so
I chose gitAndTools.ydiff as the starting point, then moved in the
longDescription from the top-level one, as well as the code used to
run the tests.

While I was there, I fixed the tests, which were intended to be run by
the top-level ydiff but actually were not, because unlike mkDerivation
buildPythonApplication will not run `make test' by default.

Also, top-level ydiff previously propagated less and patchutils,
meaning they'd have been installed globally instead of just referenced
by ydiff.  gitAndTools.ydiff just did nothing.  Both also expected to
find git, hg, and svn in the environment, which was impure.  So now
all these programs are referenced by store path from ydiff, for
purity.
@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109353 run on x86_64-linux 1

1 package failed to build and are new build failure:
3 packages built:
  • ydiff (gitAndTools.ydiff)
  • python37Packages.ydiff
  • python39Packages.ydiff

@SuperSandro2000 SuperSandro2000 merged commit 97259d0 into NixOS:master Jan 14, 2021
@alyssais alyssais deleted the ydiff branch April 9, 2021 20:51
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

2 participants