diff --git a/csharp/.envrc b/csharp/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/csharp/.envrc @@ -0,0 +1 @@ +use flake diff --git a/csharp/.gitignore b/csharp/.gitignore new file mode 100644 index 0000000..8165f17 --- /dev/null +++ b/csharp/.gitignore @@ -0,0 +1,8 @@ +.direnv +*/bin/ +*/obj/ +out +result +data +.idea +*.duckdb diff --git a/csharp/README.md b/csharp/README.md new file mode 100644 index 0000000..f58d07e --- /dev/null +++ b/csharp/README.md @@ -0,0 +1,8 @@ +# Bazooka-poof + +### Ideas + +* https://observablehq.com/@d3/us-airports-voronoi +* https://d3js.org/d3-delaunay/voronoi + + diff --git a/csharp/flake.lock b/csharp/flake.lock new file mode 100644 index 0000000..6792ef4 --- /dev/null +++ b/csharp/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1766653575, + "narHash": "sha256-TPgxCS7+hWc4kPhzkU5dD2M5UuPhLuuaMNZ/IpwKQvI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3c1016e6acd16ad96053116d0d3043029c9e2649", + "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 +} diff --git a/csharp/flake.nix b/csharp/flake.nix new file mode 100644 index 0000000..532f79b --- /dev/null +++ b/csharp/flake.nix @@ -0,0 +1,38 @@ +{ + description = "Pre-built CPU-only OpenCV packages for Python. "; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + system = system; + config.allowUnfree = true; + }; + + # to generate the deps.nix, first + # run `dotnet restore --packages out` which + # will put all the dependencies in the "out" directory. + # Second, run `nuget-to-nix out > deps.nix` to generate the + # deps.nix + project = pkgs.buildDotnetModule { + pname = "BazoukaPouf"; + version = "0.1.0"; + src = ./.; + nugetDeps = ./deps.nix; + projectFile = "BazoukaPouf/BazoukaPouf.csproj"; + dotnetBuildFlags = [ "--no-self-contained" ]; + dotnet-sdk = pkgs.dotnetCorePackages.sdk_10_0; + dotnet-runtime = pkgs.dotnetCorePackages.aspnetcore_10_0; + }; + + in { + packages = { project = project; }; + devShells.default = pkgs.mkShell { + buildInputs = [ pkgs.dotnet-sdk_10 pkgs.nuget-to-json ]; + }; + }); +}