depot/nix/pkgs/libsolv-py.nix

26 lines
531 B
Nix
Raw Normal View History

{ libsolv, python3, swig, ... }:
(libsolv.override {
withRpm = false;
}).overrideAttrs ({
cmakeFlags,
buildInputs,
nativeBuildInputs,
postPatch ? "",
... }: {
postPatch = ''
${postPatch}
sed -i 's,DESTINATION ''${PYTHON_INSTALL_DIR},DESTINATION "${placeholder "out"}/${python3.sitePackages}",g' bindings/python/CMakeLists.txt
'';
cmakeFlags = cmakeFlags ++ [
"-DENABLE_PYTHON=true"
];
nativeBuildInputs = nativeBuildInputs ++ [
swig
];
buildInputs = buildInputs ++ [
python3
];
})