summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/li/libxml2Python/package.nix
blob: 9938a037670778e18da8e4e77fccb576c93c0dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  buildEnv,
  libxml2,
  python3,
}:
let
  pythonLibxml2 = python3.pkgs.libxml2;
in
buildEnv {
  # slightly hacky
  name = "libxml2+py-${libxml2.version}";
  paths = with pythonLibxml2; [
    dev
    bin
    py
  ];
  # Avoid update.nix/tests conflicts with libxml2.
  passthru = removeAttrs pythonLibxml2.passthru [
    "updateScript"
    "tests"
  ];
  # the hook to find catalogs is hidden by buildEnv
  postBuild = ''
    mkdir "$out/nix-support"
    cp '${pythonLibxml2.dev}/nix-support/propagated-build-inputs' "$out/nix-support/"
  '';
}