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

View file

@ -1,22 +1,36 @@
{ {
buildDotnetModule, buildDotnetModule,
dotnetCorePackages, dotnetCorePackages,
}: }: let
buildDotnetModule {
pname = "netdaemon-config"; pname = "netdaemon-config";
version = "0.0.0"; in
buildDotnetModule {
inherit pname;
version = "0.0.0";
src = src =
builtins.filterSource builtins.filterSource
(file: type: (file: type:
(type != "directory") (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"; projectFile = "netdaemon.csproj";
nugetDeps = ./deps.nix; nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_8_0; dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0; dotnet-runtime = dotnetCorePackages.runtime_8_0;
executables = []; executables = [];
}
postFixup = ''
cp -r $out/lib/${pname} $lib
'';
outputs = ["out" "lib"];
}