mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 22:31:03 +02:00
feat(nix): use lib.fileset
for src
- Filters out more unnecessary files (like `nix` ones)
This commit is contained in:
parent
d97d07e98e
commit
89073dc0cf
1 changed files with 19 additions and 3 deletions
|
@ -37,9 +37,25 @@
|
||||||
|
|
||||||
pname = "ironbar";
|
pname = "ironbar";
|
||||||
|
|
||||||
src = builtins.path {
|
src = let
|
||||||
name = "ironbar";
|
fs = lib.fileset;
|
||||||
path = lib.cleanSource ../.;
|
root = ../.;
|
||||||
|
nixRelated = fs.fileFilter (file: file.hasExt "nix" || file.name == "flake.lock") root;
|
||||||
|
cicdRelated = fs.unions [
|
||||||
|
(lib.path.append root "Dockerfile")
|
||||||
|
(lib.path.append root ".github")
|
||||||
|
];
|
||||||
|
ideRelated = fs.unions [
|
||||||
|
(lib.path.append root ".idea")
|
||||||
|
];
|
||||||
|
in fs.toSource {
|
||||||
|
inherit root;
|
||||||
|
# NOTE: can possibly filter out more
|
||||||
|
fileset = fs.difference root (fs.unions [
|
||||||
|
nixRelated
|
||||||
|
cicdRelated
|
||||||
|
ideRelated
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue