summaryrefslogtreecommitdiffstats
path: root/shell.nix
blob: 3f696be99a16ee092ac7e2bcdc9a5e447fbcacef (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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";
}