From 6a0feebf98da18c3c3148d1bb5292283ff49ceb9 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 3 May 2026 22:52:59 +0200 Subject: [PATCH 1/2] nix: extend crane src filter to keep qt_plugin_exports.txt --- nix/plugin.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nix/plugin.nix b/nix/plugin.nix index 0dd39e6..7c7eb0e 100644 --- a/nix/plugin.nix +++ b/nix/plugin.nix @@ -37,10 +37,20 @@ let # Args shared between the deps-only build (cached on Cargo.lock changes only) # and the final crate build. cxx-qt-build runs during the deps build too, so it # needs the Qt env to find qmltyperegistrar/qmlcachegen. + # Default cleanCargoSource only keeps .rs/.toml/.lock; we also need + # qt_plugin_exports.txt (linker --dynamic-list file referenced by build.rs). + pluginSrc = lib.cleanSourceWith { + src = ../plugin; + name = "nova-plugin-source"; + filter = + path: type: + (builtins.match ".*\\.txt$" path != null) || (craneLib.filterCargoSources path type); + }; + commonArgs = { pname = "nova-plugin"; version = "0.1.0"; - src = craneLib.cleanCargoSource ../plugin; + src = pluginSrc; strictDeps = true; nativeBuildInputs = [ From 3fae09b2b6baf290c6a9e4247ba8b619357846d8 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 3 May 2026 22:53:32 +0200 Subject: [PATCH 2/2] nix: scope crane src filter exception to qt_plugin_exports.txt only --- nix/plugin.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/plugin.nix b/nix/plugin.nix index 7c7eb0e..9483077 100644 --- a/nix/plugin.nix +++ b/nix/plugin.nix @@ -37,14 +37,14 @@ let # Args shared between the deps-only build (cached on Cargo.lock changes only) # and the final crate build. cxx-qt-build runs during the deps build too, so it # needs the Qt env to find qmltyperegistrar/qmlcachegen. - # Default cleanCargoSource only keeps .rs/.toml/.lock; we also need - # qt_plugin_exports.txt (linker --dynamic-list file referenced by build.rs). + # Default cleanCargoSource only keeps .rs/.toml/.lock; also keep the linker + # --dynamic-list file referenced by build.rs. pluginSrc = lib.cleanSourceWith { src = ../plugin; name = "nova-plugin-source"; filter = path: type: - (builtins.match ".*\\.txt$" path != null) || (craneLib.filterCargoSources path type); + (baseNameOf path == "qt_plugin_exports.txt") || (craneLib.filterCargoSources path type); }; commonArgs = {