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