diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-04-08 22:42:26 -0400 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-04-08 22:42:26 -0400 |
commit | 219590673ce4b8c01d595e64bff21d54a72191b7 (patch) | |
tree | 2b577ead908bf018df37b1241ba7a01d8659acdb /pkgs/development | |
parent | 625ce6c7f66c0b2ccae30f95cdd9e48feed8561c (diff) | |
parent | c99b6f5343030d7e5e3feef8b6c596f7644310a0 (diff) |
Merge branch 'staging-next' into staging
Conflicts: pkgs/development/python-modules/panel/default.nix pkgs/os-specific/linux/kernel/generic.nix pkgs/servers/home-assistant/default.nix
Diffstat (limited to 'pkgs/development')
40 files changed, 1544 insertions, 145 deletions
diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index 245e5bf2f540a..ac1acfe4b8f17 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -1,9 +1,7 @@ { stdenv, lib, fetchgit, flex, bison, pkg-config, which -, pythonSupport ? false, python ? null, swig +, pythonSupport ? false, python, swig, libyaml }: -assert pythonSupport -> python != null; - stdenv.mkDerivation rec { pname = "dtc"; version = "1.6.0"; @@ -14,6 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0li992wwd7kgy71bikanqky49y4hq3p3vx35p2hvyxy1k0wfy7i8"; }; + buildInputs = [ libyaml ]; nativeBuildInputs = [ flex bison pkg-config which ] ++ lib.optionals pythonSupport [ python swig ]; postPatch = '' @@ -23,10 +22,12 @@ stdenv.mkDerivation rec { makeFlags = [ "PYTHON=python" ]; installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ]; + doCheck = true; + meta = with lib; { description = "Device Tree Compiler"; homepage = "https://git.kernel.org/cgit/utils/dtc/dtc.git"; - license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD + license = licenses.gpl2Plus; # dtc itself is GPLv2, libfdt is dual GPL/BSD maintainers = [ maintainers.dezgeg ]; platforms = platforms.unix; }; diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 3b5465ac9c3e3..c94df83009513 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -2,12 +2,12 @@ openjdk11.overrideAttrs (oldAttrs: rec { pname = "jetbrains-jdk"; - version = "11.0.7-b64"; + version = "11.0.10-b37"; src = fetchFromGitHub { owner = "JetBrains"; repo = "JetBrainsRuntime"; rev = "jb${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "1gxqi6dkyriv9j29ppan638w1ns2g9m4q1sq7arf9kwqr05zim90"; + sha256 = "0bcvwnwi29z000b1bk5dhfkd33xfp9899zc3idzifdwl7q42zi02"; }; patches = []; meta = with lib; { diff --git a/pkgs/development/compilers/llvm/12/clang/default.nix b/pkgs/development/compilers/llvm/12/clang/default.nix index d4d0ddf7954d6..d90d019e6d51b 100644 --- a/pkgs/development/compilers/llvm/12/clang/default.nix +++ b/pkgs/development/compilers/llvm/12/clang/default.nix @@ -8,7 +8,7 @@ let pname = "clang"; inherit version; - src = fetch "clang" "11ay72f81ffygil5ficq7mzplck4gffm77p0yj4ib3dgiqbb1qbw"; + src = fetch "clang" "185r9rr254v75ja33nmm53j85lcnkj7bzsl18wvnd37jmz2nfxa5"; inherit clang-tools-extra_src; unpackPhase = '' diff --git a/pkgs/development/compilers/llvm/12/compiler-rt.nix b/pkgs/development/compilers/llvm/12/compiler-rt.nix index 9721879d762b5..e6ac77b7d265f 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt.nix @@ -11,7 +11,7 @@ in stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; - src = fetch pname "01dvir3858qkjmqhw2h6jjagq0la0kasnwzqbyv91yixnwx8369z"; + src = fetch pname "1x0z875nbdpzhr4qb7linm6r9swvdf6dvwqy1s22pbn4wdcw0cvf"; nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix index 901e9c82eee51..593db716ac6bc 100644 --- a/pkgs/development/compilers/llvm/12/default.nix +++ b/pkgs/development/compilers/llvm/12/default.nix @@ -8,7 +8,7 @@ let release_version = "12.0.0"; - candidate = "rc4"; # empty or "rcN" + candidate = "rc5"; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs targetConfig = stdenv.targetPlatform.config; @@ -18,7 +18,7 @@ let inherit sha256; }; - clang-tools-extra_src = fetch "clang-tools-extra" "1m1qga8m967bzqkxwx9xqkw1lkxi9dhlrn6km2k7g2yqyb6k14ag"; + clang-tools-extra_src = fetch "clang-tools-extra" "1hga9k5m60ywmr7m69jf1v6vj1ra1n6ybv1abzlz94f5q22i1a02"; tools = lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); diff --git a/pkgs/development/compilers/llvm/12/libc++/default.nix b/pkgs/development/compilers/llvm/12/libc++/default.nix index e910d2c96b682..757651c0f4c24 100644 --- a/pkgs/development/compilers/llvm/12/libc++/default.nix +++ b/pkgs/development/compilers/llvm/12/libc++/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { pname = "libc++"; inherit version; - src = fetch "libcxx" "0ai91zls1738502c3b2frhawmjpi73rm3m677hh540wrjp3xv0ql"; + src = fetch "libcxx" "01abh553dvjgk5cjzzp0ghmg00laqbr4ar4frdhyhpbwhhmwc880"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/12/libc++abi.nix b/pkgs/development/compilers/llvm/12/libc++abi.nix index 70dd5af7277af..e35480c7bf24b 100644 --- a/pkgs/development/compilers/llvm/12/libc++abi.nix +++ b/pkgs/development/compilers/llvm/12/libc++abi.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { pname = "libc++abi"; inherit version; - src = fetch "libcxxabi" "02qp6ndagq7n48p53z93d1rrx0v0v4rsahd4vkv5frid0vm4ah9h"; + src = fetch "libcxxabi" "0mjj4f63ix4j1b72bgzpcki7mzf3qszrq7snqhiq0c5s73skkwx0"; nativeBuildInputs = [ cmake python3 ]; buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; diff --git a/pkgs/development/compilers/llvm/12/libunwind.nix b/pkgs/development/compilers/llvm/12/libunwind.nix index ddfcf508fd8df..83e76c0c56cd2 100644 --- a/pkgs/development/compilers/llvm/12/libunwind.nix +++ b/pkgs/development/compilers/llvm/12/libunwind.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { pname = "libunwind"; inherit version; - src = fetch pname "1a5db1lxw98a430b8mnaclc0w98y6cc8k587kgjhn0nghl40l40i"; + src = fetch pname "0kaq75ygzv9dqfsx27pi5a0clipdjq6a9vghhb89d8k1rf20lslh"; postUnpack = '' unpackFile ${libcxx.src} diff --git a/pkgs/development/compilers/llvm/12/lld.nix b/pkgs/development/compilers/llvm/12/lld.nix index 00e30e16b6b08..a5e4ab834ecf5 100644 --- a/pkgs/development/compilers/llvm/12/lld.nix +++ b/pkgs/development/compilers/llvm/12/lld.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { pname = "lld"; inherit version; - src = fetch pname "0r9pxhvinipirv9s5k8fnsnqd30zfniwqjkvw5sac3lq29rn2lp1"; + src = fetch pname "044lv1d9am2xmbc3pvssxkkiyxyv72n2xkgk8z3p9k72h3ay00q3"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/12/lldb.nix b/pkgs/development/compilers/llvm/12/lldb.nix index f9f978c60b1f6..67de0c1874152 100644 --- a/pkgs/development/compilers/llvm/12/lldb.nix +++ b/pkgs/development/compilers/llvm/12/lldb.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (rec { pname = "lldb"; inherit version; - src = fetch pname "0943gan83mldizwbhksd07w4h90z4djjpv5f8v49caz8y9113svg"; + src = fetch pname "0q4p4s5ws1zszs3i4da5w5fnxkpny0q3fr1s1sh7jp9wcwxbxiqq"; patches = [ ./lldb-procfs.patch ]; diff --git a/pkgs/development/compilers/llvm/12/llvm.nix b/pkgs/development/compilers/llvm/12/llvm.nix index f70c4379c1af7..6e6127ba94944 100644 --- a/pkgs/development/compilers/llvm/12/llvm.nix +++ b/pkgs/development/compilers/llvm/12/llvm.nix @@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec { pname = "llvm"; inherit version; - src = fetch pname "1jif65i165h41cfcsfvfjy5k1yrnikg61assj5vs0f25pv1vbyvf"; - polly_src = fetch "polly" "0hk6j6rsal3zsp1f9fla71yzbwmzz9007m63x22hy7qfiwyplvf2"; + src = fetch pname "088dyv7hppidl3rqfsjdibvn4d3a74896fg2sz4dwaxlg19way93"; + polly_src = fetch "polly" "1qj7gkfr1yrsrz6j086l9p6d2kyyln15fmfiab4isn96g1dhsfb5"; unpackPhase = '' unpackFile $src diff --git a/pkgs/development/compilers/llvm/12/openmp.nix b/pkgs/development/compilers/llvm/12/openmp.nix index fcb91574d17d1..1e4618e4a1b47 100644 --- a/pkgs/development/compilers/llvm/12/openmp.nix +++ b/pkgs/development/compilers/llvm/12/openmp.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { pname = "openmp"; inherit version; - src = fetch pname "07g2rsfhli3szv3chzy6y37p2176ywdb6w3k2fv9g2r416cpxjdz"; + src = fetch pname "1d16r5whjb2n4n28rg8wn2g9krlc92q6nb0qmnnbzhqhx0rbkjfb"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 5cdd9886690ac..9dd5150f17d50 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -1,15 +1,15 @@ { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, c-ares, pkg-config, re2, openssl, protobuf -, gflags, abseil-cpp, libnsl +, abseil-cpp, libnsl }: stdenv.mkDerivation rec { - version = "1.36.4"; # N.B: if you change this, change pythonPackages.grpcio-tools to a matching version too + version = "1.37.0"; # N.B: if you change this, change pythonPackages.grpcio-tools to a matching version too pname = "grpc"; src = fetchFromGitHub { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - sha256 = "1zxvdg5vgjgkq5wmzwbxj2zydaj90ja074axs26yzd9x08j0bjxz"; + sha256 = "0q3hcnq351j0qm0gsbaxbsnz1gd9w3bk4cazkvq4l2lfmmiw7z56"; fetchSubmodules = true; }; patches = [ @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ]; - buildInputs = [ c-ares.cmake-config openssl protobuf gflags ] + buildInputs = [ c-ares.cmake-config openssl protobuf ] ++ lib.optionals stdenv.isLinux [ libnsl ]; cmakeFlags = @@ -31,7 +31,6 @@ stdenv.mkDerivation rec { "-DgRPC_RE2_PROVIDER=package" "-DgRPC_SSL_PROVIDER=package" "-DgRPC_PROTOBUF_PROVIDER=package" - "-DgRPC_GFLAGS_PROVIDER=package" "-DgRPC_ABSL_PROVIDER=package" "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" diff --git a/pkgs/development/libraries/openzwave/default.nix b/pkgs/development/libraries/openzwave/default.nix index 0a617561a8928..723288ab4a910 100644 --- a/pkgs/development/libraries/openzwave/default.nix +++ b/pkgs/development/libraries/openzwave/default.nix @@ -1,23 +1,33 @@ -{ lib, stdenv, fetchFromGitHub +{ lib, stdenv, fetchFromGitHub, fetchpatch , doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which , systemd }: -let - version = "2019-12-08"; - -in stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "openzwave"; - inherit version; + version = "1.6"; - # Use fork by Home Assistant because this package is mainly used for python.pkgs.homeassistant-pyozw. - # See https://github.com/OpenZWave/open-zwave/compare/master...home-assistant:hass for the difference. src = fetchFromGitHub { - owner = "home-assistant"; + owner = "OpenZWave"; repo = "open-zwave"; - rev = "2cd2137025c529835e4893a7b87c3d56605b2681"; - sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1"; + rev = "v${version}"; + sha256 = "0xgs4mmr0480c269wx9xkk67ikjzxkh8xcssrdx0f5xcl1lyd333"; }; + patches = [ + (fetchpatch { + name = "fix-strncat-build-failure.patch"; + url = "https://github.com/OpenZWave/open-zwave/commit/601e5fb16232a7984885e67fdddaf5b9c9dd8105.patch"; + sha256 = "1n1k5arwk1dyc12xz6xl4n8yw28vghzhv27j65z1nca4zqsxgza1"; + }) + (fetchpatch { + name = "fix-text-uninitialized.patch"; + url = "https://github.com/OpenZWave/open-zwave/commit/3b029a467e83bc7f0054e4dbba1e77e6eac7bc7f.patch"; + sha256 = "183mrzjh1zx2b2wzkj4jisiw8br7g7bbs167afls4li0fm01d638"; + }) + ]; + + outputs = [ "out" "doc" ]; + nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkg-config which ]; buildInputs = [ systemd ]; @@ -26,13 +36,9 @@ in stdenv.mkDerivation { enableParallelBuilding = true; - installPhase = '' - runHook preInstall - - DESTDIR=$out PREFIX= pkgconfigdir=lib/pkgconfig make install $installFlags - - runHook postInstall - ''; + makeFlags = [ + "PREFIX=${placeholder "out"}" + ]; FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf"; FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/"; @@ -42,15 +48,6 @@ in stdenv.mkDerivation { --replace /etc/openzwave $out/etc/openzwave ''; - fixupPhase = '' - substituteInPlace $out/lib/pkgconfig/libopenzwave.pc \ - --replace prefix= prefix=$out \ - --replace dir= dir=$out - - substituteInPlace $out/bin/ozw_config \ - --replace pcfile=${pkg-config} pcfile=$out - ''; - meta = with lib; { description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller"; homepage = "http://www.openzwave.net/"; diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix index 1da2f34aa5bbf..fae10f2b1b4a6 100644 --- a/pkgs/development/libraries/tracker/default.nix +++ b/pkgs/development/libraries/tracker/default.nix @@ -27,7 +27,7 @@ , substituteAll }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { pname = "tracker"; version = "3.0.3"; @@ -82,7 +82,8 @@ stdenv.mkDerivation rec { "-Ddocs=true" ]; - doCheck = true; + # https://gitlab.gnome.org/GNOME/tracker/-/issues/292#note_1075369 + doCheck = !stdenv.isi686; postPatch = '' patchShebangs utils/g-ir-merge/g-ir-merge @@ -133,3 +134,8 @@ stdenv.mkDerivation rec { platforms = platforms.linux; }; } + // lib.optionalAttrs stdenv.isi686 { + # TMP: fatal error: libtracker-sparql/tracker-sparql-enum-types.h: No such file or directory + enableParallelBuilding = false; + } +) diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index c79073f04e4c2..d513e01b7a359 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -11,23 +11,23 @@ let deps = { "base/trace_event/common" = fetchgit { url = "${git_url}/chromium/src/base/trace_event/common.git"; - rev = "936ba8a963284a6b3737cf2f0474a7131073abee"; - sha256 = "14nr22fqdpxma1kzjflj6a865vr3hfnnm2gs4vcixyq4kmfzfcy2"; + rev = "dab187b372fc17e51f5b9fad8201813d0aed5129"; + sha256 = "0dmpj9hj4xv3xb0fl1kb9hm4bhpbs2s5csx3z8cgjd5vwvhdzig4"; }; build = fetchgit { url = "${git_url}/chromium/src/build.git"; - rev = "325e95d6dae64f35b160b3dc7d73218cee5ec079"; - sha256 = "0dddyxa76p2xpjhmxif05v63i5ar6h5v684fdl667sg84f5bhhxf"; + rev = "26e9d485d01d6e0eb9dadd21df767a63494c8fea"; + sha256 = "1jjvsgj0cs97d26i3ba531ic1f9gqan8x7z4aya8yl8jx02l342q"; }; "third_party/googletest/src" = fetchgit { url = "${git_url}/external/github.com/google/googletest.git"; - rev = "5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081"; - sha256 = "0gmr10042c0xybxnn6g7ndj1na1mmd3l9w7449qlcv4s8gmfs7k6"; + rev = "e3f0319d89f4cbf32993de595d984183b1a9fc57"; + sha256 = "18xz71l2xjrqsc0q317whgw4xi1i5db24zcj7v04f5g6r1hyf1a5"; }; "third_party/icu" = fetchgit { url = "${git_url}/chromium/deps/icu.git"; - rev = "960f195aa87acaec46e6104ec93a596da7ae0843"; - sha256 = "073kh6gpcairgjxf3hlhpqljc13gwl2aj8fz91fv220xibwqs834"; + rev = "f2223961702f00a8833874b0560d615a2cc42738"; + sha256 = "0z5p53kbrjfkjn0i12dpk55cp8976j2zk7a4wk88423s2c5w87zl"; }; "third_party/jinja2" = fetchgit { url = "${git_url}/chromium/src/third_party/jinja2.git"; @@ -39,29 +39,31 @@ let rev = "8f45f5cfa0009d2a70589bcda0349b8cb2b72783"; sha256 = "168ppjmicfdh4i1l0l25s86mdbrz9fgxmiq1rx33x79mph41scfz"; }; + "third_party/zlib" = fetchgit { + url = "${git_url}/chromium/src/third_party/zlib.git"; + rev = "156be8c52f80cde343088b4a69a80579101b6e67"; + sha256 = "0hxbkkzmlv714fjq2jlp5dd2jc339xyh6gkjx1sz3srwv33mlk92"; + }; }; in stdenv.mkDerivation rec { pname = "v8"; - version = "7.4.255"; + version = "8.4.255"; doCheck = true; patches = [ - (fetchpatch { - url = "https://raw.githubusercontent.com/RPi-Distro/chromium-browser/master/debian/patches/revert-Xclang-instcombine-lower-dbg-declare.patch"; - sha256 = "02hczcg43m36q8j1kv5j3hq9czj9niiil9w13w22vzv2f3c67dvn"; - }) ./darwin.patch + ./gcc_arm.patch # Fix building zlib with gcc on aarch64, from https://gist.github.com/Adenilson/d973b6fd96c7709d33ddf08cf1dcb149 ]; src = fetchFromGitHub { owner = "v8"; repo = "v8"; rev = version; - sha256 = "14i0c71hmffzqnq9n73dh9dnabdxhbjhzkhqpk5yv9y90bwrzi2n"; + sha256 = "07ymw4kqbz7kv311gpk5bs5q90wj73n2q7jkyfhqk4hvhs1q5bw7"; }; postUnpack = '' @@ -97,9 +99,7 @@ stdenv.mkDerivation rec { ''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"'' ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${stdenv.cc}"''; - # with gcc8, -Wclass-memaccess became part of -Wall and causes logging limit - # to be exceeded - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-class-memaccess"; + NIX_CFLAGS_COMPILE = "-O2"; nativeBuildInputs = [ gn ninja pkg-config python ] ++ lib.optionals stdenv.isDarwin [ xcbuild darwin.DarwinTools ]; diff --git a/pkgs/development/libraries/v8/gcc_arm.patch b/pkgs/development/libraries/v8/gcc_arm.patch new file mode 100644 index 0000000000000..09579561fd8da --- /dev/null +++ b/pkgs/development/libraries/v8/gcc_arm.patch @@ -0,0 +1,31 @@ +diff --git a/third_party/zlib/contrib/optimizations/insert_string.h b/third_party/zlib/contrib/optimizations/insert_string.h +index 1826601..d123305 100644 +--- a/third_party/zlib/contrib/optimizations/insert_string.h ++++ b/third_party/zlib/contrib/optimizations/insert_string.h +@@ -26,15 +26,23 @@ + #define _cpu_crc32_u32 _mm_crc32_u32 + + #elif defined(CRC32_ARMV8_CRC32) +- #if defined(__clang__) ++ #if defined(__GNUC__) || defined(__clang__) + #undef TARGET_CPU_WITH_CRC +- #define __crc32cw __builtin_arm_crc32cw ++ #if defined(__clang__) ++ #define __crc32cw __builtin_arm_crc32cw ++ #elif defined(__GNUC__) ++ #define __crc32cw __builtin_aarch64_crc32cw ++ #endif + #endif + + #define _cpu_crc32_u32 __crc32cw + + #if defined(__aarch64__) +- #define TARGET_CPU_WITH_CRC __attribute__((target("crc"))) ++ #if defined(__clang__) ++ #define TARGET_CPU_WITH_CRC __attribute__((target("crc"))) ++ #elif defined(__GNUC__) ++ #define TARGET_CPU_WITH_CRC __attribute__((target("+crc"))) ++ #endif + #else // !defined(__aarch64__) + #define TARGET_CPU_WITH_CRC __attribute__((target("armv8-a,crc"))) + #endif // defined(__aarch64__) diff --git a/pkgs/development/libraries/wlroots/0.12.nix b/pkgs/development/libraries/wlroots/0.12.nix new file mode 100644 index 0000000000000..66d4fab2bf98d --- /dev/null +++ b/pkgs/development/libraries/wlroots/0.12.nix @@ -0,0 +1,57 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland +, libGL, wayland-protocols, libinput, libxkbcommon, pixman +, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa +, libpng, ffmpeg +}: + +# Fixed version derivation. +# nixpkgs-update: no auto update +stdenv.mkDerivation rec { + pname = "wlroots"; + version = "0.12.0"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "wlroots"; + rev = version; + sha256 = "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn"; + }; + + # $out for the library and $examples for the example programs (in examples): + outputs = [ "out" "examples" ]; + + nativeBuildInputs = [ meson ninja pkg-config wayland ]; + + buildInputs = [ + libGL wayland wayland-protocols libinput libxkbcommon pixman + xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa + libpng ffmpeg + ]; + + mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ]; + + postFixup = '' + # Install ALL example programs to $examples: + # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle + # screenshot output-layout multi-pointer rotation tablet touch pointer + # simple + mkdir -p $examples/bin + cd ./examples + for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do + cp "$binary" "$examples/bin/wlroots-$binary" + done + ''; + + meta = with lib; { + description = "A modular Wayland compositor library"; + longDescription = '' + Pluggable, composable, unopinionated modules for building a Wayland + compositor; or about 50,000 lines of code you were going to write anyway. + ''; + inherit (src.meta) homepage; + changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos synthetica ]; + }; +} diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 50ccd3608d8c3..f2343e73c589b 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -1,18 +1,18 @@ { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland-scanner , libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman , xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa -, libpng, ffmpeg +, libpng, ffmpeg, libuuid, xcbutilrenderutil, xwayland }: stdenv.mkDerivation rec { pname = "wlroots"; - version = "0.12.0"; + version = "0.13.0"; src = fetchFromGitHub { owner = "swaywm"; repo = "wlroots"; rev = version; - sha256 = "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn"; + sha256 = "01plhbnsp5yg18arz0v8fr0pr9l4w4pdzwkg9px486qdvb3s1vgy"; }; # $out for the library and $examples for the example programs (in examples): @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = [ libGL wayland wayland-protocols libinput libxkbcommon pixman xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa - libpng ffmpeg + libpng ffmpeg libuuid xcbutilrenderutil xwayland ]; mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ]; @@ -50,6 +50,6 @@ stdenv.mkDerivation rec { changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}"; license = licenses.mit; platforms = platforms.linux; - maintainers = with maintainers; [ primeos ]; + maintainers = with maintainers; [ primeos synthetica ]; }; } diff --git a/pkgs/development/python-modules/aiodiscover/default.nix b/pkgs/development/python-modules/aiodiscover/default.nix index 923be510c457c..e724d53bfe754 100644 --- a/pkgs/development/python-modules/aiodiscover/default.nix +++ b/pkgs/development/python-modules/aiodiscover/default.nix @@ -10,24 +10,16 @@ buildPythonPackage rec { pname = "aiodiscover"; - version = "1.3.2"; + version = "1.3.3"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "0qg2wm6ddsfai788chylr5ynrvakwg91q3dszz7dxzbkfdcxixj3"; + sha256 = "186agrjx818vn00d3pqlka5ir48rgpbfyn1cifkn9ylsxg9cz3ph"; }; - patches = [ - (fetchpatch { - name = "remove-entry_point.patch"; - url = "https://github.com/bdraco/aiodiscover/commit/4c497fb7d4c8685a78209c710e92e0bd17f46bb2.patch"; - sha256 = "0py9alhg6qdncbn6a04mrnjhs4j19kg759dv69knpqzryikcfa63"; - }) - ]; - propagatedBuildInputs = [ async-dns pyroute2 diff --git a/pkgs/development/python-modules/asyncio-nats-client/default.nix b/pkgs/development/python-modules/asyncio-nats-client/default.nix new file mode 100644 index 0000000000000..a7feac7312f56 --- /dev/null +++ b/pkgs/development/python-modules/asyncio-nats-client/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, ed25519 +, fetchFromGitHub +, nats-server +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "asyncio-nats-client"; + version = "0.11.4"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "nats-io"; + repo = "nats.py"; + rev = "v${version}"; + sha256 = "1aj57xi2rj1xswq8air13xdsll1ybpi0nmz5f6jq01azm0zy9xyd"; + }; + + propagatedBuildInputs = [ + ed25519 + ]; + + checkInputs = [ + nats-server + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=nats --cov-report html" "" + ''; + + disabledTests = [ + # RuntimeError: Event loop is closed + "test_subscribe_no_echo" + "test_reconnect_to_new_server_with_auth" + ]; + + pythonImportsCheck = [ "nats.aio" ]; + + meta = with lib; { + description = "Python client for NATS.io"; + homepage = "https://github.com/nats-io/nats.py"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/bokeh/default.nix b/pkgs/development/python-modules/bokeh/default.nix index 92dc2e8067985..18fea1036642a 100644 --- a/pkgs/development/python-modules/bokeh/default.nix +++ b/pkgs/development/python-modules/bokeh/default.nix @@ -33,11 +33,12 @@ buildPythonPackage rec { pname = "bokeh"; - version = "2.2.3"; # update together with panel which is not straightforward + # update together with panel which is not straightforward + version = "2.3.0"; src = fetchPypi { inherit pname version; - sha256 = "c4a3f97afe5f525019dd58ee8c4e3d43f53fe1b1ac264ccaae9b02c07b2abc17"; + sha256 = "dd417708f90702190222b1068a645acae99e66d4b58d7a336d545aeaa04e9b40"; }; patches = [ diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index d2d06450b925e..2f4ee5de8d28b 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.36.1"; + version = "1.37.0"; src = fetchPypi { inherit pname version; - sha256 = "80ef584f7b917f575e4b8f2ec59cd4a4d98c2046e801a735f3136b05742a36a6"; + sha256 = "3ec510c1b6bfc32effc639acf9a055e72dab7a7b6757bf72f2132790d6a7cf1c"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/python-modules/homeassistant-pyozw/default.nix b/pkgs/development/python-modules/homeassistant-pyozw/default.nix index a4ecb0d7ba3b2..271059e485189 100644 --- a/pkgs/development/python-modules/homeassistant-pyozw/default.nix +++ b/pkgs/development/python-modules/homeassistant-pyozw/default.nix @@ -1,6 +1,19 @@ -{ python_openzwave, fetchPypi }: +{ python_openzwave, fetchPypi, openzwave, fetchFromGitHub }: -python_openzwave.overridePythonAttrs (oldAttrs: rec { +(python_openzwave.override { + openzwave = openzwave.overrideAttrs (oldAttrs: { + version = "unstable-2020-03-24"; + + src = fetchFromGitHub { + owner = "home-assistant"; + repo = "open-zwave"; + rev = "94267fa298c1882f0dc73c0fd08f1f755ba83e83"; + sha256 = "0p2869fwidz1wcqzfm52cwm9ab96pmwkna3d4yvvh21nh09cvmwk"; + }; + + patches = [ ]; + }); +}).overridePythonAttrs (oldAttrs: rec { pname = "homeassistant_pyozw"; version = "0.1.10"; diff --git a/pkgs/development/python-modules/jupyterlab/default.nix b/pkgs/development/python-modules/jupyterlab/default.nix index f22b52b25b6a4..513cce507e3be 100644 --- a/pkgs/development/python-modules/jupyterlab/default.nix +++ b/pkgs/development/python-modules/jupyterlab/default.nix @@ -18,7 +18,9 @@ buildPythonPackage rec { sha256 = "929c60d7fb4aa704084c02d8ededc209b8b378e0b3adab46158b7fa6acc24230"; }; - propagatedBuildInputs = [ jupyterlab_server notebook jupyter-packaging nbclassic ]; + nativeBuildInputs = [ jupyter-packaging ]; + + propagatedBuildInputs = [ jupyterlab_server notebook nbclassic ]; makeWrapperArgs = [ "--set" "JUPYTERLAB_DIR" "$out/share/jupyter/lab" @@ -27,6 +29,8 @@ buildPythonPackage rec { # Depends on npm doCheck = false; + pythonImportsCheck = [ "jupyterlab" ]; + meta = with lib; { description = "Jupyter lab environment notebook server extension."; license = with licenses; [ bsd3 ]; diff --git a/pkgs/development/python-modules/nats-python/default.nix b/pkgs/development/python-modules/nats-python/default.nix new file mode 100644 index 0000000000000..5bf5b2a6d21c5 --- /dev/null +++ b/pkgs/development/python-modules/nats-python/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "nats-python"; + version = "0.8.0"; + disabled = pythonOlder "3.6"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "Gr1N"; + repo = "nats-python"; + rev = version; + sha256 = "1j7skyxldir3mphvnsyhjxmf3cimv4h7n5v58jl2gff4yd0hdw7g"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + patches = [ + # Switch to poetry-core, https://github.com/Gr1N/nats-python/pull/19 + (fetchpatch { + name = "use-poetry-core.patch"; + url = "https://github.com/Gr1N/nats-python/commit/71b25b324212dccd7fc06ba3914491adba22e83f.patch"; + sha256 = "1fip1qpzk2ka7qgkrdpdr6vnrnb1p8cwapa51xp0h26nm7yis1gl"; + }) + ]; + + # Tests require a running NATS server + doCheck = false; + + pythonImportsCheck = [ "pynats" ]; + + meta = with lib; { + description = "Python client for NATS messaging system"; + homepage = "https://github.com/Gr1N/nats-python"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/panel/default.nix b/pkgs/development/python-modules/panel/default.nix index 5628b8cc19e48..fa8dbddd04ec6 100644 --- a/pkgs/development/python-modules/panel/default.nix +++ b/pkgs/development/python-modules/panel/default.nix @@ -8,19 +8,39 @@ , pyct , testpath , tqdm +, callPackage }: -buildPythonPackage rec { +let + node = callPackage ./node {}; +in buildPythonPackage rec { pname = "panel"; version = "0.11.1"; - # Version 10 attempts to download models from the web during build-time - # https://github.com/holoviz/panel/issues/1819 + # Don't forget to also update the node packages + # 1. retrieve the package.json file + # 2. nix shell nixpkgs#nodePackages.node2nix + # 3. node2nix src = fetchPypi { inherit pname version; sha256 = "ce531e5c0c8a8ae74d523762aeb1666650caebbe1867aba16129d29791e921f9"; }; + # Since 0.10.0 panel attempts to fetch from the web. + # We avoid this: + # - we use node2nix to fetch assets + # - we disable bundling (which also tries to fetch assets) + # Downside of disabling bundling is that in an airgapped environment + # one may miss assets. + # https://github.com/holoviz/panel/issues/1819 + preBuild = '' + substituteInPlace setup.py --replace "bundle_resources()" "" + pushd panel + ln -s ${node.nodeDependencies}/lib/node_modules + export PATH="${node.nodeDependencies}/bin:$PATH" + popd + ''; + propagatedBuildInputs = [ bokeh param @@ -34,6 +54,10 @@ buildPythonPackage rec { # infinite recursion in test dependencies (hvplot) doCheck = false; + passthru = { + inherit node; # For convenience + }; + meta = with lib; { description = "A high level dashboarding library for python visualization libraries"; homepage = "https://pyviz.org"; diff --git a/pkgs/development/python-modules/panel/node/default.nix b/pkgs/development/python-modules/panel/node/default.nix new file mode 100644 index 0000000000000..64326c6b21602 --- /dev/null +++ b/pkgs/development/python-modules/panel/node/default.nix @@ -0,0 +1,17 @@ +# This file has been generated by node2nix 1.9.0. Do not edit! + +{pkgs ? import <nixpkgs> { + inherit system; + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}: + +let + nodeEnv = import ./node-env.nix { + inherit (pkgs) stdenv lib python2 runCommand writeTextFile; + inherit pkgs nodejs; + libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; + }; +in +import ./node-packages.nix { + inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; + inherit nodeEnv; +} diff --git a/pkgs/development/python-modules/panel/node/node-env.nix b/pkgs/development/python-modules/panel/node/node-env.nix new file mode 100644 index 0000000000000..c2b723195b77e --- /dev/null +++ b/pkgs/development/python-modules/panel/node/node-env.nix @@ -0,0 +1,567 @@ +# This file originates from node2nix + +{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile}: + +let + # Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master + utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux; + + python = if nodejs ? python then nodejs.python else python2; + + # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise + tarWrapper = runCommand "tarWrapper" {} '' + mkdir -p $out/bin + + cat > $out/bin/tar <<EOF + #! ${stdenv.shell} -e + $(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore + EOF + + chmod +x $out/bin/tar + ''; + + # Function that generates a TGZ file from a NPM project + buildNodeSourceDist = + { name, version, src, ... }: + + stdenv.mkDerivation { + name = "node-tarball-${name}-${version}"; + inherit src; + buildInputs = [ nodejs ]; + buildPhase = '' + export HOME=$TMPDIR + tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts) + ''; + installPhase = '' + mkdir -p $out/tarballs + mv $tgzFile $out/tarballs + mkdir -p $out/nix-support + echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products + ''; + }; + + includeDependencies = {dependencies}: + lib.optionalString (dependencies != []) + (lib.concatMapStrings (dependency: + '' + # Bundle the dependencies of the package + mkdir -p node_modules + cd node_modules + + # Only include dependencies if they don't exist. They may also be bundled in the package. + if [ ! -e "${dependency.name}" ] + then + ${composePackage dependency} + fi + + cd .. + '' + ) dependencies); + + # Recursively composes the dependencies of a package + composePackage = { name, packageName, src, dependencies ? [], ... }@args: + builtins.addErrorContext "while evaluating node package '${packageName}'" '' + DIR=$(pwd) + cd $TMPDIR + + unpackFile ${src} + + # Make the base dir in which the target dependency resides first + mkdir -p "$(dirname "$DIR/${packageName}")" + + if [ -f "${src}" ] + then + # Figure out what directory has been unpacked + packageDir="$(find . -maxdepth 1 -type d | tail -1)" + + # Restore write permissions to make building work + find "$packageDir" -type d -exec chmod u+x {} \; + chmod -R u+w "$packageDir" + + # Move the extracted tarball into the output folder + mv "$packageDir" "$DIR/${packageName}" + elif [ -d "${src}" ] + then + # Get a stripped name (without hash) of the source directory. + # On old nixpkgs it's already set internally. + if [ -z "$strippedName" ] + then + strippedName="$(stripHash ${src})" + fi + + # Restore write permissions to make building work + chmod -R u+w "$strippedName" + + # Move the extracted directory into the output folder + mv "$strippedName" "$DIR/${packageName}" + fi + + # Unset the stripped name to not confuse the next unpack step + unset strippedName + + # Include the dependencies of the package + cd "$DIR/${packageName}" + ${includeDependencies { inherit dependencies; }} + cd .. + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ''; + + pinpointDependencies = {dependencies, production}: + let + pinpointDependenciesFromPackageJSON = writeTextFile { + name = "pinpointDependencies.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + function resolveDependencyVersion(location, name) { + if(location == process.env['NIX_STORE']) { + return null; + } else { + var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json"); + + if(fs.existsSync(dependencyPackageJSON)) { + var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON)); + + if(dependencyPackageObj.name == name) { + return dependencyPackageObj.version; + } + } else { + return resolveDependencyVersion(path.resolve(location, ".."), name); + } + } + } + + function replaceDependencies(dependencies) { + if(typeof dependencies == "object" && dependencies !== null) { + for(var dependency in dependencies) { + var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency); + + if(resolvedVersion === null) { + process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n"); + } else { + dependencies[dependency] = resolvedVersion; + } + } + } + } + + /* Read the package.json configuration */ + var packageObj = JSON.parse(fs.readFileSync('./package.json')); + + /* Pinpoint all dependencies */ + replaceDependencies(packageObj.dependencies); + if(process.argv[2] == "development") { + replaceDependencies(packageObj.devDependencies); + } + replaceDependencies(packageObj.optionalDependencies); + + /* Write the fixed package.json file */ + fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2)); + ''; + }; + in + '' + node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"} + + ${lib.optionalString (dependencies != []) + '' + if [ -d node_modules ] + then + cd node_modules + ${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies} + cd .. + fi + ''} + ''; + + # Recursively traverses all dependencies of a package and pinpoints all + # dependencies in the package.json file to the versions that are actually + # being used. + + pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args: + '' + if [ -d "${packageName}" ] + then + cd "${packageName}" + ${pinpointDependencies { inherit dependencies production; }} + cd .. + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + fi + ''; + + # Extract the Node.js source code which is used to compile packages with + # native bindings + nodeSources = runCommand "node-sources" {} '' + tar --no-same-owner --no-same-permissions -xf ${nodejs.src} + mv node-* $out + ''; + + # Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty) + addIntegrityFieldsScript = writeTextFile { + name = "addintegrityfields.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + function augmentDependencies(baseDir, dependencies) { + for(var dependencyName in dependencies) { + var dependency = dependencies[dependencyName]; + + // Open package.json and augment metadata fields + var packageJSONDir = path.join(baseDir, "node_modules", dependencyName); + var packageJSONPath = path.join(packageJSONDir, "package.json"); + + if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored + console.log("Adding metadata fields to: "+packageJSONPath); + var packageObj = JSON.parse(fs.readFileSync(packageJSONPath)); + + if(dependency.integrity) { + packageObj["_integrity"] = dependency.integrity; + } else { + packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads. + } + + if(dependency.resolved) { + packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided + } else { + packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories. + } + + if(dependency.from !== undefined) { // Adopt from property if one has been provided + packageObj["_from"] = dependency.from; + } + + fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2)); + } + + // Augment transitive dependencies + if(dependency.dependencies !== undefined) { + augmentDependencies(packageJSONDir, dependency.dependencies); + } + } + } + + if(fs.existsSync("./package-lock.json")) { + var packageLock = JSON.parse(fs.readFileSync("./package-lock.json")); + + if(![1, 2].includes(packageLock.lockfileVersion)) { + process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n"); + process.exit(1); + } + + if(packageLock.dependencies !== undefined) { + augmentDependencies(".", packageLock.dependencies); + } + } + ''; + }; + + # Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes + reconstructPackageLock = writeTextFile { + name = "addintegrityfields.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + var packageObj = JSON.parse(fs.readFileSync("package.json")); + + var lockObj = { + name: packageObj.name, + version: packageObj.version, + lockfileVersion: 1, + requires: true, + dependencies: {} + }; + + function augmentPackageJSON(filePath, dependencies) { + var packageJSON = path.join(filePath, "package.json"); + if(fs.existsSync(packageJSON)) { + var packageObj = JSON.parse(fs.readFileSync(packageJSON)); + dependencies[packageObj.name] = { + version: packageObj.version, + integrity: "sha1-000000000000000000000000000=", + dependencies: {} + }; + processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies); + } + } + + function processDependencies(dir, dependencies) { + if(fs.existsSync(dir)) { + var files = fs.readdirSync(dir); + + files.forEach(function(entry) { + var filePath = path.join(dir, entry); + var stats = fs.statSync(filePath); + + if(stats.isDirectory()) { + if(entry.substr(0, 1) == "@") { + // When we encounter a namespace folder, augment all packages belonging to the scope + var pkgFiles = fs.readdirSync(filePath); + + pkgFiles.forEach(function(entry) { + if(stats.isDirectory()) { + var pkgFilePath = path.join(filePath, entry); + augmentPackageJSON(pkgFilePath, dependencies); + } + }); + } else { + augmentPackageJSON(filePath, dependencies); + } + } + }); + } + } + + processDependencies("node_modules", lockObj.dependencies); + + fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2)); + ''; + }; + + prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}: + let + forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com"; + in + '' + # Pinpoint the versions of all dependencies to the ones that are actually being used + echo "pinpointing versions of dependencies..." + source $pinpointDependenciesScriptPath + + # Patch the shebangs of the bundled modules to prevent them from + # calling executables outside the Nix store as much as possible + patchShebangs . + + # Deploy the Node.js package by running npm install. Since the + # dependencies have been provided already by ourselves, it should not + # attempt to install them again, which is good, because we want to make + # it Nix's responsibility. If it needs to install any dependencies + # anyway (e.g. because the dependency parameters are + # incomplete/incorrect), it fails. + # + # The other responsibilities of NPM are kept -- version checks, build + # steps, postprocessing etc. + + export HOME=$TMPDIR + cd "${packageName}" + runHook preRebuild + + ${lib.optionalString bypassCache '' + ${lib.optionalString reconstructLock '' + if [ -f package-lock.json ] + then + echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!" + echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!" + rm package-lock.json + else + echo "No package-lock.json file found, reconstructing..." + fi + + node ${reconstructPackageLock} + ''} + + node ${addIntegrityFieldsScript} + ''} + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild + + if [ "''${dontNpmInstall-}" != "1" ] + then + # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. + rm -f npm-shrinkwrap.json + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install + fi + ''; + + # Builds and composes an NPM package including all its dependencies + buildNodePackage = + { name + , packageName + , version + , dependencies ? [] + , buildInputs ? [] + , production ? true + , npmFlags ? "" + , dontNpmInstall ? false + , bypassCache ? false + , reconstructLock ? false + , preRebuild ? "" + , dontStrip ? true + , unpackPhase ? "true" + , buildPhase ? "true" + , ... }@args: + + let + extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ]; + in + stdenv.mkDerivation ({ + name = "node_${name}-${version}"; + buildInputs = [ tarWrapper python nodejs ] + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool + ++ buildInputs; + + inherit nodejs; + + inherit dontStrip; # Stripping may fail a build for some package deployments + inherit dontNpmInstall preRebuild unpackPhase buildPhase; + + compositionScript = composePackage args; + pinpointDependenciesScript = pinpointDependenciesOfPackage args; + + passAsFile = [ "compositionScript" "pinpointDependenciesScript" ]; + + installPhase = '' + # Create and enter a root node_modules/ folder + mkdir -p $out/lib/node_modules + cd $out/lib/node_modules + + # Compose the package and all its dependencies + source $compositionScriptPath + + ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }} + + # Create symlink to the deployed executable folder, if applicable + if [ -d "$out/lib/node_modules/.bin" ] + then + ln -s $out/lib/node_modules/.bin $out/bin + fi + + # Create symlinks to the deployed manual page folders, if applicable + if [ -d "$out/lib/node_modules/${packageName}/man" ] + then + mkdir -p $out/share + for dir in "$out/lib/node_modules/${packageName}/man/"* + do + mkdir -p $out/share/man/$(basename "$dir") + for page in "$dir"/* + do + ln -s $page $out/share/man/$(basename "$dir") + done + done + fi + + # Run post install hook, if provided + runHook postInstall + ''; + } // extraArgs); + + # Builds a node environment (a node_modules folder and a set of binaries) + buildNodeDependencies = + { name + , packageName + , version + , src + , dependencies ? [] + , buildInputs ? [] + , production ? true + , npmFlags ? "" + , dontNpmInstall ? false + , bypassCache ? false + , reconstructLock ? false + , dontStrip ? true + , unpackPhase ? "true" + , buildPhase ? "true" + , ... }@args: + + let + extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ]; + in + stdenv.mkDerivation ({ + name = "node-dependencies-${name}-${version}"; + + buildInputs = [ tarWrapper python nodejs ] + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool + ++ buildInputs; + + inherit dontStrip; # Stripping may fail a build for some package deployments + inherit dontNpmInstall unpackPhase buildPhase; + + includeScript = includeDependencies { inherit dependencies; }; + pinpointDependenciesScript = pinpointDependenciesOfPackage args; + + passAsFile = [ "includeScript" "pinpointDependenciesScript" ]; + + installPhase = '' + mkdir -p $out/${packageName} + cd $out/${packageName} + + source $includeScriptPath + + # Create fake package.json to make the npm commands work properly + cp ${src}/package.json . + chmod 644 package.json + ${lib.optionalString bypassCache '' + if [ -f ${src}/package-lock.json ] + then + cp ${src}/package-lock.json . + fi + ''} + + # Go to the parent folder to make sure that all packages are pinpointed + cd .. + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + + ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }} + + # Expose the executables that were installed + cd .. + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + + mv ${packageName} lib + ln -s $out/lib/node_modules/.bin $out/bin + ''; + } // extraArgs); + + # Builds a development shell + buildNodeShell = + { name + , packageName + , version + , src + , dependencies ? [] + , buildInputs ? [] + , production ? true + , npmFlags ? "" + , dontNpmInstall ? false + , bypassCache ? false + , reconstructLock ? false + , dontStrip ? true + , unpackPhase ? "true" + , buildPhase ? "true" + , ... }@args: + + let + nodeDependencies = buildNodeDependencies args; + in + stdenv.mkDerivation { + name = "node-shell-${name}-${version}"; + + buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildCommand = '' + mkdir -p $out/bin + cat > $out/bin/shell <<EOF + #! ${stdenv.shell} -e + $shellHook + exec ${stdenv.shell} + EOF + chmod +x $out/bin/shell + ''; + + # Provide the dependencies in a development shell through the NODE_PATH environment variable + inherit nodeDependencies; + shellHook = lib.optionalString (dependencies != []) '' + export NODE_PATH=${nodeDependencies}/lib/node_modules + export PATH="${nodeDependencies}/bin:$PATH" + ''; + }; +in +{ + buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist; + buildNodePackage = lib.makeOverridable buildNodePackage; + buildNodeDependencies = lib.makeOverridable buildNodeDependencies; + buildNodeShell = lib.makeOverridable buildNodeShell; +} diff --git a/pkgs/development/python-modules/panel/node/node-packages.nix b/pkgs/development/python-modules/panel/node/node-packages.nix new file mode 100644 index 0000000000000..7b591b6e469e1 --- /dev/null +++ b/pkgs/development/python-modules/panel/node/node-packages.nix @@ -0,0 +1,572 @@ +# This file has been generated by node2nix 1.9.0. Do not edit! + +{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: + +let + sources = { + "@bokeh/bokehjs-2.3.0" = { + name = "_at_bokeh_slash_bokehjs"; + packageName = "@bokeh/bokehjs"; + version = "2.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/@bokeh/bokehjs/-/bokehjs-2.3.0.tgz"; + sha512 = "geKBhYUVJ5IaY0UNk9k2P0yiYLCj+DOeNjdDneuTJ8K5R9fs0Rpp4iiaQKUGr1yUyQHGHLU8sk4CFZ+Bd5ZILg=="; + }; + }; + "@bokeh/numbro-1.6.2" = { + name = "_at_bokeh_slash_numbro"; + packageName = "@bokeh/numbro"; + version = "1.6.2"; + src = fetchurl { + url = "https://registry.npmjs.org/@bokeh/numbro/-/numbro-1.6.2.tgz"; + sha512 = "owIECPc3T3QXHCb2v5Ez+/uE9SIxI7N4nd9iFlWnfBrOelr0/omvFn09VisRn37AAFAY39sJiCVgECwryHWUPA=="; + }; + }; + "@bokeh/slickgrid-2.4.2702" = { + name = "_at_bokeh_slash_slickgrid"; + packageName = "@bokeh/slickgrid"; + version = "2.4.2702"; + src = fetchurl { + url = "https://registry.npmjs.org/@bokeh/slickgrid/-/slickgrid-2.4.2702.tgz"; + sha512 = "W9tm8Qdw5BrylbZbaVWaQMgLfW/klesnj6J3FnyWpo18hCCOFApccUD8iOnRv7bF6PHlgWk84mW3JT5RSzYKjA=="; + }; + }; + "@luma.gl/constants-8.4.4" = { + name = "_at_luma.gl_slash_constants"; + packageName = "@luma.gl/constants"; + version = "8.4.4"; + src = fetchurl { + url = "https://registry.npmjs.org/@luma.gl/constants/-/constants-8.4.4.tgz"; + sha512 = "4e58QW6UKXkxiIvWSLoAnTc4cT8nvb0PhLzu1h8KiCuaDT5Vq8csOymcNOy/jhpfcIhHlmT1KwowF5m/DcOlKg=="; + }; + }; + "@types/debounce-1.2.0" = { + name = "_at_types_slash_debounce"; + packageName = "@types/debounce"; + version = "1.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.0.tgz"; + sha512 = "bWG5wapaWgbss9E238T0R6bfo5Fh3OkeoSt245CM7JJwVwpw6MEBCbIxLq5z8KzsE3uJhzcIuQkyiZmzV3M/Dw=="; + }; + }; + "@types/gl-matrix-2.4.5" = { + name = "_at_types_slash_gl-matrix"; + packageName = "@types/gl-matrix"; + version = "2.4.5"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/gl-matrix/-/gl-matrix-2.4.5.tgz"; + sha512 = "0L8Mq1+oaIW0oVzGUDbSW+HnTjCNb4CmoIQE5BkoHt/A7x20z0MJ1PnwfH3atty/vbWLGgvJwVu2Mz3SKFiEFw=="; + }; + }; + "@types/jquery-3.5.5" = { + name = "_at_types_slash_jquery"; + packageName = "@types/jquery"; + version = "3.5.5"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.5.tgz"; + sha512 = "6RXU9Xzpc6vxNrS6FPPapN1SxSHgQ336WC6Jj/N8q30OiaBZ00l1GBgeP7usjVZPivSkGUfL1z/WW6TX989M+w=="; + }; + }; + "@types/sizzle-2.3.2" = { + name = "_at_types_slash_sizzle"; + packageName = "@types/sizzle"; + version = "2.3.2"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz"; + sha512 = "7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg=="; + }; + }; + "@types/slickgrid-2.1.30" = { + name = "_at_types_slash_slickgrid"; + packageName = "@types/slickgrid"; + version = "2.1.30"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/slickgrid/-/slickgrid-2.1.30.tgz"; + sha512 = "9nTqNWD3BtEVK0CP+G+mBtvSrKTfQy3Dg5/al+GdTSVMHFm37UxsHJ1eURwPg7rYu6vc7xU95fGTCKMZbxsD5w=="; + }; + }; + "choices.js-9.0.1" = { + name = "choices.js"; + packageName = "choices.js"; + version = "9.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/choices.js/-/choices.js-9.0.1.tgz"; + sha512 = "JgpeDY0Tmg7tqY6jaW/druSklJSt7W68tXFJIw0GSGWmO37SDAL8o60eICNGbzIODjj02VNNtf5h6TgoHDtCsA=="; + }; + }; + "d-1.0.1" = { + name = "d"; + packageName = "d"; + version = "1.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/d/-/d-1.0.1.tgz"; + sha512 = "m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA=="; + }; + }; + "debounce-1.2.1" = { + name = "debounce"; + packageName = "debounce"; + version = "1.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz"; + sha512 = "XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug=="; + }; + }; + "deepmerge-4.2.2" = { + name = "deepmerge"; + packageName = "deepmerge"; + version = "4.2.2"; + src = fetchurl { + url = "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz"; + sha512 = "FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="; + }; + }; + "es5-ext-0.10.53" = { + name = "es5-ext"; + packageName = "es5-ext"; + version = "0.10.53"; + src = fetchurl { + url = "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz"; + sha512 = "Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q=="; + }; + }; + "es6-iterator-2.0.3" = { + name = "es6-iterator"; + packageName = "es6-iterator"; + version = "2.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz"; + sha1 = "a7de889141a05a94b0854403b2d0a0fbfa98f3b7"; + }; + }; + "es6-map-0.1.5" = { + name = "es6-map"; + packageName = "es6-map"; + version = "0.1.5"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz"; + sha1 = "9136e0503dcc06a301690f0bb14ff4e364e949f0"; + }; + }; + "es6-promise-4.2.8" = { + name = "es6-promise"; + packageName = "es6-promise"; + version = "4.2.8"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz"; + sha512 = "HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="; + }; + }; + "es6-set-0.1.5" = { + name = "es6-set"; + packageName = "es6-set"; + version = "0.1.5"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz"; + sha1 = "d2b3ec5d4d800ced818db538d28974db0a73ccb1"; + }; + }; + "es6-symbol-3.1.1" = { + name = "es6-symbol"; + packageName = "es6-symbol"; + version = "3.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz"; + sha1 = "bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"; + }; + }; + "es6-symbol-3.1.3" = { + name = "es6-symbol"; + packageName = "es6-symbol"; + version = "3.1.3"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz"; + sha512 = "NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA=="; + }; + }; + "es6-weak-map-2.0.3" = { + name = "es6-weak-map"; + packageName = "es6-weak-map"; + version = "2.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz"; + sha512 = "p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA=="; + }; + }; + "event-emitter-0.3.5" = { + name = "event-emitter"; + packageName = "event-emitter"; + version = "0.3.5"; + src = fetchurl { + url = "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz"; + sha1 = "df8c69eef1647923c7157b9ce83840610b02cc39"; + }; + }; + "ext-1.4.0" = { + name = "ext"; + packageName = "ext"; + version = "1.4.0"; + src = fetchurl { + url = "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz"; + sha512 = "Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A=="; + }; + }; + "fast-deep-equal-2.0.1" = { + name = "fast-deep-equal"; + packageName = "fast-deep-equal"; + version = "2.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz"; + sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"; + }; + }; + "fast-json-patch-2.2.1" = { + name = "fast-json-patch"; + packageName = "fast-json-patch"; + version = "2.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz"; + sha512 = "4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig=="; + }; + }; + "flatbush-3.3.0" = { + name = "flatbush"; + packageName = "flatbush"; + version = "3.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/flatbush/-/flatbush-3.3.0.tgz"; + sha512 = "F3EzQvKpdmXUbFwWxLKBpytOFEGYQMCTBLuqZ4GEajFOEAvnOIBiyxW3OFSZXIOtpCS8teN6bFEpNZtnVXuDQA=="; + }; + }; + "flatpickr-4.6.9" = { + name = "flatpickr"; + packageName = "flatpickr"; + version = "4.6.9"; + src = fetchurl { + url = "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.9.tgz"; + sha512 = "F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw=="; + }; + }; + "flatqueue-1.2.1" = { + name = "flatqueue"; + packageName = "flatqueue"; + version = "1.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/flatqueue/-/flatqueue-1.2.1.tgz"; + sha512 = "X86TpWS1rGuY7m382HuA9vngLeDuWA9lJvhEG+GfgKMV5onSvx5a71cl7GMbXzhWtlN9dGfqOBrpfqeOtUfGYQ=="; + }; + }; + "fuse.js-3.6.1" = { + name = "fuse.js"; + packageName = "fuse.js"; + version = "3.6.1"; + src = fetchurl { + url = "https://registry.npmjs.org/fuse.js/-/fuse.js-3.6.1.tgz"; + sha512 = "hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw=="; + }; + }; + "gl-matrix-3.3.0" = { + name = "gl-matrix"; + packageName = "gl-matrix"; + version = "3.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz"; + sha512 = "COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA=="; + }; + }; + "hammerjs-2.0.8" = { + name = "hammerjs"; + packageName = "hammerjs"; + version = "2.0.8"; + src = fetchurl { + url = "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz"; + sha1 = "04ef77862cff2bb79d30f7692095930222bf60f1"; + }; + }; + "htm-3.0.4" = { + name = "htm"; + packageName = "htm"; + version = "3.0.4"; + src = fetchurl { + url = "https://registry.npmjs.org/htm/-/htm-3.0.4.tgz"; + sha512 = "VRdvxX3tmrXuT/Ovt59NMp/ORMFi4bceFMDjos1PV4E0mV+5votuID8R60egR9A4U8nLt238R/snlJGz3UYiTQ=="; + }; + }; + "jquery-3.6.0" = { + name = "jquery"; + packageName = "jquery"; + version = "3.6.0"; + src = fetchurl { + url = "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz"; + sha512 = "JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="; + }; + }; + "jquery-ui-1.12.1" = { + name = "jquery-ui"; + packageName = "jquery-ui"; + version = "1.12.1"; + src = fetchurl { + url = "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.12.1.tgz"; + sha1 = "bcb4045c8dd0539c134bc1488cdd3e768a7a9e51"; + }; + }; + "js-tokens-4.0.0" = { + name = "js-tokens"; + packageName = "js-tokens"; + version = "4.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"; + sha512 = "RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="; + }; + }; + "json-formatter-js-2.3.4" = { + name = "json-formatter-js"; + packageName = "json-formatter-js"; + version = "2.3.4"; + src = fetchurl { + url = "https://registry.npmjs.org/json-formatter-js/-/json-formatter-js-2.3.4.tgz"; + sha512 = "gmAzYRtPRmYzeAT4T7+t3NhTF89JOAIioCVDddl9YDb3ls3kWcskirafw/MZGJaRhEU6fRimGJHl7CC7gaAI2Q=="; + }; + }; + "loose-envify-1.4.0" = { + name = "loose-envify"; + packageName = "loose-envify"; + version = "1.4.0"; + src = fetchurl { + url = "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz"; + sha512 = "lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="; + }; + }; + "mgrs-1.0.0" = { + name = "mgrs"; + packageName = "mgrs"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz"; + sha1 = "fb91588e78c90025672395cb40b25f7cd6ad1829"; + }; + }; + "next-tick-1.0.0" = { + name = "next-tick"; + packageName = "next-tick"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz"; + sha1 = "ca86d1fe8828169b0120208e3dc8424b9db8342c"; + }; + }; + "nouislider-14.7.0" = { + name = "nouislider"; + packageName = "nouislider"; + version = "14.7.0"; + src = fetchurl { + url = "https://registry.npmjs.org/nouislider/-/nouislider-14.7.0.tgz"; + sha512 = "4RtQ1+LHJKesDCNJrXkQcwXAWCrC2aggdLYMstS/G5fEWL+fXZbUA9pwVNHFghMGuFGRATlDLNInRaPeRKzpFQ=="; + }; + }; + "preact-10.5.13" = { + name = "preact"; + packageName = "preact"; + version = "10.5.13"; + src = fetchurl { + url = "https://registry.npmjs.org/preact/-/preact-10.5.13.tgz"; + sha512 = "q/vlKIGNwzTLu+jCcvywgGrt+H/1P/oIRSD6mV4ln3hmlC+Aa34C7yfPI4+5bzW8pONyVXYS7SvXosy2dKKtWQ=="; + }; + }; + "proj4-2.7.2" = { + name = "proj4"; + packageName = "proj4"; + version = "2.7.2"; + src = fetchurl { + url = "https://registry.npmjs.org/proj4/-/proj4-2.7.2.tgz"; + sha512 = "x/EboBmIq48a9FED0Z9zWCXkd8VIpXHLsyEXljGtsnzeztC41bFjPjJ0S//wBbNLDnDYRe0e6c3FSSiqMCebDA=="; + }; + }; + "redux-4.0.5" = { + name = "redux"; + packageName = "redux"; + version = "4.0.5"; + src = fetchurl { + url = "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz"; + sha512 = "VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w=="; + }; + }; + "sprintf-js-1.1.2" = { + name = "sprintf-js"; + packageName = "sprintf-js"; + version = "1.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz"; + sha512 = "VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="; + }; + }; + "symbol-observable-1.2.0" = { + name = "symbol-observable"; + packageName = "symbol-observable"; + version = "1.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz"; + sha512 = "e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="; + }; + }; + "timezone-1.0.23" = { + name = "timezone"; + packageName = "timezone"; + version = "1.0.23"; + src = fetchurl { + url = "https://registry.npmjs.org/timezone/-/timezone-1.0.23.tgz"; + sha512 = "yhQgk6qmSLB+TF8HGmApZAVI5bfzR1CoKUGr+WMZWmx75ED1uDewAZA8QMGCQ70TEv4GmM8pDB9jrHuxdaQ1PA=="; + }; + }; + "tslib-1.14.1" = { + name = "tslib"; + packageName = "tslib"; + version = "1.14.1"; + src = fetchurl { + url = "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"; + sha512 = "Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="; + }; + }; + "tslib-2.2.0" = { + name = "tslib"; + packageName = "tslib"; + version = "2.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz"; + sha512 = "gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="; + }; + }; + "type-1.2.0" = { + name = "type"; + packageName = "type"; + version = "1.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/type/-/type-1.2.0.tgz"; + sha512 = "+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="; + }; + }; + "type-2.5.0" = { + name = "type"; + packageName = "type"; + version = "2.5.0"; + src = fetchurl { + url = "https://registry.npmjs.org/type/-/type-2.5.0.tgz"; + sha512 = "180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw=="; + }; + }; + "underscore.template-0.1.7" = { + name = "underscore.template"; + packageName = "underscore.template"; + version = "0.1.7"; + src = fetchurl { + url = "https://registry.npmjs.org/underscore.template/-/underscore.template-0.1.7.tgz"; + sha1 = "3013e0ea181756306f1609e959cafbc722adb3e9"; + }; + }; + "wkt-parser-1.2.4" = { + name = "wkt-parser"; + packageName = "wkt-parser"; + version = "1.2.4"; + src = fetchurl { + url = "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.4.tgz"; + sha512 = "ZzKnc7ml/91fOPh5bANBL4vUlWPIYYv11waCtWTkl2TRN+LEmBg60Q1MA8gqV4hEp4MGfSj9JiHz91zw/gTDXg=="; + }; + }; + }; + args = { + name = "_at_holoviz_slash_panel"; + packageName = "@holoviz/panel"; + version = "0.11.1"; + src = ./.; + dependencies = [ + sources."@bokeh/bokehjs-2.3.0" + sources."@bokeh/numbro-1.6.2" + (sources."@bokeh/slickgrid-2.4.2702" // { + dependencies = [ + sources."tslib-1.14.1" + ]; + }) + sources."@luma.gl/constants-8.4.4" + sources."@types/debounce-1.2.0" + sources."@types/gl-matrix-2.4.5" + sources."@types/jquery-3.5.5" + sources."@types/sizzle-2.3.2" + sources."@types/slickgrid-2.1.30" + sources."choices.js-9.0.1" + sources."d-1.0.1" + sources."debounce-1.2.1" + sources."deepmerge-4.2.2" + sources."es5-ext-0.10.53" + sources."es6-iterator-2.0.3" + sources."es6-map-0.1.5" + sources."es6-promise-4.2.8" + (sources."es6-set-0.1.5" // { + dependencies = [ + sources."es6-symbol-3.1.1" + ]; + }) + sources."es6-symbol-3.1.3" + sources."es6-weak-map-2.0.3" + sources."event-emitter-0.3.5" + (sources."ext-1.4.0" // { + dependencies = [ + sources."type-2.5.0" + ]; + }) + sources."fast-deep-equal-2.0.1" + sources."fast-json-patch-2.2.1" + sources."flatbush-3.3.0" + sources."flatpickr-4.6.9" + sources."flatqueue-1.2.1" + sources."fuse.js-3.6.1" + sources."gl-matrix-3.3.0" + sources."hammerjs-2.0.8" + sources."htm-3.0.4" + sources."jquery-3.6.0" + sources."jquery-ui-1.12.1" + sources."js-tokens-4.0.0" + sources."json-formatter-js-2.3.4" + sources."loose-envify-1.4.0" + sources."mgrs-1.0.0" + sources."next-tick-1.0.0" + sources."nouislider-14.7.0" + sources."preact-10.5.13" + sources."proj4-2.7.2" + sources."redux-4.0.5" + sources."sprintf-js-1.1.2" + sources."symbol-observable-1.2.0" + sources."timezone-1.0.23" + sources."tslib-2.2.0" + sources."type-1.2.0" + sources."underscore.template-0.1.7" + sources."wkt-parser-1.2.4" + ]; + buildInputs = globalBuildInputs; + meta = { + description = "A high level dashboarding library for python visualization libraries."; + license = "BSD-3-Clause"; + }; + production = true; + bypassCache = true; + reconstructLock = true; + }; +in +{ + args = args; + sources = sources; + tarball = nodeEnv.buildNodeSourceDist args; + package = nodeEnv.buildNodePackage args; + shell = nodeEnv.buildNodeShell args; + nodeDependencies = nodeEnv.buildNodeDependencies (lib.overrideExisting args { + src = stdenv.mkDerivation { + name = args.name + "-package-json"; + src = nix-gitignore.gitignoreSourcePure [ + "*" + "!package.json" + "!package-lock.json" + ] args.src; + dontBuild = true; + installPhase = "mkdir -p $out; cp -r ./* $out;"; + }; + }); +} diff --git a/pkgs/development/python-modules/panel/node/package.json b/pkgs/development/python-modules/panel/node/package.json new file mode 100644 index 0000000000000..f40e3773e23b5 --- /dev/null +++ b/pkgs/development/python-modules/panel/node/package.json @@ -0,0 +1,27 @@ +{ + "name": "@holoviz/panel", + "version": "0.11.1", + "description": "A high level dashboarding library for python visualization libraries.", + "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "https://github.com/holoviz/panel.git" + }, + "dependencies": { + "@bokeh/bokehjs": "^2.3.0", + "@luma.gl/constants": "^8.0.3", + "@types/debounce": "^1.2.0", + "@types/gl-matrix": "^2.4.5", + "debounce": "^1.2.0", + "fast-json-patch": "^2.2.1", + "gl-matrix": "^3.1.0", + "htm": "^3.0.4", + "json-formatter-js": "^2.2.1", + "preact": "^10.5.12" + }, + "devDependencies": {}, + "files": [ + "dist/**/*.{js,js.map,d.ts,json,css}" + ], + "main": "dist/panel.min.js" +} diff --git a/pkgs/development/python-modules/smartypants/default.nix b/pkgs/development/python-modules/smartypants/default.nix index d1e11e30d6195..ec41c8a32aa13 100644 --- a/pkgs/development/python-modules/smartypants/default.nix +++ b/pkgs/development/python-modules/smartypants/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchhg +, fetchFromGitHub , isPyPy }: @@ -9,15 +9,21 @@ buildPythonPackage rec { pname = "smartypants"; disabled = isPyPy; - src = fetchhg { - url = "https://bitbucket.org/livibetter/smartypants.py"; + src = fetchFromGitHub { + owner = "leohemsted"; + repo = "smartypants.py"; rev = "v${version}"; sha256 = "1cmzz44d2hm6y8jj2xcq1wfr26760gi7iq92ha8xbhb1axzd7nq6"; + # remove this file and the name on the next version update + extraPostFetch = '' + cp ${./hgtags} "$out"/.hgtags + ''; + name = "hg-archive"; }; meta = with lib; { description = "Python with the SmartyPants"; - homepage = "https://bitbucket.org/livibetter/smartypants.py"; + homepage = "https://github.com/leohemsted/smartypants.py"; license = licenses.bsd3; maintainers = with maintainers; [ ]; }; diff --git a/pkgs/development/python-modules/smartypants/hgtags b/pkgs/development/python-modules/smartypants/hgtags new file mode 100644 index 0000000000000..522ca8d2c0178 --- /dev/null +++ b/pkgs/development/python-modules/smartypants/hgtags @@ -0,0 +1,17 @@ +47e996532eff9d3bb2c7048aca37d5fd1028e706 v1.5_1.2 +4ff48eba1d3d37d708005e465cf701b63eb68fd3 v1.5_1.1 +6ba7f3a14ff77e4e9bf9918413b1710c33deae4d v1.5_1.3.1 +71006a014216defb21e4db6e03434d289564ea60 v1.5_1.6 +90950ff693122f80710974abc0f2be64d4105e84 v1.5_1.3 +a6ecae6541d64f5b12c7b788c65362b0c012278d v1.5_1.0 +eed4a8a16f116f98e8280dc79128845020bbe766 v1.5_1.5 +f9a62f541f19ead9be4c3be896b64d1caa0b524c v1.5_1.4 +fc0bee49a07daf05f034560cfef81a8a8d034d1f v1.5_1.7 +096ed5f806b6dbc473fae1848643cf45005b9bf1 v1.7.0 +aaeb8099a24ad7db3f36ebe71ef326d6377730aa v1.7.1 +fd8ccc937af7280db4e581b2eb1354245f4672ab v1.8.0 +7839b0eab3e9daf5b346edfa5c54f3cc46fc202a v1.8.1 +6140b78317beabb6e49cd91b35a779ccb0af7327 v1.8.2 +c3b1c83c5ddada685b421b8f82f7e92c794bf2f6 v1.8.3 +460c1add9b9f89831e1ab965f1e1c31325f6e72d v1.8.4 +78165f4976299c37d6e3dd5463adcd61f9cb2b75 v1.8.5 diff --git a/pkgs/development/python-modules/ytmusicapi/default.nix b/pkgs/development/python-modules/ytmusicapi/default.nix index f84db4ff62424..1f211cd2872d9 100644 --- a/pkgs/development/python-modules/ytmusicapi/default.nix +++ b/pkgs/development/python-modules/ytmusicapi/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "ytmusicapi"; - version = "0.15.0"; + version = "0.15.1"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-pVQqoMvuuFc/1QNG5z/AspGlgIGPi9aqjZ3/3eVNhis="; + sha256 = "sha256-W/eZubJ/SNLBya1S6wLUwTwZCUD+wCQ5FAuNcSpl+9Y="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/ruby-modules/bundix/default.nix b/pkgs/development/ruby-modules/bundix/default.nix index 4eb06f76abaf7..17f5d6553f685 100644 --- a/pkgs/development/ruby-modules/bundix/default.nix +++ b/pkgs/development/ruby-modules/bundix/default.nix @@ -38,7 +38,7 @@ buildRubyGem rec { ''; homepage = "https://github.com/manveru/bundix"; license = "MIT"; - maintainers = with lib.maintainers; [ manveru zimbatm ]; + maintainers = with lib.maintainers; [ manveru marsam zimbatm ]; platforms = lib.platforms.all; }; } diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index f5ce1bbde7694..1622c6168606d 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -13,23 +13,18 @@ , file , libzip , xxHash -, gtk2 ? null -, vte ? null -, gtkdialog ? null -, python3 ? null -, ruby ? null -, lua ? null +, gtk2 +, vte +, gtkdialog +, python3 +, ruby +, lua , useX11 ? false , rubyBindings ? false , pythonBindings ? false , luaBindings ? false }: -assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null); -assert rubyBindings -> ruby != null; -assert pythonBindings -> python3 != null; - - let inherit (lib) optional; diff --git a/pkgs/development/tools/analysis/rizin/cutter.nix b/pkgs/development/tools/analysis/rizin/cutter.nix index 14d815f04b1e0..55795b9830cdd 100644 --- a/pkgs/development/tools/analysis/rizin/cutter.nix +++ b/pkgs/development/tools/analysis/rizin/cutter.nix @@ -35,8 +35,6 @@ mkDerivation rec { qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH") ''; - enableParallelBuilding = true; - meta = with lib; { description = "Free and Open Source Reverse Engineering Platform powered by rizin"; homepage = src.meta.homepage; diff --git a/pkgs/development/tools/analysis/rizin/default.nix b/pkgs/development/tools/analysis/rizin/default.nix index bbcc432ea9977..fdc8da7b5f80d 100644 --- a/pkgs/development/tools/analysis/rizin/default.nix +++ b/pkgs/development/tools/analysis/rizin/default.nix @@ -40,8 +40,6 @@ stdenv.mkDerivation rec { "-Duse_sys_tree_sitter=true" ]; - enableParallelBuilding = true; - nativeBuildInputs = [ pkg-config meson ninja cmake ]; buildInputs = [ diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index da5e11cce2c86..0ec9d3ea93e64 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, python3, fetchFromGitHub, git, pkg-config, fetchpatch }: +{ lib, stdenv, python3, fetchFromGitHub, git, pkg-config }: # Note: # Conan has specific dependency demands; check @@ -14,20 +14,6 @@ let newPython = python3.override { packageOverrides = self: super: { - distro = super.distro.overridePythonAttrs (oldAttrs: rec { - version = "1.1.0"; - src = oldAttrs.src.override { - inherit version; - sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j"; - }; - patches = oldAttrs.patches or [] ++ [ - # Don't raise import error on non-linux os. Remove after upgrading to distro≥1.2.0 - (fetchpatch { - url = "https://github.com/nir0s/distro/commit/25aa3f8c5934346dc838387fc081ce81baddeb95.patch"; - sha256 = "0m09ldf75gacazh2kr04cifgsqfxg670vk4ypl62zv7fp3nyd5dc"; - }) - ]; - }); node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec { version = "0.6.1"; src = oldAttrs.src.override { @@ -35,25 +21,25 @@ let newPython = python3.override { sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0"; }; }); - pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec { - version = "0.7"; + urllib3 = super.urllib3.overridePythonAttrs (oldAttrs: rec { + version = "1.25.11"; src = oldAttrs.src.override { inherit version; - sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8"; + sha256 = "18hpzh1am1dqx81fypn57r2wk565fi4g14292qrc5jm1h9dalzld"; }; }); }; }; in newPython.pkgs.buildPythonApplication rec { - version = "1.27.0"; + version = "1.35.0"; pname = "conan"; src = fetchFromGitHub { owner = "conan-io"; repo = "conan"; rev = version; - sha256 = "0ncqs1p4g23fmzgdmwppgxr8w275h38hgjdzs456cgivz8xs9rjl"; + sha256 = "19rgylkjxvv47vz5vgh46rw108xskpv7lmax8y2fnm2wd1j3bq9c"; }; propagatedBuildInputs = with newPython.pkgs; [ @@ -95,12 +81,7 @@ in newPython.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace conans/requirements.txt \ - --replace "PyYAML>=3.11, <3.14.0" "PyYAML" \ - --replace "deprecation>=2.0, <2.1" "deprecation" \ - --replace "idna==2.6" "idna" \ - --replace "cryptography>=1.3.4, <2.4.0" "cryptography" \ - --replace "pyOpenSSL>=16.0.0, <19.0.0" "pyOpenSSL" \ - --replace "six>=1.10.0,<=1.14.0" "six" + --replace "deprecation>=2.0, <2.1" "deprecation" ''; meta = with lib; { diff --git a/pkgs/development/tools/rust/cargo-deny/default.nix b/pkgs/development/tools/rust/cargo-deny/default.nix index 1225d78d71ebe..73e3cfd3c4ce9 100644 --- a/pkgs/development/tools/rust/cargo-deny/default.nix +++ b/pkgs/development/tools/rust/cargo-deny/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-deny"; - version = "0.8.9"; + version = "0.9.0"; src = fetchFromGitHub { owner = "EmbarkStudios"; repo = pname; rev = version; - sha256 = "sha256-K8lNo2XmHzgbaVCMNvwDwr86hrXBPws9v3HD8ku+D6w="; + sha256 = "sha256-ZjXAZN93ij42WVYSOgvKAzFZ/cZ2RTFKT2sr44j7TVc="; }; - cargoSha256 = "sha256-spTy9vzldzqu66904wRVwAeH1rNOQ3WeC6miJkRiAGg="; + cargoSha256 = "sha256-eQv9pFegHTjjjFURiD/yN/srtONAwAH3vwfrSY/LM/Q="; doCheck = false; |