forked from OpenTabletDriver/OpenTabletDriver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
35 lines (28 loc) · 789 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ flake ? builtins.getFlake "path:${toString ./.}"
, system ? "x86_64-linux"
}:
let
inherit (pkgs.lib) escapeShellArg makeLibraryPath;
inherit (flake.packages.${system}) opentabletdriver;
pkgs = flake.nixpkgsFor.${system};
in pkgs.mkShell {
inputsFrom = [ opentabletdriver ];
buildInputs = with pkgs; [
# shellHook deps
git
# dev
gnused
gnugrep
nixFlakes
jq
];
hardeningDisable = [ "all" ];
shellHook = ''
export LD_LIBRARY_PATH="${escapeShellArg (makeLibraryPath opentabletdriver.buildInputs)}"
export REPO_ROOT="$(git rev-parse --show-toplevel)"
if [ -d $REPO_ROOT ]; then
export OTD_CONFIGURATIONS="$REPO_ROOT/OpenTabletDriver.Configurations/Configurations"
export OTD_APPDATA="$REPO_ROOT/.data"
fi
'';
}