Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-11-07 18:01:14 +00:00 committed by GitHub
commit 14f1b9f2ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 99655 additions and 13239 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,169 @@
{ config, pkgs, lib, ... }:
with lib;
{
options.proxmox = {
qemuConf = {
# essential configs
boot = mkOption {
type = types.str;
default = "";
example = "order=scsi0;net0";
description = ''
Default boot device. PVE will try all devices in its default order if this value is empty.
'';
};
scsihw = mkOption {
type = types.str;
default = "virtio-scsi-pci";
example = "lsi";
description = ''
SCSI controller type. Must be one of the supported values given in
<link xlink:href="https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines"/>
'';
};
virtio0 = mkOption {
type = types.str;
default = "local-lvm:vm-9999-disk-0";
example = "ceph:vm-123-disk-0";
description = ''
Configuration for the default virtio disk. It can be used as a cue for PVE to autodetect the target sotrage.
This parameter is required by PVE even if it isn't used.
'';
};
ostype = mkOption {
type = types.str;
default = "l26";
description = ''
Guest OS type
'';
};
cores = mkOption {
type = types.ints.positive;
default = 1;
description = ''
Guest core count
'';
};
memory = mkOption {
type = types.ints.positive;
default = 1024;
description = ''
Guest memory in MB
'';
};
# optional configs
name = mkOption {
type = types.str;
default = "nixos-${config.system.nixos.label}";
description = ''
VM name
'';
};
net0 = mkOption {
type = types.commas;
default = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1";
description = ''
Configuration for the default interface. When restoring from VMA, check the
"unique" box to ensure device mac is randomized.
'';
};
serial0 = mkOption {
type = types.str;
default = "socket";
example = "/dev/ttyS0";
description = ''
Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0),
or create a unix socket on the host side (use qm terminal to open a terminal connection).
'';
};
agent = mkOption {
type = types.bool;
apply = x: if x then "1" else "0";
default = true;
description = ''
Expect guest to have qemu agent running
'';
};
};
qemuExtraConf = mkOption {
type = with types; attrsOf (oneOf [ str int ]);
default = {};
example = literalExpression ''{
cpu = "host";
onboot = 1;
}'';
description = ''
Additional options appended to qemu-server.conf
'';
};
filenameSuffix = mkOption {
type = types.str;
default = config.proxmox.qemuConf.name;
example = "999-nixos_template";
description = ''
Filename of the image will be vzdump-qemu-''${filenameSuffix}.vma.zstd.
This will also determine the default name of the VM on restoring the VMA.
Start this value with a number if you want the VMA to be detected as a backup of
any specific VMID.
'';
};
};
config = let
cfg = config.proxmox;
cfgLine = name: value: ''
${name}: ${builtins.toString value}
'';
cfgFile = fileName: properties: pkgs.writeTextDir fileName ''
# generated by NixOS
${lib.concatStrings (lib.mapAttrsToList cfgLine properties)}
#qmdump#map:virtio0:drive-virtio0:local-lvm:raw:
'';
in {
system.build.VMA = import ../../lib/make-disk-image.nix {
name = "proxmox-${cfg.filenameSuffix}";
postVM = let
# Build qemu with PVE's patch that adds support for the VMA format
vma = pkgs.qemu_kvm.overrideAttrs ( super: {
patches = let
rev = "cc707c362ea5c8d832aac270d1ffa7ac66a8908f";
path = "debian/patches/pve/0025-PVE-Backup-add-vma-backup-format-code.patch";
vma-patch = pkgs.fetchpatch {
url = "https://git.proxmox.com/?p=pve-qemu.git;a=blob_plain;hb=${rev};f=${path}";
sha256 = "1z467xnmfmry3pjy7p34psd5xdil9x0apnbvfz8qbj0bf9fgc8zf";
};
in super.patches ++ [ vma-patch ];
buildInputs = super.buildInputs ++ [ pkgs.libuuid ];
});
in
''
${vma}/bin/vma create "vzdump-qemu-${cfg.filenameSuffix}.vma" \
-c ${cfgFile "qemu-server.conf" (cfg.qemuConf // cfg.qemuExtraConf)}/qemu-server.conf drive-virtio0=$diskImage
rm $diskImage
${pkgs.zstd}/bin/zstd "vzdump-qemu-${cfg.filenameSuffix}.vma"
mv "vzdump-qemu-${cfg.filenameSuffix}.vma.zst" $out/
'';
format = "raw";
inherit config lib pkgs;
};
boot = {
growPartition = true;
kernelParams = [ "console=ttyS0" ];
loader.grub.device = lib.mkDefault "/dev/vda";
loader.timeout = 0;
initrd.availableKernelModules = [ "uas" "virtio_blk" "virtio_pci" ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
services.qemuGuest.enable = lib.mkDefault true;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl, cmake, StormLib }:
stdenv.mkDerivation {
pname = "smpq";
version = "1.6";
src = fetchurl {
url = "https://launchpad.net/smpq/trunk/1.6/+download/smpq_1.6.orig.tar.gz";
sha256 = "1jqq5x3b17jy66x3kkf5hs5l322dx2v14djxxrqrnqp8bn5drlmm";
};
cmakeFlags = [
"-DWITH_KDE=OFF"
];
nativeBuildInputs = [ cmake ];
buildInputs = [ StormLib ];
meta = with lib; {
description = "StormLib MPQ archiving utility";
homepage = "https://launchpad.net/smpq";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; [ aanderse karolchmist ];
};
}

View file

@ -26,6 +26,7 @@ let
genericName = "File Synchronizer";
categories = "Network;FileTransfer;";
startupNotify = "false";
icon = "dropbox";
};
in

View file

@ -1,6 +1,6 @@
{
mkDerivation, lib,
extra-cmake-modules, kdoctools,
extra-cmake-modules, kdoctools, fetchpatch,
epoxy, lcms2, libICE, libSM, libcap, libdrm, libinput, libxkbcommon, mesa,
pipewire, udev, wayland, xcb-util-cursor, xwayland,
@ -40,6 +40,15 @@ mkDerivation {
./0002-xwayland.patch
./0003-plugins-qpa-allow-using-nixos-wrapper.patch
./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
# Pass special environments through arguemnts to `kwin_wayland`, bypassing
# ld.so(8) environment stripping due to `kwin_wayland`'s capabilities.
# We need this to have `TZDIR` correctly set for `plasmashell`, or
# everything related to timezone, like clock widgets, will be broken.
# https://invent.kde.org/plasma/kwin/-/merge_requests/1590
(fetchpatch {
url = "https://invent.kde.org/plasma/kwin/-/commit/9a008b223ad696db3bf5692750f2b74e578e08b8.diff";
sha256 = "sha256-f35G+g2MVABLDbAkCed3ZmtDWrzYn1rdD08mEx35j4k=";
})
];
CXXFLAGS = [
''-DNIXPKGS_XWAYLAND=\"${lib.getBin xwayland}/bin/Xwayland\"''

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchFromGitHub, cmake, bzip2, libtomcrypt, zlib }:
stdenv.mkDerivation rec {
pname = "StormLib";
version = "9.22";
src = fetchFromGitHub {
owner = "ladislav-zezula";
repo = "StormLib";
rev = "v${version}";
sha256 = "1rcdl6ryrr8fss5z5qlpl4prrw8xpbcdgajg2hpp0i7fpk21ymcc";
};
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DWITH_LIBTOMCRYPT=ON"
];
nativeBuildInputs = [ cmake ];
buildInputs = [ bzip2 libtomcrypt zlib ];
meta = with lib; {
homepage = "https://github.com/ladislav-zezula/StormLib";
license = licenses.mit;
description = "An open-source project that can work with Blizzard MPQ archives";
platforms = platforms.all;
maintainers = with maintainers; [ aanderse karolchmist ];
};
}

View file

@ -3,21 +3,26 @@
, fetchurl
, fetchFromGitHub
, fixDarwinDylibNames
, abseil-cpp
, autoconf
, aws-sdk-cpp
, boost
, brotli
, c-ares
, cmake
, crc32c
, curl
, flatbuffers
, gflags
, glog
, google-cloud-cpp
, grpc
, gtest
, jemalloc
, libnsl
, lz4
, minio
, nlohmann_json
, openssl
, perl
, protobuf
@ -33,9 +38,17 @@
, zstd
, enableShared ? !stdenv.hostPlatform.isStatic
, enableFlight ? !stdenv.isDarwin # libnsl is not supported on darwin
, enableS3 ? true
# boost/process is broken in 1.69 on darwin, but fixed in 1.70 and
# non-existent in older versions
# see https://github.com/boostorg/process/issues/55
, enableS3 ? (!stdenv.isDarwin) || (lib.versionOlder boost.version "1.69" || lib.versionAtLeast boost.version "1.70")
, enableGcs ? !stdenv.isDarwin # google-cloud-cpp is not supported on darwin
}:
assert lib.asserts.assertMsg
((enableS3 && stdenv.isDarwin) -> (lib.versionOlder boost.version "1.69" || lib.versionAtLeast boost.version "1.70"))
"S3 on Darwin requires Boost != 1.69";
let
arrow-testing = fetchFromGitHub {
owner = "apache";
@ -115,7 +128,14 @@ stdenv.mkDerivation rec {
libnsl
openssl
protobuf
] ++ lib.optionals enableS3 [ aws-sdk-cpp openssl ];
] ++ lib.optionals enableS3 [ aws-sdk-cpp openssl ]
++ lib.optionals enableGcs [
abseil-cpp
crc32c
curl
google-cloud-cpp
nlohmann_json
];
preConfigure = ''
patchShebangs build-support/
@ -152,6 +172,7 @@ stdenv.mkDerivation rec {
"-DPARQUET_BUILD_EXECUTABLES=ON"
"-DARROW_FLIGHT=${if enableFlight then "ON" else "OFF"}"
"-DARROW_S3=${if enableS3 then "ON" else "OFF"}"
"-DARROW_GCS=${if enableGcs then "ON" else "OFF"}"
] ++ lib.optionals (!enableShared) [
"-DARROW_TEST_LINKAGE=static"
] ++ lib.optionals stdenv.isDarwin [
@ -183,6 +204,9 @@ stdenv.mkDerivation rec {
"TestS3FS.OpenOutputStreamMetadata"
"TestS3FS.OpenOutputStreamSyncWrites"
"TestS3FSGeneric.*"
] ++ lib.optionals enableGcs [
"GcsFileSystem.FileSystemCompare"
"GcsIntegrationTest.*"
];
in
lib.optionalString doInstallCheck "-${builtins.concatStringsSep ":" filteredTests}";
@ -199,7 +223,7 @@ stdenv.mkDerivation rec {
''
runHook preInstallCheck
ctest -L unittest -V \
ctest -L unittest \
--exclude-regex '^(${builtins.concatStringsSep "|" excludedTests})$'
runHook postInstallCheck

View file

@ -15,8 +15,9 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-isl=system" ];
# Breaks the test cases
#enableParallelBuilding = true;
enableParallelBuilding = true;
# Breaks the test cases as it reuses 'cloog_temp' file name for different tests.
enableParallelChecking = false;
doCheck = true;

View file

@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
pname = "zydis";
version = "3.1.0";
version = "3.2.0";
src = fetchFromGitHub {
owner = "zyantific";
repo = "zydis";
rev = "bfee99f49274a0eec3ffea16ede3a5bda9cda88f";
sha256 = "0x2lpc33ynd0zzirdxp2lycvg3545wh1ssgy4qlv81471iwwzv6b";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-1XGELwMuFlIt6Z3+kfD6VAgDZOwhhCSG42dkYh7WLf8=";
};
nativeBuildInputs = [ cmake ];

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, attrs
, beautifulsoup4
, buildPythonPackage
@ -48,6 +49,11 @@ buildPythonPackage rec {
pytestCheckHook
pytest-xdist
];
disabledTests = lib.optionals stdenv.isDarwin [
# expected result is tailored towards the quirks of upstream's
# CI environment on darwin
"test_searchable_paths"
];
pythonImportsCheck = [
"commoncode"

View file

@ -1,41 +0,0 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, pythonAtLeast, setuptools
, transitions, websockets, passlib, docopt, pyyaml, nose }:
buildPythonPackage rec {
pname = "hbmqtt";
version = "0.9.6";
# https://github.com/beerfactory/hbmqtt/issues/223
disabled = !isPy3k || pythonAtLeast "3.9";
src = fetchPypi {
inherit pname version;
sha256 = "1n9c8yj11npiq9qxivwmfhib1qkjpcyw42a7q0w641bdrz3x6r37";
};
propagatedBuildInputs = [
transitions websockets passlib docopt pyyaml setuptools
];
postPatch = ''
# https://github.com/beerfactory/hbmqtt/pull/241
substituteInPlace hbmqtt/adapters.py \
--replace "websockets.protocol" "websockets.legacy.protocol"
# test tries to bind same port multiple times and fails
rm tests/test_client.py
'';
checkInputs = [ nose ];
checkPhase = ''
nosetests -e test_connect_tcp
'';
meta = with lib; {
homepage = "https://github.com/beerfactory/hbmqtt";
description = "MQTT client/broker using Python asynchronous I/O";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -1,32 +1,87 @@
{ lib, stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, SDL2_ttf, libsodium, pkg-config }:
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, fetchurl
, fetchzip
, cmake
, pkg-config
, gettext
, SDL2
, SDL2_image
, fmt
, libpng
, smpq
}:
let
# TODO: submit a PR upstream to allow system copies of these libraries where possible
asio = fetchurl {
url = "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz";
sha256 = "0vhb4cig40mm0a98i74grpmfkcmby8zxg6vqa38dpryxpgvp5fw8";
};
SDL_audiolib = fetchurl {
url = "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz";
sha256 = "0z4rizncp6gqsy72b3709zc9fr915wgcwnlx1fhhy7mrczsly630";
};
simpleini = fetchzip {
url = "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip";
sha256 = "07kf1jjbc9v04hsysa6v2wh1m9csf5qz0b1wmlkf9sj00kf47zj7";
};
in
stdenv.mkDerivation rec {
pname = "devilutionx";
version = "1.2.1";
version = "1.3.0";
src = fetchFromGitHub {
owner = "diasurgical";
repo = "devilutionX";
rev = version;
sha256 = "sha256-PgYlNO1p78d0uiL474bDJOL++SxJfeBLK65czdaylHU=";
sha256 = "0acrkqi0pr3cbr5i1a1vfrnxv1n3xmql5d86bm2gywvpdb94xads";
};
patches = [
# allow building with system SDL2_image instead of vendored version
# this patch can be removed on the next release of devilutionx
# see https://github.com/diasurgical/devilutionX/pull/3386
(fetchpatch {
url = "https://github.com/diasurgical/devilutionX/commit/41ff03e94c02477bffb2d62764e8624c0e06854d.patch";
sha256 = "1lrnb9d0dcdyd78rix5rl4p8kkwbnl91llr9fgb86ysm3q58qkvj";
})
];
postPatch = ''
substituteInPlace Source/init.cpp --replace "/usr/share/diasurgical/devilutionx/" "${placeholder "out"}/share/diasurgical/devilutionx/"
'';
NIX_CFLAGS_COMPILE = [
"-I${SDL2_ttf}/include/SDL2"
''-DTTF_FONT_PATH="${placeholder "out"}/share/fonts/truetype/CharisSILB.ttf"''
];
# download dependencies ahead of time
substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz" "${asio}"
substituteInPlace 3rdParty/SDL_audiolib/CMakeLists.txt --replace "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz" "${SDL_audiolib}"
substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip" "${simpleini}"
'';
cmakeFlags = [
"-DBINARY_RELEASE=ON"
"-DVERSION_NUM=${version}"
"-DPACKET_ENCRYPTION=OFF" # FIXME: build with libsodium
"-DDISABLE_ZERO_TIER=ON" # FIXME: build with libzt
];
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ libsodium SDL2 SDL2_mixer SDL2_ttf ];
nativeBuildInputs = [
cmake
pkg-config
gettext
smpq # used to build devilutionx.mpq
];
buildInputs = [
fmt
libpng
(SDL2.override { withStatic = true; })
SDL2_image
];
installPhase = ''
runHook preInstall
@ -36,10 +91,10 @@ stdenv.mkDerivation rec {
mv devilutionx.app $out/Applications
'' else ''
install -Dm755 -t $out/bin devilutionx
install -Dt $out/share/fonts/truetype ../Packaging/resources/CharisSILB.ttf
install -Dt $out/share/diasurgical/devilutionx ../Packaging/resources/devilutionx.mpq
# TODO: icons and .desktop (see Packages/{debian,fedora}/*)
install -Dm755 -t $out/share/diasurgical/devilutionx devilutionx.mpq
install -Dm755 -t $out/share/applications ../Packaging/nix/devilutionx-hellfire.desktop ../Packaging/nix/devilutionx.desktop
install -Dm755 ../Packaging/resources/icon.png $out/share/icons/hicolor/512x512/apps/devilution.png
install -Dm755 ../Packaging/resources/hellfire.png $out/share/icons/hicolor/512x512/apps/devilution-hellfire.png
'') + ''
runHook postInstall
@ -50,7 +105,7 @@ stdenv.mkDerivation rec {
description = "Diablo build for modern operating systems";
longDescription = "In order to play this game a copy of diabdat.mpq is required. Place a copy of diabdat.mpq in ~/.local/share/diasurgical/devilution before executing the game.";
license = licenses.unlicense;
maintainers = [ maintainers.karolchmist ];
maintainers = with maintainers; [ karolchmist aanderse ];
platforms = platforms.linux ++ platforms.windows;
};
}

View file

@ -10,22 +10,22 @@
"version": "1.1.45"
},
"stable": {
"name": "factorio_alpha_x64-1.1.42.tar.xz",
"name": "factorio_alpha_x64-1.1.46.tar.xz",
"needsAuth": true,
"sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm",
"sha256": "sha256-ikvtD5X0WRBVMsByXLXC5jtVZeIFQIsWlZ9vzomYdGU=",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/1.1.42/alpha/linux64",
"version": "1.1.42"
"url": "https://factorio.com/get-download/1.1.46/alpha/linux64",
"version": "1.1.46"
}
},
"demo": {
"stable": {
"name": "factorio_demo_x64-1.1.42.tar.xz",
"name": "factorio_demo_x64-1.1.46.tar.xz",
"needsAuth": false,
"sha256": "155m1ijdbc7szhpdw8f8g82ysd7av9zb6llqq4z96nn834px9m2d",
"sha256": "sha256-CJVk1b3GXqs8xV2a7Pa6p6JxEOy86xAnRfz6kphCDHk=",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/1.1.42/demo/linux64",
"version": "1.1.42"
"url": "https://factorio.com/get-download/1.1.46/demo/linux64",
"version": "1.1.46"
}
},
"headless": {
@ -38,12 +38,12 @@
"version": "1.1.45"
},
"stable": {
"name": "factorio_headless_x64-1.1.42.tar.xz",
"name": "factorio_headless_x64-1.1.46.tar.xz",
"needsAuth": false,
"sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422",
"sha256": "sha256-xJ/NBwQR6tdwoAz/1RZmcGwutqETWgzyAlpg5ls2ba0=",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/1.1.42/headless/linux64",
"version": "1.1.42"
"url": "https://factorio.com/get-download/1.1.46/headless/linux64",
"version": "1.1.46"
}
}
}

View file

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "4.19.215";
version = "4.19.216";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1czjqa5wbsmzgl7wwqlp9qbdig45ibq11m9pcykrjaclrgwn884y";
sha256 = "0cs8yy5jfbvvi5j9f3kzyc4j0fjylxdj1641f53ga6gkmjmayv3d";
};
} // (args.argsOverride or {}))

View file

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.10.77";
version = "5.10.78";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "1hwgbcfv9wfx9ka25lsqjrnzskynfgmswcyp5vk14wnxq7glxdnk";
sha256 = "03q5lrv8gr9hnm7984pxi9kwsvxrn21qwykj60amisi2wac6r05y";
};
} // (args.argsOverride or {}))

View file

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.14.16";
version = "5.14.17";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "005wis2y5dhksb6n0r4p3xjldppmdnd360dhxa04rfc4z2qwn3f3";
sha256 = "0q7df51yk6di1m8ky0gplkyx6smlr9inxrd569qv3ww3ykg933sd";
};
} // (args.argsOverride or { }))

View file

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.15";
version = "5.15.1";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "sha256-V7LPaZGRDjtnobNJACLooGdLaWXHTBLaHpnRONGZHug=";
sha256 = "1j0lnrsj5y2bsmmym8pjc5wk4wb11y336zr9gad1nmxcr0rwvz9j";
};
} // (args.argsOverride or { }))

View file

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.4.157";
version = "5.4.158";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0jl62j22vs59bc90mvzavv0ii9hvk436pbnrpqf3x9f8nfybngwz";
sha256 = "0ncdkf1iz49458k3dvq3dc5b2r9dp21jsn3ffm9lbhlgvkn8y0bf";
};
} // (args.argsOverride or {}))

View file

@ -1,6 +1,9 @@
{ stdenv
, lib
, go
, pkgs
, nodejs
, nodePackages
, buildGoModule
, fetchFromGitHub
, mkYarnPackage
@ -9,27 +12,59 @@
}:
let
version = "2.27.1";
version = "2.30.3";
src = fetchFromGitHub {
rev = "v${version}";
owner = "prometheus";
repo = "prometheus";
sha256 = "0836ygyvld5skjycd7366i6vyf451s6cay5ng6c2fwq0skvp2gj2";
sha256 = "1as6x5bsp7mxa4rp7jhyjlpcvzqm1zngnwvp73rc4rwhz8w8vm3k";
};
goPackagePath = "github.com/prometheus/prometheus";
webui = mkYarnPackage {
src = "${src}/web/ui/react-app";
packageJSON = ./webui-package.json;
yarnNix = ./webui-yarndeps.nix;
codemirrorNode = import ./webui/codemirror-promql {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
webuiNode = import ./webui/webui {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
# The standard yarn2nix directory management causes build failures with
# Prometheus's webui due to using relative imports into node_modules. Use
# an extremely simplified version of it instead.
configurePhase = "ln -s $node_modules node_modules";
buildPhase = "PUBLIC_URL=. yarn build";
codemirror = stdenv.mkDerivation {
name = "prometheus-webui-codemirror-promql";
src = "${src}/web/ui/module/codemirror-promql";
buildInputs = [ nodejs nodePackages.typescript codemirrorNode.nodeDependencies ];
configurePhase = ''
ln -s ${codemirrorNode.nodeDependencies}/lib/node_modules node_modules
'';
buildPhase = ''
PUBLIC_URL=. npm run build
'';
installPhase = ''
mkdir -p $out
mv lib dist $out
'';
distPhase = ":";
};
webui = stdenv.mkDerivation {
name = "prometheus-webui";
src = "${src}/web/ui/react-app";
buildInputs = [ nodejs webuiNode.nodeDependencies ];
# create `node_modules/.cache` dir (we need writeable .cache)
# and then copy the rest over.
configurePhase = ''
mkdir -p node_modules/{.cache,.bin}
cp -a ${webuiNode.nodeDependencies}/lib/node_modules/. node_modules
'';
buildPhase = "PUBLIC_URL=. npm run build";
installPhase = "mv build $out";
distPhase = "true";
};
@ -38,13 +73,23 @@ buildGoModule rec {
pname = "prometheus";
inherit src version;
vendorSha256 = "0dq3p7hga7m1aq78har5rr136hlb0kp8zhh2wzqlkxrk1f33w54p";
vendorSha256 = "0qyv8vybx5wg8k8hwvrpp4hz9wv6g4kf9sq5v5qc2bxx6apc0s9r";
excludedPackages = [ "documentation/prometheus-mixin" ];
nativeBuildInputs = [ nodejs ];
postPatch = ''
ln -s ${webui.node_modules} web/ui/react-app/node_modules
# we don't want this anyways, as we
# build modules for them
echo "exit 0" > web/ui/module/build.sh
ln -s ${webuiNode.nodeDependencies}/lib/node_modules web/ui/react-app/node_modules
ln -s ${webui} web/ui/static/react
# webui-codemirror
ln -s ${codemirror}/dist web/ui/module/codemirror-promql/dist
ln -s ${codemirror}/lib web/ui/module/codemirror-promql/lib
'';
tags = [ "builtinassets" ];

View file

@ -1,20 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../.. -i bash -p wget yarn2nix-moretea.yarn2nix
# This script is based upon:
# pkgs/applications/networking/instant-messengers/riot/update-riot-desktop.sh
set -euo pipefail
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates the Yarn dependency lock files for the prometheus package."
echo "Usage: $0 <git release tag>"
exit 1
fi
PROM_WEB_SRC="https://raw.githubusercontent.com/prometheus/prometheus/$1"
wget "$PROM_WEB_SRC/web/ui/react-app/package.json" -O webui-package.json
wget "$PROM_WEB_SRC/web/ui/react-app/yarn.lock" -O yarn.lock
yarn2nix --lockfile=yarn.lock > webui-yarndeps.nix
rm yarn.lock

File diff suppressed because it is too large Load diff

View file

@ -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 ../../../../../development/node-packages/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;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,93 @@
{
"name": "codemirror-promql",
"version": "0.17.0",
"description": "a CodeMirror mode for the PromQL language",
"main": "cjs/index.js",
"module": "esm/index.js",
"scripts": {
"start": "webpack-dev-server --config webpack.config.cjs --open",
"build": "npm run build:grammar && npm run build:lib && npm run build:app",
"build:grammar": "lezer-generator src/lang-promql/grammar/promql.grammar -o src/lang-promql/grammar/parser",
"build:lib": "bash ./build.sh",
"build:app": "webpack --config webpack.config.cjs",
"test": "npm run build:grammar && ts-mocha -p tsconfig.json src/**/*.test.ts",
"test-coverage": "npm run build:grammar && nyc ts-mocha -p ./tsconfig.json ./**/*.test.ts",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "eslint src/ --ext .ts",
"lint:fix": "eslint --fix src/ --ext .ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/prometheus-community/codemirror-promql.git"
},
"keywords": [
"promql",
"codemirror",
"mode",
"prometheus"
],
"author": "Prometheus Authors <prometheus-developers@googlegroups.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/prometheus-community/codemirror-promql/issues"
},
"homepage": "https://github.com/prometheus-community/codemirror-promql/blob/master/README.md",
"dependencies": {
"lru-cache": "^6.0.0"
},
"devDependencies": {
"@codemirror/autocomplete": "^0.18.3",
"@codemirror/basic-setup": "^0.18.0",
"@codemirror/highlight": "^0.18.3",
"@codemirror/language": "^0.18.0",
"@codemirror/lint": "^0.18.1",
"@codemirror/state": "^0.18.2",
"@codemirror/view": "^0.18.1",
"@types/chai": "^4.2.12",
"@types/lru-cache": "^5.1.0",
"@types/mocha": "^8.0.3",
"@types/node": "^14.0.13",
"@typescript-eslint/eslint-plugin": "^2.22.0",
"@typescript-eslint/parser": "^2.22.0",
"chai": "^4.2.0",
"clean-webpack-plugin": "^3.0.0",
"codecov": "^3.8.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"html-webpack-plugin": "^4.3.0",
"isomorphic-fetch": "^3.0.0",
"lezer": "^0.13.1",
"lezer-generator": "^0.13.1",
"mocha": "^8.1.2",
"nock": "^13.0.11",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"ts-loader": "^7.0.4",
"ts-mocha": "^8.0.0",
"ts-node": "^9.0.0",
"typescript": "^4.2.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0"
},
"peerDependencies": {
"@codemirror/autocomplete": "^0.18.3",
"@codemirror/highlight": "^0.18.3",
"@codemirror/language": "^0.18.0",
"@codemirror/lint": "^0.18.1",
"@codemirror/state": "^0.18.2",
"@codemirror/view": "^0.18.1",
"lezer": "^0.13.0"
},
"prettier": {
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 150
},
"engines": {
"node": ">=12.0.0"
}
}

View file

@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
set -euo pipefail
if [[ "$#" -ne 1 || "$1" == -* ]]; then
echo "Regenerates the npm dependency lock files for the prometheus package."
echo "Usage: $0 <git release tag>"
exit 1
fi
update() {
RELEASE_TAG=$1
GIT_PATH=$2
OUTPUT_PATH=$3
NODE_ENV=$4
PROM_WEB_SRC="https://raw.githubusercontent.com/prometheus/prometheus/$1"
wget "$PROM_WEB_SRC/$GIT_PATH/package.json" -O package.json
wget "$PROM_WEB_SRC/$GIT_PATH/package-lock.json" -O package-lock.json
node2nix \
--lock package-lock.json \
--development \
--node-env $NODE_ENV \
--no-copy-node-env
mkdir -p $OUTPUT_PATH
mv default.nix node-packages.nix package.json package-lock.json $OUTPUT_PATH
}
update $1 "web/ui/module/codemirror-promql" "codemirror-promql" ../../../../../development/node-packages/node-env.nix
update $1 "web/ui/react-app" "webui" ../../../../../development/node-packages/node-env.nix

View file

@ -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 ../../../../../development/node-packages/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;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -19,13 +19,11 @@
"@fortawesome/fontawesome-svg-core": "^1.2.14",
"@fortawesome/free-solid-svg-icons": "^5.7.1",
"@fortawesome/react-fontawesome": "^0.1.4",
"@reach/router": "^1.2.1",
"@nexucis/fuzzy": "^0.3.0",
"bootstrap": "^4.6.0",
"codemirror-promql": "^0.15.0",
"codemirror-promql": "^0.17.0",
"css.escape": "^1.5.1",
"downshift": "^3.4.8",
"enzyme-to-json": "^3.4.3",
"fuzzy": "^0.1.3",
"i": "^0.3.6",
"jquery": "^3.5.1",
"jquery.flot.tooltip": "^0.9.0",
@ -37,20 +35,19 @@
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.7.0",
"react-resize-detector": "^5.0.7",
"react-scripts": "3.4.4",
"react-router-dom": "^5.2.1",
"react-test-renderer": "^16.9.0",
"reactstrap": "^8.9.0",
"sanitize-html": "^2.3.3",
"sass": "1.32.10",
"sass": "1.39.0",
"tempusdominus-bootstrap-4": "^5.1.2",
"tempusdominus-core": "^5.0.3",
"typescript": "^3.3.3",
"use-media": "^1.4.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --runInBand",
"test": "react-scripts test --runInBand --resetMocks=false",
"test:debug": "react-scripts --inspect-brk test --runInBand --no-cache",
"eject": "react-scripts eject",
"lint:ci": "eslint --quiet \"src/**/*.{ts,tsx}\"",
@ -71,36 +68,31 @@
"@testing-library/react-hooks": "^3.1.1",
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/flot": "0.0.31",
"@types/jest": "^26.0.10",
"@types/flot": "0.0.32",
"@types/jest": "^27.0.0",
"@types/jquery": "^3.5.1",
"@types/moment-timezone": "^0.5.10",
"@types/node": "^12.11.1",
"@types/reach__router": "^1.2.6",
"@types/react": "^16.8.2",
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^16.8.0",
"@types/react-resize-detector": "^5.0.0",
"@types/react-router-dom": "^5.1.8",
"@types/reactstrap": "^8.7.2",
"@types/sanitize-html": "^1.20.2",
"@types/sinon": "^9.0.4",
"@typescript-eslint/eslint-plugin": "2.x",
"@typescript-eslint/parser": "2.x",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "6.x",
"eslint-config-prettier": "^6.4.0",
"eslint-config-react-app": "^5.0.2",
"eslint-plugin-flowtype": "4.x",
"eslint-plugin-import": "2.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "7.x",
"eslint-plugin-react-hooks": "2.x",
"enzyme-to-json": "^3.4.3",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-prettier": "^4.0.0",
"jest-fetch-mock": "^3.0.3",
"mutationobserver-shim": "^0.3.7",
"prettier": "^1.18.2",
"sinon": "^9.0.3"
"prettier": "^2.3.2",
"react-scripts": "4.0.3",
"sinon": "^9.0.3",
"typescript": "^4.4.2"
},
"proxy": "http://localhost:9090",
"jest": {
@ -110,5 +102,8 @@
"transformIgnorePatterns": [
"/node_modules/(?!codemirror-promql).+(js|jsx)$"
]
},
"optionalDependencies": {
"fsevents": "^2.3.2"
}
}

View file

@ -35,7 +35,7 @@
, enableMDNS ? false, avahi
, enableDomainController ? false, gpgme, lmdb
, enableRegedit ? true, ncurses
, enableCephFS ? false, libceph
, enableCephFS ? false, ceph
, enableGlusterFS ? false, glusterfs, libuuid
, enableAcl ? (!stdenv.isDarwin), acl
, enablePam ? (!stdenv.isDarwin), pam
@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
++ optional enableMDNS avahi
++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ]
++ optional enableRegedit ncurses
++ optional (enableCephFS && stdenv.isLinux) libceph
++ optional (enableCephFS && stdenv.isLinux) (lib.getDev ceph)
++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ]
++ optional enableAcl acl
++ optional enablePam pam;

View file

@ -1,34 +1,49 @@
{lib, stdenv, fetchurl}:
{ lib
, stdenv
, fetchurl
, unzip
}:
let
folder = if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
platforms = {
aarch64-linux = { folder = "aarch64"; ld-linux = "ld-linux-aarch64.so.1"; };
armv7l-linux = { folder = "armv7"; ld-linux = "ld-linux-armhf.so.3"; };
i686-linux = { folder = "i686"; ld-linux = "ld-linux.so.2"; };
x86_64-darwin = { folder = "."; };
x86_64-linux = { folder = "amd64"; ld-linux = "ld-linux-x86-64.so.2"; };
};
platform = platforms."${stdenv.hostPlatform.system}"
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
download = if stdenv.isDarwin
then { extension = "macos.zip"; hash = "sha256-MnL6lH7q/BrACG4fFJNfnvoh0JClVeaJIlX+XIj2aG4="; }
else { extension = "linux.tar.gz"; hash = "sha256-rDi7pvDeKQM96GZTjDr6ZDQTGbaVu+OI77xf2egw6Sg="; };
in
stdenv.mkDerivation rec {
pname = "pngout";
version = "20150319";
version = "20200115";
src = fetchurl {
url = "http://static.jonof.id.au/dl/kenutils/pngout-${version}-linux.tar.gz";
sha256 = "0iwv941hgs2g7ljpx48fxs24a70m2whrwarkrb77jkfcd309x2h7";
inherit (download) hash;
url = "http://static.jonof.id.au/dl/kenutils/pngout-${version}-${download.extension}";
};
nativeBuildInputs = lib.optionals stdenv.isDarwin [ unzip ];
# pngout is code-signed on Darwin, so dont alter the binary to avoid breaking the signature.
dontFixup = stdenv.isDarwin;
installPhase = ''
mkdir -p $out/bin
cp ${folder}/pngout $out/bin
${if stdenv.hostPlatform.system == "i686-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout
'' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
'' else ""}
cp ${platform.folder}/pngout $out/bin
'' + lib.optionalString stdenv.isLinux ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/${platform.ld-linux} $out/bin/pngout
'';
meta = {
description = "A tool that aggressively optimizes the sizes of PNG images";
license = lib.licenses.unfree;
license = lib.licenses.unfreeRedistributable;
homepage = "http://advsys.net/ken/utils.htm";
platforms = lib.attrNames platforms;
maintainers = [ lib.maintainers.sander ];
};
}

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "exploitdb";
version = "2021-11-05";
version = "2021-11-06";
src = fetchFromGitHub {
owner = "offensive-security";
repo = pname;
rev = version;
sha256 = "sha256-G+toeAMnP26Wzs5gPeT+YKJ8uiy/mgFwBGxDY9w0qyM=";
sha256 = "sha256-pyzK6Z62gvuvi8FilNySyp78i4A2SLSFLY8WsSNdFQ0=";
};
nativeBuildInputs = [ makeWrapper ];

View file

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace src/makefile --replace "CC=g++" "CC=c++"
# avoid timestamp non-determinism with '-n'
substituteInPlace makefile --replace 'gzip -9f' 'gzip -9nf'
'';
makeFlags = [

View file

@ -9448,6 +9448,8 @@ with pkgs;
smu = callPackage ../tools/text/smu { };
smpq = callPackage ../applications/misc/smpq { };
sn0int = callPackage ../tools/security/sn0int { };
snabb = callPackage ../tools/networking/snabb { };
@ -19553,6 +19555,8 @@ with pkgs;
stb = callPackage ../development/libraries/stb { };
StormLib = callPackage ../development/libraries/StormLib { };
stxxl = callPackage ../development/libraries/stxxl { parallel = true; };
sqlite = lowPrio (callPackage ../development/libraries/sqlite { });

View file

@ -55,6 +55,7 @@ mapAliases ({
googleapis_common_protos = googleapis-common-protos; # added 2021-03-19
grpc_google_iam_v1 = grpc-google-iam-v1; # added 2021-08-21
HAP-python = hap-python; # added 2021-06-01
hbmqtt = throw "hbmqtt was removed because it is no longer maintained"; # added 2021-11-07
IMAPClient = imapclient; # added 2021-10-28
jupyter_client = jupyter-client; # added 2021-10-15
lammps-cython = throw "lammps-cython no longer builds and is unmaintained"; # added 2021-07-04

View file

@ -3452,8 +3452,6 @@ in {
hawkauthlib = callPackage ../development/python-modules/hawkauthlib { };
hbmqtt = callPackage ../development/python-modules/hbmqtt { };
hcloud = callPackage ../development/python-modules/hcloud { };
hcs_utils = callPackage ../development/python-modules/hcs_utils { };