python310Packages.onlykey-solo-python: fix compatibility with fido2 1.1.3 (#354382)
[NixPkgs.git] / pkgs / applications / editors / jupyter-kernels / xeus-cling / xeus-cling.nix
blobb944569ff4a7bdfeb3253c71dab96d989da31ee8
1 { lib
2 , clangStdenv
3 , cmake
4 , fetchFromGitHub
5 , llvmPackages_13
6 # Libraries
7 , argparse
8 , cling
9 , cppzmq
10 , libuuid
11 , ncurses
12 , openssl
13 , pugixml
14 , xeus
15 , xeus-zmq
16 , xtl
17 , zeromq
18 , zlib
19 # Settings
20 , debug ? false
23 let
24   # Nixpkgs moved to argparse 3.x, but we need ~2.9
25   argparse_2_9 = argparse.overrideAttrs (oldAttrs: {
26     version = "2.9";
28     src = fetchFromGitHub {
29       owner = "p-ranav";
30       repo = "argparse";
31       rev = "v2.9";
32       sha256 = "sha256-vbf4kePi5gfg9ub4aP1cCK1jtiA65bUS9+5Ghgvxt/E=";
33     };
34   });
38 clangStdenv.mkDerivation rec {
39   pname = "xeus-cling";
40   version = "0.15.3";
42   src = fetchFromGitHub {
43     owner = "QuantStack";
44     repo = "xeus-cling";
45     rev = "${version}";
46     hash = "sha256-OfZU+z+p3/a36GntusBfwfFu3ssJW4Fu7SV3SMCoo1I=";
47   };
49   patches = [
50     ./0001-Fix-bug-in-extract_filename.patch
51     ./0002-Don-t-pass-extra-includes-configure-this-with-flags.patch
52   ];
54   nativeBuildInputs = [ cmake ];
55   buildInputs = [
56     argparse_2_9
57     cling.unwrapped
58     cppzmq
59     libuuid
60     llvmPackages_13.llvm
61     ncurses
62     openssl
63     pugixml
64     xeus
65     xeus-zmq
66     xtl
67     zeromq
68     zlib
69   ];
71   cmakeBuildType = if debug then "Debug" else "Release";
73   postPatch = ''
74     substituteInPlace src/xmagics/executable.cpp \
75       --replace "getDataLayout" "getDataLayoutString"
76     substituteInPlace src/xmagics/execution.cpp \
77       --replace "simplisticCastAs" "castAs"
78     substituteInPlace src/xmime_internal.hpp \
79       --replace "code.str()" "code.str().str()"
80   '';
82   dontStrip = debug;
84   meta = {
85     description = "Jupyter kernel for the C++ programming language";
86     mainProgram = "xcpp";
87     homepage = "https://github.com/jupyter-xeus/xeus-cling";
88     maintainers = with lib.maintainers; [ thomasjm ];
89     platforms = lib.platforms.unix;
90     license = lib.licenses.mit;
91   };