summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-06-12 04:37:49 -0400
committerLLLL Colonq <llll@colonq>2026-06-12 04:37:49 -0400
commita4490d11b29a046fcd290f5e4919cf50181fb576 (patch)
tree168159557fa3cd83ff739c5753edf036a55e99c6 /flake.nix
parent4851758f8a1b8fdf099db28f4f6756c1f5e757b6 (diff)
Relax source filter
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix56
1 files changed, 16 insertions, 40 deletions
diff --git a/flake.nix b/flake.nix
index 921856f..43ecd44 100644
--- a/flake.nix
+++ b/flake.nix
@@ -47,6 +47,18 @@
LIBCOLONQ_PIT_WASM="${inputs.pit.packages.x86_64-linux.wasm}/lib";
LIBCOLONQ_PIT_WINDOWS="${inputs.pit.packages.x86_64-linux.windows}/lib";
+ cleanSource = path: lib.cleanSourceWith {
+ src = path;
+ filter = path: type:
+ true
+ # (lib.hasSuffix "\.html" path) ||
+ # (lib.hasSuffix "\.js" path) ||
+ # (lib.hasSuffix "\.css" path) ||
+ # (lib.hasInfix "/assets/" path) ||
+ # (craneLib.filterCargoSources path type)
+ ;
+ };
+
native = rec {
nativeBuildInputs = [
pkgs.pkg-config
@@ -66,16 +78,7 @@
];
deps = path: nm:
let
- src = lib.cleanSourceWith {
- src = path;
- filter = path: type:
- (lib.hasSuffix "\.html" path) ||
- (lib.hasSuffix "\.js" path) ||
- (lib.hasSuffix "\.css" path) ||
- (lib.hasInfix "/assets/" path) ||
- (craneLib.filterCargoSources path type)
- ;
- };
+ src = cleanSource path;
commonArgs = {
inherit src nativeBuildInputs buildInputs;
inherit LIBCOLONQ_PIT_NATIVE;
@@ -91,16 +94,7 @@
cargoArtifacts;
build = path: nm:
let
- src = lib.cleanSourceWith {
- src = path;
- filter = path: type:
- (lib.hasSuffix "\.html" path) ||
- (lib.hasSuffix "\.js" path) ||
- (lib.hasSuffix "\.css" path) ||
- (lib.hasInfix "/assets/" path) ||
- (craneLib.filterCargoSources path type)
- ;
- };
+ src = cleanSource path;
commonArgs = {
inherit src nativeBuildInputs buildInputs;
inherit LIBCOLONQ_PIT_NATIVE;
@@ -124,16 +118,7 @@
wasm = rec {
buildAtUrlInDir = path: nm: url: dir:
let
- src = lib.cleanSourceWith {
- src = path;
- filter = path: type:
- (lib.hasSuffix "\.html" path) ||
- (lib.hasSuffix "\.js" path) ||
- (lib.hasSuffix "\.css" path) ||
- (lib.hasInfix "/assets/" path) ||
- (craneLib.filterCargoSources path type)
- ;
- };
+ src = cleanSource path;
commonArgs = {
inherit src;
inherit LIBCOLONQ_PIT_WASM;
@@ -191,16 +176,7 @@
};
build = path: nm:
let
- src = lib.cleanSourceWith {
- src = path;
- filter = path: type:
- (lib.hasSuffix "\.html" path) ||
- (lib.hasSuffix "\.js" path) ||
- (lib.hasSuffix "\.css" path) ||
- (lib.hasInfix "/assets/" path) ||
- (craneLib.filterCargoSources path type)
- ;
- };
+ src = cleanSource path;
commonArgs = {
inherit src;
strictDeps = true;