Skip to content

Commit

Permalink
Merge pull request #244 from Tom94/nix
Browse files Browse the repository at this point in the history
Add nixos configuration files for tev's build environment
  • Loading branch information
Tom94 authored Nov 27, 2024
2 parents d69b8cf + ab45a18 commit ca410f7
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
strict_env
watch_file ./*.nix
use flake
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
/x64
_CPack_Packages

# Automatically generated files by IDE
# Automatically generated files by IDE or env
/.direnv
/.vscode
/.cache

Expand Down
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.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "Nix tev dev env";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
gdb
cmake
pkg-config

xorg.libX11.dev
xorg.libXi.dev
xorg.libXrandr.dev
xorg.libXinerama.dev
xorg.libXcursor.dev
xorg.libXext.dev
xorg.libXfixes.dev
xorg.libXrender.dev

libGL
];

shellHook = ''
export CMAKE_PREFIX_PATH="${pkgs.xorg.libX11.dev}:${pkgs.xorg.libXi.dev}:${pkgs.libGL}:''${CMAKE_PREFIX_PATH:-}"
'';
};
}
);
}

0 comments on commit ca410f7

Please sign in to comment.