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 does not work with Nix 2.0 #873

Closed
1 task
Baughn opened this issue Feb 23, 2018 · 9 comments
Closed
1 task

NixOps does not work with Nix 2.0 #873

Baughn opened this issue Feb 23, 2018 · 9 comments

Comments

@Baughn
Copy link

Baughn commented Feb 23, 2018

Let's round up assorted bugs here. Only one I've spotted so far, but I'll probably find more.

  • attribute ‘nixosVersion’ missing, at nix/eval-machine-info.nix:284
    These attributes have been renamed to nixos.version and so forth.
@Baughn
Copy link
Author

Baughn commented Feb 23, 2018

...hmm. On second thought, I'm not sure the one bug I found so far is a Nix 2.0 bug per se. The timing is suspicious, but it might be coincidence.

@aborsu
Copy link

aborsu commented Feb 24, 2018

I'm stuck with the same problem

@seppeljordan
Copy link

I duck-taped the issue with the following override in my personal overlay:

  nixops = super.nixops.overrideDerivation (
    old: {
      patchPhase = ''
        substituteInPlace nix/eval-machine-info.nix \
            --replace 'system.nixosVersion' 'system.nixos.version'
      '';
    }
  );

@jpotier
Copy link

jpotier commented Feb 25, 2018

Stuck with the same problem. (@seppeljordan the patch helped, thanks)

@teto
Copy link
Member

teto commented Feb 27, 2018

a patch was pushed to master yesterday.

infinisil added a commit to infinisil/system that referenced this issue Feb 27, 2018
@alanz
Copy link

alanz commented Feb 28, 2018

I'm a newbie at this, I have ~/.config/nixpkgs/overlays/nixops.nix containing

self: super: {
  nixops = super.nixops.overrideDerivation (
    old: {
      patchPhase = ''
        substituteInPlace nix/eval-machine-info.nix \
            --replace 'system.nixosVersion' 'system.nixos.version'
      '';
    }
  );
}

Using nixpkgs https://nixos.org/channels/nixpkgs-unstable on Debian.

I presume I have something basic wrong in either the file location or contents. Any tips?

@jpotier
Copy link

jpotier commented Feb 28, 2018 via email

@alanz
Copy link

alanz commented Feb 28, 2018

@jpotier thanks, it does actually work, I had been switching channels and not properly updated, when I ran nix-shell -p nixops it brought in the current version again, and the overlay works as expected. Thanks.

@jpotier
Copy link

jpotier commented Mar 1, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants