Skip to content

Commit

Permalink
Add nix flake with development environment shell and direnv. (#16047)
Browse files Browse the repository at this point in the history
Use with nix-direnv, `nix-shell` or `nix develop`.
  • Loading branch information
gradientvera authored May 9, 2023
1 parent ee023b5 commit e94d36f
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,6 @@ Resources/MapImages
/Content.Docfx/*site

*.bak

# Direnv stuff
.direnv/
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -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;
};

}
31 changes: 31 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ pkgs ? import <nixpkgs> {} }:

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}
'';
}

0 comments on commit e94d36f

Please sign in to comment.