diff --git a/.envrc b/.envrc new file mode 100644 index 0000000000..3550a30f2d --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 97a5911fdb..42c93e1fc3 100644 --- a/.gitignore +++ b/.gitignore @@ -302,3 +302,6 @@ Resources/MapImages /Content.Docfx/*site *.bak + +# Direnv stuff +.direnv/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000..12bc679600 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1683293859, + "narHash": "sha256-4BTV7T76XwAfnHJ0z6hR0tk2LFxoXf40JfKzmMb2xfY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ef47d4daa93372ae33c0b249d392e90408e06b96", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-22.11", + "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/flake.nix b/flake.nix new file mode 100644 index 0000000000..2f0e7b9901 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-22.11"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.simpleFlake { + inherit self nixpkgs; + name = "space-station-14-devshell"; + shell = ./shell.nix; + }; + +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000000..8879b0c791 --- /dev/null +++ b/shell.nix @@ -0,0 +1,31 @@ +{ pkgs ? import {} }: + +let + dependencies = with pkgs; [ + dotnetCorePackages.sdk_7_0 + glfw + SDL2 + libGL + openal + freetype + fluidsynth + soundfont-fluid + gtk3 + pango + cairo + atk + zlib + glib + gdk-pixbuf + ]; +in pkgs.mkShell { + name = "space-station-14-devshell"; + buildInputs = [ pkgs.gtk3 ]; + inputsFrom = dependencies; + shellHook = '' + export GLIBC_TUNABLES=glibc.rtld.dynamic_sort=1 + export ROBUST_SOUNDFONT_OVERRIDE=${pkgs.soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 + export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH + export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath dependencies} + ''; +}