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

Impossible to override libxml2 and libxslt with pythonSupport = false #73102

Closed
veprbl opened this issue Nov 9, 2019 · 5 comments · Fixed by #83737
Closed

Impossible to override libxml2 and libxslt with pythonSupport = false #73102

veprbl opened this issue Nov 9, 2019 · 5 comments · Fixed by #83737

Comments

@veprbl
Copy link
Member

veprbl commented Nov 9, 2019

Describe the bug
It appears that there is no simple way to override libxml2 and libxslt with pythonSupport = false

To Reproduce

with import <nixpkgs> {
  overlays = [
    (self: super: {
      libxslt = super.libxslt.override { pythonSupport = false; };
      libxml2 = super.libxml2.override { pythonSupport = false; };
    })
  ];
};

libxslt
# nix-instantiate test.nix --show-trace
error: while evaluating the attribute 'libxslt.override' at nixpkgs/pkgs/top-level/all-packages.nix:12864:3:
while evaluating 'callPackageWith' at nixpkgs/lib/customisation.nix:117:35, called from /home/veprbl/nixpkgs/pkgs/top-level/all-packages.nix:12864:13:
while evaluating 'makeOverridable' at nixpkgs/lib/customisation.nix:67:24, called from /home/veprbl/nixpkgs/lib/customisation.nix:121:8:
while evaluating anonymous function at nixpkgs/pkgs/development/libraries/libxslt/default.nix:1:1, called from /home/veprbl/nixpkgs/lib/customisation.nix:69:16:
assertion failed at nixpkgs/pkgs/development/libraries/libxslt/default.nix:7:1

Expected behavior
Straightforward override should work

Metadata

  • version: nix-env (Nix) 2.3
  • channels(veprbl): "nixpkgs-20.03pre194957.bef773ed53f"

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - libxml2
  - libxslt
# a list of nixos modules affected by the problem
module:
@FRidh FRidh added the 0.kind: regression Something that worked before working no longer label Nov 9, 2019
@FRidh
Copy link
Member

FRidh commented Nov 9, 2019

For some reason

libxslt = super.libxslt.override { pythonSupport = false; };

does not seem to function. Pass in a string e.g., and see what happens. I am puzzled by this.

@FRidh FRidh removed the 0.kind: regression Something that worked before working no longer label Nov 9, 2019
@veprbl
Copy link
Member Author

veprbl commented Nov 9, 2019

@FRidh
Well we get an assertion when evaluating libxslt before we can access .override. And it seems like the problem was there from the beginning:

with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/be31980848dee782c4504b88c57edcfbb72c6f6b.tar.gz") {
  config = {
    packageOverrides = pkgs: {
      libxslt = pkgs.libxslt.override { pythonSupport = false; };
      libxml2 = pkgs.libxml2.override { supportPython = false; };
    };
  };
};

libxslt

Maybe we should just remove the assertion?

@FRidh
Copy link
Member

FRidh commented Nov 10, 2019

Right, so this is #53487.

@jtojnar
Copy link
Contributor

jtojnar commented Nov 11, 2019

Could we default to pythonSupport = false as before, and only enable it in pythonPackages?

@FRidh
Copy link
Member

FRidh commented Nov 11, 2019

@jtojnar do you have any specific reason to disable it by default? Often we enable options and split into multiple outputs to reduce the amount of building that is needed.

veprbl added a commit to veprbl/nixpkgs that referenced this issue Jan 28, 2021
veprbl added a commit to veprbl/nixpkgs that referenced this issue Jan 28, 2021
veprbl added a commit to veprbl/nixpkgs that referenced this issue Jan 28, 2021
rnhmjoj added a commit to rnhmjoj/nixpkgs that referenced this issue Mar 1, 2021
Assertions can break overriding a package, see issue NixOS#73102.
aforemny pushed a commit to aforemny/nixpkgs that referenced this issue Mar 4, 2021
aforemny pushed a commit to aforemny/nixpkgs that referenced this issue Mar 4, 2021
aforemny pushed a commit to aforemny/nixpkgs that referenced this issue Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants