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

replacement of openssl with libressl with a overlay results in evaluation failures #56994

Open
qolii opened this issue Mar 6, 2019 · 12 comments
Assignees
Labels
0.kind: regression Something that worked before working no longer

Comments

@qolii
Copy link
Contributor

qolii commented Mar 6, 2019

Issue description

Something changed recently, breaking the libressl derivation.

Steps to reproduce

I globally override openssl with libressl using

packageOverrides = pkgs: rec {
  openssl = pkgs.libressl_2_8.override { fetchurl = pkgs.stdenv.fetchurlBoot; };
};

This usually works, but something must have changed, because I now see the error:

error: anonymous function at /nix/nixpkgs/pkgs/development/libraries/libressl/default.nix:1:1 called with unexpected argument 'buildPackages', at /nix/nixpkgs/lib/customisation.nix:124:63
(use '--show-trace' to show detailed location information)

Naively adding buildPackages to the libressl derivation's arguments set then yields:

error: anonymous function at /nix/nixpkgs/pkgs/development/libraries/libressl/default.nix:1:1 called with unexpected argument 'perl', at /nix/nixpkgs/lib/customisation.nix:124:63
(use '--show-trace' to show detailed location information)
building the system configuration...

And finally, adding perl makes everything build correctly.

I'm happy to submit a PR with this fix (or one just adding ... instead of these named inputs), but it doesn't seem very neat to do that. Is there a better way?

@qolii
Copy link
Contributor Author

qolii commented Mar 6, 2019

As maintainers: @thoughtpolice, @fpletz, @globin

@vcunat vcunat changed the title libressl build issue libressl evaluation issue Mar 6, 2019
@infinisil
Copy link
Member

Caused by this

openssl = buildPackages.openssl.override {
fetchurl = stdenv.fetchurlBoot;
inherit perl;
buildPackages = { inherit perl; };

which is done since a1fec86, #56067, ping @oxij

I'm not sure if there's a nice to way solve this

@oxij
Copy link
Member

oxij commented Mar 6, 2019 via email

@qolii
Copy link
Contributor Author

qolii commented Mar 7, 2019

@oxij, while I am super intrigued by your proposal in #56227 (and to quote your own self, If stuff like this isn't cool, then I don't know what is!), would adding an ellipsis to libressl's args list be completely unacceptable? That fix is nice and tiny. And AFAICT, this problem is quite specific to the way you have configured fetchurl in all-packages.nix. Or is this a pattern?

Alternatively, in the same way that using a global libressl override, at least until #56067, had a "surprise" extra requirement that you apply it like:

openssl = pkgs.libressl_2_8.override { fetchurl = pkgs.stdenv.fetchurlBoot; };

could we simply note that to make this work, you need to also add an additional override to fetchurl itself to "put back" your changes from #56067 (I think this would be possible, right? Although a little fiddly).

Then, when a real solution comes along, we could adopt it.

@oxij
Copy link
Member

oxij commented Mar 7, 2019 via email

@qolii
Copy link
Contributor Author

qolii commented Mar 7, 2019

Quickly finding through nixpkgs, I see we also have wolfssl and boringssl. I don't know if those are meant to be global replacements for OpenSSL the same way LibresSSL is, but if so, would we need to special-case both of them too?

Although, since it hasn't come up yet, maybe nobody needs this at the moment and we can wait for a more comprehensive solution.

dtzWill added a commit to dtzWill/nixpkgs that referenced this issue Mar 7, 2019
@matthewbauer matthewbauer added the 0.kind: regression Something that worked before working no longer label Jun 3, 2019
@matthewbauer matthewbauer added this to the 19.09 milestone Jun 3, 2019
@matthewbauer matthewbauer modified the milestones: 19.09, 20.03 Aug 16, 2019
@matthewbauer matthewbauer self-assigned this Aug 16, 2019
@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 10, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 8, 2020
@matthewbauer
Copy link
Member

Still important

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 17, 2020
@FRidh FRidh modified the milestones: 20.09, 21.03 Dec 20, 2020
@bqv
Copy link
Contributor

bqv commented Feb 23, 2021

Still important

@stale
Copy link

stale bot commented Aug 22, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 22, 2021
@maybebyte
Copy link

Still important.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2022
@Artturin Artturin modified the milestones: 21.05, 23.05 Dec 31, 2022
@Artturin Artturin removed this from the 23.05 milestone Jan 9, 2023
@Artturin Artturin changed the title libressl evaluation issue replacement of openssl with libressl with a overlay results in evaluation failures Jan 9, 2023
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-can-i-override-openssl/47367/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer
Projects
None yet
Development

No branches or pull requests

10 participants