refactor(netd): clean up package
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-10-05 17:04:57 -04:00
parent 2220fccf7a
commit 7855e8ecdd
2 changed files with 31 additions and 17 deletions

View file

@ -25,7 +25,7 @@ in {
TZ = "America/New_York";
};
volumes = ["${compiled}/lib/netdaemon-config:/data"];
volumes = ["${compiled.lib}:/data"];
networks = ["netdaemon"];
};
};
@ -68,7 +68,7 @@ in {
done
done
${compiled.passthru.fetch-deps} .
${compiled.fetch-deps} .
alejandra .
rm -r "$FLAKE/.config"
'';

View file

@ -1,16 +1,24 @@
{
buildDotnetModule,
dotnetCorePackages,
}:
buildDotnetModule {
}: let
pname = "netdaemon-config";
in
buildDotnetModule {
inherit pname;
version = "0.0.0";
src =
builtins.filterSource
(file: type:
(type != "directory")
|| (baseNameOf file != "default.nix" && baseNameOf file != "package.nix"))
|| (builtins.all (f: baseNameOf file != f) [
".envrc"
"deps.nix"
"default.nix"
"netdaemon.nix"
"package.nix"
]))
./.;
projectFile = "netdaemon.csproj";
@ -19,4 +27,10 @@ buildDotnetModule {
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
executables = [];
}
postFixup = ''
cp -r $out/lib/${pname} $lib
'';
outputs = ["out" "lib"];
}