about summary refs log tree commit diff
path: root/users/Profpatsch/shell.nix
blob: 499109ec37015fd48e32fe5e29f1b1ef41921843 (plain) (blame)
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
66
67
68
69
70
71
# generic shell.nix that can be used for most of my projects here,
# until I figure out a way to have composable shells.
let root = (import ../../. { }); in
{ pkgs ? root.third_party.nixpkgs, depot ? root, ... }:

pkgs.mkShell {
  buildInputs = [
    pkgs.sqlite-interactive
    pkgs.sqlite-utils
    pkgs.haskell-language-server
    pkgs.cabal-install
    (pkgs.haskellPackages.ghcWithHoogle (h: [
      h.async
      h.aeson-better-errors
      h.conduit-extra
      h.error
      h.PyF
      h.unliftio
      h.wai
      h.warp
      h.profunctors
      h.semigroupoids
      h.validation-selective
      h.free
      h.cryptonite-conduit
      h.sqlite-simple
      h.hedgehog
      h.http-conduit
      h.nonempty-containers
      h.deriving-compat
      h.unix
      h.attoparsec
      h.iCalendar
      h.case-insensitive
      h.hscolour
      h.nicify-lib
      h.hspec-expectations-pretty-diff
      depot.users.Profpatsch.my-prelude
      depot.users.Profpatsch.netencode.netencode-hs
      depot.users.Profpatsch.arglib.netencode.haskell
      depot.users.Profpatsch.execline.exec-helpers-hs

    ]))

    pkgs.rustup
    pkgs.pkg-config
    pkgs.fuse
  ];


  RUSTC_WRAPPER =
    let
      wrapperArgFile = libs: pkgs.writeText "rustc-wrapper-args"
        (pkgs.lib.concatStringsSep
          "\n"
          (pkgs.lib.concatLists
            (map
              (lib: [
                "-L"
                "${pkgs.lib.getLib lib}/lib"
              ])
              libs)));
    in
    depot.nix.writeExecline "rustc-wrapper" { readNArgs = 1; } [
      "$1"
      "$@"
      "@${wrapperArgFile [
      depot.third_party.rust-crates.nom
    ]}"
    ];
}