mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 14:21: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";
|
||||
|
||||
src = builtins.path {
|
||||
name = "ironbar";
|
||||
path = lib.cleanSource ../.;
|
||||
src = let
|
||||
fs = lib.fileset;
|
||||
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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue