Package with nix

This commit is contained in:
Sven van Heugten 2026-01-10 19:07:16 +01:00
parent 1ad118c6d8
commit c5088ae218
5 changed files with 219 additions and 3 deletions

View file

@ -1,10 +1,14 @@
root = true
[*]
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.nix]
indent_size = 2
[*.{fs,fsi,fsx}]
indent_size = 4
indent_style = space
trim_trailing_whitespace=true

20
default.nix Normal file
View file

@ -0,0 +1,20 @@
{
buildDotnetModule,
dotnet-sdk_9,
dotnet-runtime_9,
}:
buildDotnetModule rec {
pname = "night-light";
version = "0.0.1";
src = ./.;
projectFile = "NightLight/NightLight.fsproj";
nugetDeps = ./deps.json;
dotnet-sdk = dotnet-sdk_9;
dotnet-runtime = dotnet-runtime_9;
executables = [ "NightLight" ];
}

112
deps.json Normal file
View file

@ -0,0 +1,112 @@
[
{
"pname": "FSharp.Data",
"version": "6.6.0",
"hash": "sha256-qKvpRXYIqIlAx2ykGUbbgBln3uA3P5Y2oNDO3VyQ9SM="
},
{
"pname": "FSharp.Data.Csv.Core",
"version": "6.6.0",
"hash": "sha256-UWC3t8LrE65A1/YlsaF5oKprdz2NtFH1pwRflth7r/g="
},
{
"pname": "FSharp.Data.Html.Core",
"version": "6.6.0",
"hash": "sha256-ngDyRmJL3sSvjjI8Tth7BX/T6/wi8doov6Tc/VQROP8="
},
{
"pname": "FSharp.Data.Http",
"version": "6.6.0",
"hash": "sha256-zq1EdGhFrueDvDexsvkOi19cS/qXOL/G4lPVFPJNdRE="
},
{
"pname": "FSharp.Data.Json.Core",
"version": "6.6.0",
"hash": "sha256-UNAjQ9+mKg66LqVWoWU8kyd3kjqn6qwB2r25YLlFVI0="
},
{
"pname": "FSharp.Data.Runtime.Utilities",
"version": "6.6.0",
"hash": "sha256-alX8B/YPyVdBEk3662RVmnVGq+ijwk48UFQonM5xZlA="
},
{
"pname": "FSharp.Data.WorldBank.Core",
"version": "6.6.0",
"hash": "sha256-MLHL5+AE+rpwkqnJIwFQqvq6px8w0z7OohIX/uJ1Li4="
},
{
"pname": "FSharp.Data.Xml.Core",
"version": "6.6.0",
"hash": "sha256-o0x00OPqMp3KnyuWgKF1Siqg0b94gO31c9MPTUMwld8="
},
{
"pname": "FsToolkit.ErrorHandling",
"version": "4.18.0",
"hash": "sha256-3XmWa7BBRJTvFqOxS1Xu55TQYUQJ2v/VyRz8OM8hvuU="
},
{
"pname": "Microsoft.Extensions.Configuration",
"version": "9.0.4",
"hash": "sha256-01yWDq/dHgU1Trx2OqVsXK/yobwVTClJXB07LrPc8lU="
},
{
"pname": "Microsoft.Extensions.Configuration.Abstractions",
"version": "9.0.4",
"hash": "sha256-5hwq73FCWAJJ8Yb1VHaaryJJhUUiVsetPTrPLlo8N9o="
},
{
"pname": "Microsoft.Extensions.Configuration.Binder",
"version": "9.0.4",
"hash": "sha256-l+qlHrdrqgvnveSMCO4qQx1QObAe5lMl80a4Kc3idzw="
},
{
"pname": "Microsoft.Extensions.DependencyInjection",
"version": "9.0.4",
"hash": "sha256-ck7PqIL/3vodYky+d7YX218n+detOoEjZeMr1EqTFPg="
},
{
"pname": "Microsoft.Extensions.DependencyInjection.Abstractions",
"version": "9.0.4",
"hash": "sha256-6WcGpsAYRhrpHloEom0oVP7Ff4Gh/O1XWJETJJ3LvEQ="
},
{
"pname": "Microsoft.Extensions.Logging",
"version": "9.0.4",
"hash": "sha256-Vj+NGOamKeuMrLNUWlVKFFkz7IKGIv6h1A5X4CK9D5E="
},
{
"pname": "Microsoft.Extensions.Logging.Abstractions",
"version": "9.0.4",
"hash": "sha256-n0ZRhQ7U/5Kv1hVqUXGoa5gfrhzcy77yFhfonjq6VFc="
},
{
"pname": "Microsoft.Extensions.Logging.Configuration",
"version": "9.0.4",
"hash": "sha256-WzinyQZzj7ty00RrCGsGxwDYJlsta74M5UP0ajGTWCE="
},
{
"pname": "Microsoft.Extensions.Logging.Console",
"version": "9.0.4",
"hash": "sha256-tofh2lKZm+FvMp0Fx9JOXltOpDSutbGLhspdAM27USQ="
},
{
"pname": "Microsoft.Extensions.Options",
"version": "9.0.4",
"hash": "sha256-QyjtRCG+L9eyH/UWHf/S+7/ZiSOmuGNoKGO9nlXmjxI="
},
{
"pname": "Microsoft.Extensions.Options.ConfigurationExtensions",
"version": "9.0.4",
"hash": "sha256-fhI6GGzVC5edaS/QEdl+2WL8/P6u/+wyq9nkLW17X64="
},
{
"pname": "Microsoft.Extensions.Primitives",
"version": "9.0.4",
"hash": "sha256-v/Ygyo1TMTUbnhdQSV2wzD4FOgAEWd1mpESo3kZ557g="
},
{
"pname": "MQTTnet",
"version": "5.0.1.1416",
"hash": "sha256-dKGeQ44rZyy7ZrgtohglxRdmD5xCqqR8v7Gtz7j/lqU="
}
]

60
flake.lock generated Normal file
View file

@ -0,0 +1,60 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1767995494,
"narHash": "sha256-2EwKigq/8Yfl0D1+BaqsF1qh40DxX+rDdDyw1razX/Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "45a1530683263666f42d1de4cdda328109d5a676",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.default = pkgs.callPackage ./default.nix { };
}
);
}