{ craneLib, lib , pkg-config, wrapGAppsHook , gtk4, libadwaita, libpanel, libsoup_3, libsecret, librsvg }: let src = let suffixes = [ ]; suffixFilter = name: type: let base = baseNameOf (toString name); in type == "directory" || lib.any (ext: lib.hasSuffix ext base) suffixes; in lib.cleanSourceWith { src = ./.; # The original, unfiltered source filter = path: type: (suffixFilter path type) || (craneLib.filterCargoSources path type); name = "source"; # Be reproducible, regardless of the directory name }; args = { # pname and version are read from Cargo.toml inherit src; strictDeps = true; # cargoExtraArgs can be used to inject features buildInputs = [ gtk4 libadwaita libpanel libsoup_3 libsecret librsvg ]; nativeBuildInputs = [ pkg-config wrapGAppsHook ]; meta = with lib.meta; { maintainers = with lib.maintainers; [ vikanezrimaya ]; platforms = ["aarch64-linux" "x86_64-linux"]; mainProgram = "bowl"; }; }; cargoArtifacts = craneLib.buildDepsOnly args; args' = args // { inherit cargoArtifacts; }; in craneLib.buildPackage (args' // { passthru = { inherit cargoArtifacts; clippy = craneLib.cargoClippy args'; }; })