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

gitAndTools.git-filter-repo: init at 2.24.0 #77418

Merged
merged 1 commit into from Feb 16, 2020

Conversation

@marsam
Copy link
Contributor

@marsam marsam commented Jan 10, 2020

Motivation for this change

Add https://github.com/newren/git-filter-repo

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.
Notify maintainers

cc @

@@ -40,6 +40,10 @@ let

git-fame = callPackage ./git-fame {};

git-filter-repo = callPackage ./git-filter-repo {
inherit (python3Packages) buildPythonApplication fetchPypi;

This comment has been minimized.

@jonringer

jonringer Jan 10, 2020
Contributor

Suggested change
inherit (python3Packages) buildPythonApplication fetchPypi;
inherit (python3Packages) buildPythonApplication fetchPypi setuptools_scm;

This comment has been minimized.

@jonringer

jonringer Jan 10, 2020
Contributor

to avoid

$ nix-build ./nixpkgs/ -A gitAndTools.git-filter-repo
these derivations will be built:
  /nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv
building '/nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv'...
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
unpacking sources
unpacking source archive /nix/store/fy14pm0cjr3qdbc84kc6ykxwcq6qi6f4-git-filter-repo-2.24.0.tar.gz
source root is git-filter-repo-2.24.0
setting SOURCE_DATE_EPOCH to timestamp 1577393070 of file git-filter-repo-2.24.0/setup.cfg
patching sources
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
WARNING: The directory '/homeless-shelter/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff7079790>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0090>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd02d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0490>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0550>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
ERROR: No matching distribution found for setuptools_scm
Traceback (most recent call last):
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpe9jr51r_', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 5, in <module>
    setup(use_scm_version=dict(root="..", relative_to=__file__))
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
    replace_conflicting=True,
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
    raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpe9jr51r_', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
builder for '/nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv' failed with exit code 1
inherit pname version;
sha256 = "f366501b64506b0a05a8d134fe19ca0f41bb62a2dbe16f9c93c9bfb3610ec44e";
};

This comment has been minimized.

@jonringer

jonringer Jan 10, 2020
Contributor

Suggested change
nativeBuildInputs = [ setuptools_scm ];
@@ -0,0 +1,22 @@
{ stdenv, fetchPypi, buildPythonApplication }:

This comment has been minimized.

@jonringer

jonringer Jan 10, 2020
Contributor

Suggested change
{ stdenv, fetchPypi, buildPythonApplication }:
{ stdenv, fetchPypi, buildPythonApplication, setuptools_scm }:
@marsam marsam force-pushed the marsam:init-gitAndTools.git-filter-repo branch from 4e76cba to d9b960f Jan 14, 2020
@marsam
Copy link
Contributor Author

@marsam marsam commented Jan 14, 2020

@jonringer thanks for reviewing; since packaging it as python package is a bit cumbersome, I opted to use wrapPython

@jonringer
Copy link
Contributor

@jonringer jonringer commented Jan 14, 2020

oh, if you did my changes it would have been fine. I was able to build and run it just fine. I would say now it's a non-standard python package :(

@marsam marsam force-pushed the marsam:init-gitAndTools.git-filter-repo branch from d9b960f to bc6c029 Jan 19, 2020
@marsam marsam mentioned this pull request Feb 14, 2020
5 of 10 tasks complete
@marsam marsam merged commit a05d11a into NixOS:master Feb 16, 2020
15 checks passed
15 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
gitAndTools.git-filter-repo on aarch64-linux Success
Details
gitAndTools.git-filter-repo on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@marsam marsam deleted the marsam:init-gitAndTools.git-filter-repo branch Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.