Add nix flake with development environment shell and direnv. (#16047)
Use with nix-direnv, `nix-shell` or `nix develop`.
This commit is contained in:
committed by
GitHub
parent
ee023b567a
commit
e94d36f51a
3
.gitignore
vendored
3
.gitignore
vendored
@@ -302,3 +302,6 @@ Resources/MapImages
|
|||||||
/Content.Docfx/*site
|
/Content.Docfx/*site
|
||||||
|
|
||||||
*.bak
|
*.bak
|
||||||
|
|
||||||
|
# Direnv stuff
|
||||||
|
.direnv/
|
||||||
|
|||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -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
|
||||||
|
}
|
||||||
13
flake.nix
Normal file
13
flake.nix
Normal file
@@ -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
shell.nix
Normal file
31
shell.nix
Normal file
@@ -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}
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user