File: shell.nix

package info (click to toggle)
immer 0.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,800 kB
  • sloc: cpp: 39,818; python: 534; makefile: 227; lisp: 175; sh: 114; javascript: 64
file content (41 lines) | stat: -rw-r--r-- 936 bytes parent folder | download
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
{
  flake ? import ./nix/flake-compat.nix { },
  pkgs ? import flake.inputs.nixpkgs { },
  toolchain ? "",
  ...
}@args:
let
  lib = pkgs.lib;

  toolchain-stdenv = pkgs.callPackage ./nix/choose-stdenv.nix {
    inherit toolchain;
  };
  stdenv = toolchain-stdenv;

  # use Catch2 v3
  catch2_3 = pkgs.catch2_3.override {
    inherit stdenv;
  };

  immer = pkgs.callPackage ./nix/immer.nix {
    inherit catch2_3 stdenv;
    fmt = pkgs.fmt.override { inherit stdenv; };
    withTests = true;
    withExamples = true;
    withPersist = true;
    withBenchmarks = stdenv.isLinux;
    withDocs = stdenv.isLinux;
    withValgrind = stdenv.isLinux;
  };

in
pkgs.mkShell.override { stdenv = toolchain-stdenv; } {
  inputsFrom = [ immer ];
  packages = (
    with pkgs;
    [ ccache ]
    ++ lib.optionals toolchain-stdenv.cc.isClang [ lldb ]
    ++ lib.optionals toolchain-stdenv.cc.isGNU [ gdb ]
  );
  hardeningDisable = [ "fortify" ];
}