From 5c47c5824196697f6c5574ec78970b0680b8f1c0 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Thu, 14 Aug 2025 14:26:34 -0400 Subject: [PATCH] added nix flakes --- .envrc | 1 + flake.lock | 40 ++++++++++++++++++++++++++++++++++++++++ flake.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..51109f8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,40 @@ +{ + "nodes": { + "flake-schemas": { + "locked": { + "lastModified": 1721999734, + "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", + "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", + "revCount": 75, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1754937576, + "narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=", + "rev": "ddae11e58c0c345bf66efbddbf2192ed0e58f896", + "revCount": 808080, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808080%2Brev-ddae11e58c0c345bf66efbddbf2192ed0e58f896/01989f5e-b09d-7b09-9699-5d522e6f12ce/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" + } + }, + "root": { + "inputs": { + "flake-schemas": "flake-schemas", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..242470a --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.22) +{ + description = "Terraria Plugin flake"; + inputs = { + flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"; + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*"; + }; + + outputs = { self, flake-schemas, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in { + schemas = flake-schemas.schemas; + + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + curl + git + jq + wget + nixpkgs-fmt + dotnet-sdk_9 + dotnetPackages.Nuget + omnisharp-roslyn + mono + ]; + }; + + env = { + DOTNET_ROOT = "${pkgs.dotnet-sdk_9}/share/dotnet"; + DOTNET_GENERATE_ASPNET_CERTIFICATE = "false"; + DOTNET_NOLOGO = "true"; + DOTNET_CLI_TELEMETRY_OPTOUT = "false"; + }; + }); + }; +}