qsv: enable all features

This commit is contained in:
misuzu
2025-10-16 19:48:04 +03:00
parent daebeba791
commit cfc1b4de70
+29 -20
View File
@@ -1,4 +1,5 @@
{
stdenv,
fetchFromGitHub,
file,
lib,
@@ -7,6 +8,27 @@
sqlite,
zstd,
cmake,
python3,
wayland,
withPolars ? true,
withPython ? stdenv.buildPlatform == stdenv.hostPlatform,
withUi ? true,
buildFeatures ?
# enable all features except self_update by default
# https://github.com/dathere/qsv/blob/7.1.0/Cargo.toml#L370
[
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
"luau"
"to"
]
++ lib.optional withPolars "polars"
++ lib.optional withPython "python"
++ lib.optional withUi "ui",
mainProgram ? "qsv",
}:
let
@@ -14,7 +36,7 @@ let
version = "7.1.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
inherit pname version buildFeatures;
src = fetchFromGitHub {
owner = "dathere";
@@ -29,30 +51,15 @@ rustPlatform.buildRustPackage {
file
sqlite
zstd
];
]
++ lib.optional (lib.elem "ui" buildFeatures && stdenv.hostPlatform.isLinux) wayland;
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
cmake
];
buildFeatures = [
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
"to"
];
checkFeatures = [
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
];
]
++ lib.optional (lib.elem "python" buildFeatures) python3;
doCheck = false;
@@ -69,8 +76,10 @@ rustPlatform.buildRustPackage {
# or
unlicense
];
inherit mainProgram;
maintainers = with lib.maintainers; [
detroyejr
misuzu
];
};
}