Skip to content

Commit d219f76

Browse files
matthiasbeyergauteh
authored andcommitted
Add shell.nix for development environment
Signed-off-by: Matthias Beyer <[email protected]>
1 parent 8db62e5 commit d219f76

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

shell.nix

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{ ... }:
2+
3+
let
4+
pkgs = import <nixpkgs> { };
5+
6+
shell-configure = pkgs.writeShellScriptBin "configure" ''
7+
mkdir -p build
8+
cd build
9+
cmake .. "$@"
10+
'';
11+
12+
shell-build = pkgs.writeShellScriptBin "build" ''
13+
if [ ! -d "build" ]; then
14+
>&2 echo "First you have to run configure."
15+
exit 1
16+
fi
17+
cd build
18+
cmake --build . --parallel $NIX_BUILD_CORES "$@"
19+
'';
20+
21+
shell-run = pkgs.writeShellScriptBin "run" ''
22+
if [ ! -f "build/astroid" ]; then
23+
>&2 echo "First you have to run build."
24+
exit 1
25+
fi
26+
build/astroid "@"
27+
'';
28+
29+
shell-debug = pkgs.writeShellScriptBin "debug" ''
30+
if [ ! -f "build/astroid" ]; then
31+
>&2 echo "First you have to run build."
32+
exit 1
33+
fi
34+
gdb --args ./build/astroid "$@"
35+
'';
36+
37+
in
38+
pkgs.mkShell {
39+
buildInputs = with pkgs; [
40+
shell-configure
41+
shell-build
42+
shell-run
43+
shell-debug
44+
45+
boost
46+
cmake
47+
glib-networking protobuf
48+
gmime3
49+
gnome3.adwaita-icon-theme
50+
gsettings-desktop-schemas
51+
gtkmm3
52+
libpeas
53+
libsass
54+
notmuch
55+
pkgconfig
56+
python3
57+
python3Packages.pygobject3
58+
ronn
59+
webkitgtk
60+
wrapGAppsHook
61+
];
62+
63+
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
64+
}
65+

0 commit comments

Comments
 (0)