summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-07-22 09:50:48 +0200
committerGaute Hope <eg@gaute.vetsj.com>2020-07-22 15:25:00 +0200
commitd219f7674b2c970e8dd1b1ab5c24a4e1f31fe722 (patch)
treeaf6b791da178c33e6b640224d430308c3b8648c2
parent8db62e573941d25f6c99e84bd7c78f3b907b804d (diff)
Add shell.nix for development environment
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--shell.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..3f696be
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,65 @@
+{ ... }:
+
+let
+ pkgs = import <nixpkgs> { };
+
+ shell-configure = pkgs.writeShellScriptBin "configure" ''
+ mkdir -p build
+ cd build
+ cmake .. "$@"
+ '';
+
+ shell-build = pkgs.writeShellScriptBin "build" ''
+ if [ ! -d "build" ]; then
+ >&2 echo "First you have to run configure."
+ exit 1
+ fi
+ cd build
+ cmake --build . --parallel $NIX_BUILD_CORES "$@"
+ '';
+
+ shell-run = pkgs.writeShellScriptBin "run" ''
+ if [ ! -f "build/astroid" ]; then
+ >&2 echo "First you have to run build."
+ exit 1
+ fi
+ build/astroid "@"
+ '';
+
+ shell-debug = pkgs.writeShellScriptBin "debug" ''
+ if [ ! -f "build/astroid" ]; then
+ >&2 echo "First you have to run build."
+ exit 1
+ fi
+ gdb --args ./build/astroid "$@"
+ '';
+
+in
+pkgs.mkShell {
+ buildInputs = with pkgs; [
+ shell-configure
+ shell-build
+ shell-run
+ shell-debug
+
+ boost
+ cmake
+ glib-networking protobuf
+ gmime3
+ gnome3.adwaita-icon-theme
+ gsettings-desktop-schemas
+ gtkmm3
+ libpeas
+ libsass
+ notmuch
+ pkgconfig
+ python3
+ python3Packages.pygobject3
+ ronn
+ webkitgtk
+ wrapGAppsHook
+ ];
+
+ LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
+}
+