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

nixops: make overrides build instead of failing with 'nixops-_version_-py2-none-any.whl is not a valid wheel filename' #41472

Closed
wants to merge 1 commit into from

Conversation

teto
Copy link
Member

@teto teto commented Jun 5, 2018

Motivation for this change

I have a backlog of 3/4 PRs in my nixops repo and I got fed up with running ./dev-shell every time I wanted to use nixops. I wanted to install my fork instead but when overriding the src attribute of nixops I would end up with:
'nixops-version-py2-none-any.whl is not a valid wheel filename'.

One workaround is https://github.com/grahamc/network/blob/master/shell.nix#L14
It appears that nixops/release.nix has its own nix package. A better solution might
be to move these changes back to nixpkgs.

Things done

Make

nixops-dev = super.nixops.overrideAttrs ( src: {
    name = "nixops-dev";
    src = myCustomFork...;
  });

installable.

The changes seem to break the documentation generation but as I know nothing about this and it seemed a bit complex (plus I know the doc system changed recently), I would appreciate it someone knowledgeable in the area could provide a patch @grahamc ?

  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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.

When overriding the src attribute of nixops I would end up with:
'nixops-_version_-py2-none-any.whl is not a valid wheel filename'.

One workaround is https://github.com/grahamc/network/blob/master/shell.nix#L14
It appears that nixops/release.nix has its own nix package. A better solution might
be to move these changes back to nixpkgs.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nixops

Partial log (click to expand)

checking for references to /build in /nix/store/dwpm0vgamjxvfidw41jhvii3r3mnx2p1-nixops-1.6...
wrapping `/nix/store/dwpm0vgamjxvfidw41jhvii3r3mnx2p1-nixops-1.6/bin/.nixops-wrapped'...
running install tests
running test
.....................................
----------------------------------------------------------------------
Ran 37 tests in 0.043s

OK
/nix/store/dwpm0vgamjxvfidw41jhvii3r3mnx2p1-nixops-1.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nixops

Partial log (click to expand)

checking for references to /build in /nix/store/n9y033x3razg6iid1bcx4shl1kh8bqkd-nixops-1.6...
wrapping `/nix/store/n9y033x3razg6iid1bcx4shl1kh8bqkd-nixops-1.6/bin/.nixops-wrapped'...
running install tests
running test
.....................................
----------------------------------------------------------------------
Ran 37 tests in 1.493s

OK
/nix/store/n9y033x3razg6iid1bcx4shl1kh8bqkd-nixops-1.6

@teto teto changed the title nixops: make overrides build instead of failing with 'nixops-_version_-py2-none-any.whl is not a valid wheel filename' [wip] nixops: make overrides build instead of failing with 'nixops-_version_-py2-none-any.whl is not a valid wheel filename' Jun 13, 2018
@teto
Copy link
Member Author

teto commented Jun 14, 2018

@domenkozar the nixops doc building process is kinda confusing (I admit I quickly glaced over it), if you a patch/advice on how to improve it so that one can build everything from a nixops fork with just the nixpkgs derivation that would be cool

@teto teto changed the title [wip] nixops: make overrides build instead of failing with 'nixops-_version_-py2-none-any.whl is not a valid wheel filename' nixops: make overrides build instead of failing with 'nixops-_version_-py2-none-any.whl is not a valid wheel filename' Feb 13, 2019
@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/nixos-19-03-feature-freeze/1950/28

@domenkozar
Copy link
Member

So the real fix is substituteInPlace $i --subst-var-by version ${version} and the rest is refactoring, afaik

@teto
Copy link
Member Author

teto commented Feb 15, 2019

I alos noticed lots of duplication between nixops and nixpkgs (default.nix/shell.nix) so I had hoped for a maintainer to do both ?

@lheckemann
Copy link
Member

@GrahamcOfBorg build nixopsUnstable

@lheckemann lheckemann added this to the 19.03 milestone Feb 18, 2019
Copy link
Member

@ryantm ryantm left a comment

Choose a reason for hiding this comment

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

Please fix the merge conflict

@domenkozar
Copy link
Member

I don't think we should merge this as-is. The generic.nix used to contain common paths, I don't see how this change improve things (refactoring wise).

@teto
Copy link
Member Author

teto commented Feb 26, 2019

I close it because I don't intend to work on it anymore even though I would very much like to see the functionality.

@teto teto closed this Feb 26, 2019
@domenkozar
Copy link
Member

Something we're using:

        nixops = (import (fetchFromGitHub {
          owner = "hercules-ci";
          repo = "nixops";
          rev = "b3cac58dc22cea42c1c47b4c1f13d23cbe377e1d";
          sha256 = "0lgaiczp02p3mbqbd9wc4sxrcwaym3sbkixb85n1id5j6rpwxs4h";
          } + "/release.nix") { nixpkgs = pkgs.path; }).build.x86_64-linux;

@lheckemann lheckemann removed this from the 19.03 milestone Feb 26, 2019
@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/help-customizing-nixops-version/2718/2

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/help-customizing-nixops-version/2718/4

@teto teto deleted the nixops branch September 5, 2021 00:56
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

6 participants