nixos-configs/devices/homie/modules/home-assistant/netdaemon/package.nix
matt1432 9dda3c5bd2
All checks were successful
Discord / discord commits (push) Has been skipped
feat(netd): standardize version of netdaemon in project
2024-10-10 13:11:11 -04:00

37 lines
838 B
Nix

{
lib,
buildDotnetModule,
dotnetCorePackages,
}: let
inherit (lib) any hasInfix hasSuffix removeSuffix;
srcDirs = ["apps"];
srcPatterns = [".cs" ".csproj" ".json" ".version"];
pname = "netdaemon-config";
in
buildDotnetModule {
inherit pname;
version = removeSuffix "\n" (builtins.readFile ./.version);
src = builtins.path {
name = "netdaemon-src";
path = ./.;
filter = file: type:
(type == "directory" && any (s: hasInfix s file) srcDirs)
|| any (s: hasSuffix s file) srcPatterns;
};
projectFile = "netdaemon.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
executables = [];
postFixup = ''
cp -r $out/lib/${pname} $lib
'';
outputs = ["out" "lib"];
}