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

anarchism: fix src #104059

Merged
merged 1 commit into from Nov 20, 2020
Merged

anarchism: fix src #104059

merged 1 commit into from Nov 20, 2020

Conversation

RaghavSood
Copy link
Member

@RaghavSood RaghavSood commented Nov 17, 2020

Motivation for this change

#104048

The pre-escaped URL was producing:

https://salsa.debian.org/api/v4/projects/debian%2Fanarchism/repository/archive.tar.gz?sha=debian%252F15.3-1

instead of:

https://salsa.debian.org/api/v4/projects/debian%2Fanarchism/repository/archive.tar.gz?sha=debian%2F15.3-1

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.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

works. see comment change

@RaghavSood was the quoting changed? it was needed before

pkgs/data/documentation/anarchism/default.nix Outdated Show resolved Hide resolved
@RaghavSood
Copy link
Member Author

@davidak I'm not sure when the quoting change happened, but it definitely broke the existing derivation:

# original derivation
[raghav@ch-misc:~/nixpkgs/nixpkgs]$ nix-build -A anarchism.src --check
these paths will be fetched (4.96 MiB download, 23.03 MiB unpacked):
  /nix/store/b2ysy661mghxln49a9w4xa9dmsavc8xl-source
copying path '/nix/store/b2ysy661mghxln49a9w4xa9dmsavc8xl-source' from 'https://cache.nixos.org'...
checking outputs of '/nix/store/fmmgnpdma2lh07hqak36hzkxp5hi5qvl-source.drv'...

trying https://salsa.debian.org/api/v4/projects/debian%2Fanarchism/repository/archive.tar.gz?sha=debian%252F15.3-1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
error: cannot download source from any mirror
builder for '/nix/store/fmmgnpdma2lh07hqak36hzkxp5hi5qvl-source.drv' failed with exit code 1
error: build of '/nix/store/fmmgnpdma2lh07hqak36hzkxp5hi5qvl-source.drv' failed

# after fix
[raghav@ch-misc:~/nixpkgs/nixpkgs]$ nix-build -A anarchism.src --check
checking outputs of '/nix/store/dvkr5q231l30dr2s08rbi89wc0nqy6y5-source.drv'...

trying https://salsa.debian.org/api/v4/projects/debian%2Fanarchism/repository/archive.tar.gz?sha=debian%2F15.3-1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7974k    0 7974k    0     0  2816k      0 --:--:--  0:00:02 --:--:-- 2817k
unpacking source archive /build/archive.tar.gz?sha=debian%2F15.3-1
/nix/store/b2ysy661mghxln49a9w4xa9dmsavc8xl-source

I'm currently trying to check the src for the entire tree, so might find other similar cases - will make PRs as I find them

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

thanks

@ofborg ofborg bot requested a review from davidak November 17, 2020 17:18
This was referenced Nov 18, 2020
@stigtsp stigtsp merged commit 6e6bd19 into NixOS:master Nov 20, 2020
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