chore: remove sourcesWith fn, using lib.fileset
parent
61381e2ba0
commit
b36722bfe6
|
|
@ -2,17 +2,4 @@
|
||||||
types = import ./types.nix {inherit yants;};
|
types = import ./types.nix {inherit yants;};
|
||||||
in {
|
in {
|
||||||
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
||||||
|
|
||||||
sourcesWith = path: paths: let
|
|
||||||
samePath = a: let a' = builtins.toString a; in b: a' == builtins.toString b;
|
|
||||||
isRoot = samePath "/";
|
|
||||||
isInPath = path: subPath:
|
|
||||||
if isRoot subPath
|
|
||||||
then false
|
|
||||||
else (samePath path subPath) || (isInPath path (builtins.dirOf subPath));
|
|
||||||
filter = src: _type: builtins.any (includePath: isInPath includePath src) paths;
|
|
||||||
in
|
|
||||||
builtins.path {
|
|
||||||
inherit path filter;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
lib/deps.nix
13
lib/deps.nix
|
|
@ -122,16 +122,13 @@
|
||||||
vimUtils.buildVimPlugin {
|
vimUtils.buildVimPlugin {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "sloth-flake";
|
pname = "sloth-flake";
|
||||||
src = ../lua/sloth-flake;
|
src = with lib.fileset;
|
||||||
|
toSource {
|
||||||
|
root = ../.;
|
||||||
|
fileset = ../lua/sloth-flake;
|
||||||
|
};
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
dir=lua/sloth-flake
|
dir=lua/sloth-flake
|
||||||
mkdir -p $dir
|
|
||||||
mv *.lua $dir
|
|
||||||
for d in *; do
|
|
||||||
if [[ -d "$d" ]] && [[ "$d" != 'lua' ]]; then
|
|
||||||
mv "$d" $dir
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat <<'LUA' > $dir/dependencies.lua
|
cat <<'LUA' > $dir/dependencies.lua
|
||||||
${pluginsLuaDef plugins}
|
${pluginsLuaDef plugins}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue