push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{
lib,
fetchFromGitHub,
python3Packages,
pkgs,
}:
python3Packages.buildPythonApplication rec {
pname = "dr14_tmeter";
version = "1.0.16";
format = "setuptools";
disabled = !python3Packages.isPy3k;
src = fetchFromGitHub {
owner = "simon-r";
repo = "dr14_t.meter";
rev = "v${version}";
sha256 = "1nfsasi7kx0myxkahbd7rz8796mcf5nsadrsjjpx2kgaaw5nkv1m";
};
propagatedBuildInputs = with pkgs; [
python3Packages.numpy
flac
vorbis-tools
ffmpeg
faad2
lame
];
# There are no tests
doCheck = false;
meta = with lib; {
description = "Compute the DR14 of a given audio file according to the procedure described by the Pleasurize Music Foundation";
mainProgram = "dr14_tmeter";
license = licenses.gpl3Plus;
homepage = "http://dr14tmeter.sourceforge.net/";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
gnugrep,
gnused,
curl,
mpv,
aria2,
ffmpeg,
fzf,
openssl,
}:
stdenvNoCC.mkDerivation {
pname = "dra-cla";
version = "3.0.5";
src = fetchFromGitHub {
owner = "CoolnsX";
repo = "dra-cla";
# upstream is not tagging releases
rev = "68e9868354bd9fefa72dbe1e7991bc1f6d184aa2";
hash = "sha256-CF9XSbkhTrfNE6iR6Q/VWA8x0eDxRKy0Bz0YUuOEEt4=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
install -Dm755 dra-cla $out/bin/dra-cla
wrapProgram $out/bin/dra-cla \
--prefix PATH : ${
lib.makeBinPath [
gnugrep
gnused
curl
mpv
aria2
ffmpeg
fzf
openssl
]
}
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/CoolnsX/dra-cla";
description = "Cli tool to browse and play korean drama, chinese drama";
license = licenses.gpl3Only;
maintainers = with maintainers; [ idlip ];
platforms = platforms.unix;
mainProgram = "dra-cla";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
jdupes,
}:
stdenvNoCC.mkDerivation {
pname = "dracula-icon-theme";
version = "0-unstable-2024-05-26";
src = fetchFromGitHub {
owner = "m4thewz";
repo = "dracula-icons";
rev = "6232e5217429a3ae6396c9e054f5338cecdbb7a5";
hash = "sha256-u2cIUTLWYs8VIqg6ZAUyz0nmzuFAZC4oh7bE67+B1Vg=";
};
nativeBuildInputs = [
jdupes
];
dontDropIconThemeCache = true;
dontPatchELF = true;
dontRewriteSymlinks = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons/Dracula
cp -a * $out/share/icons/Dracula/
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
'';
meta = with lib; {
description = "Dracula Icon theme";
homepage = "https://github.com/m4thewz/dracula-icons";
platforms = platforms.linux;
license = licenses.gpl3Only;
maintainers = with maintainers; [ therealr5 ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "dracula-theme";
version = "0-unstable-2022-05-21";
src = fetchFromGitHub {
owner = "dracula";
repo = "qt5";
rev = "7b25ee305365f6e62efb2c7aca3b4635622b778c";
hash = "sha256-tfUjAb+edbJ+5qar4IxWr4h3Si6MIwnbCrwI2ZdUFAM=";
};
installPhase = ''
runHook preInstall
install -D Dracula.conf $out/share/qt5ct/colors/Dracula.conf
runHook postInstall
'';
meta = with lib; {
description = "Dark theme for qt5";
homepage = "https://github.com/dracula/qt5";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ vonfry ];
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
unstableGitUpdater,
gtk-engine-murrine,
}:
let
themeName = "Dracula";
version = "4.0.0-unstable-2025-09-18";
in
stdenvNoCC.mkDerivation {
pname = "dracula-theme";
inherit version;
src = fetchFromGitHub {
owner = "dracula";
repo = "gtk";
rev = "ec0442da9551a4a71801dab101a38fd6972da649";
hash = "sha256-P6164Tl9C80QaUXmHaOX+OIRIQPKpwI8o9yiO+o5KNc=";
};
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/themes/${themeName}
cp -a {assets,cinnamon,gnome-shell,gtk-2.0,gtk-3.0,gtk-3.20,gtk-4.0,index.theme,metacity-1,unity,xfwm4} $out/share/themes/${themeName}
cp -a kde/{color-schemes,plasma} $out/share/
cp -a kde/kvantum $out/share/Kvantum
mkdir -p $out/share/aurorae/themes
cp -a kde/aurorae/* $out/share/aurorae/themes/
mkdir -p $out/share/sddm/themes
cp -a kde/sddm/* $out/share/sddm/themes/
mkdir -p $out/share/icons/Dracula-cursors
mv kde/cursors/Dracula-cursors/index.theme $out/share/icons/Dracula-cursors/cursor.theme
mv kde/cursors/Dracula-cursors/cursors $out/share/icons/Dracula-cursors/cursors
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater {
tagPrefix = "v";
};
meta = with lib; {
description = "Dracula variant of the Ant theme";
homepage = "https://github.com/dracula/gtk";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ alexarice ];
};
}

View File

@@ -0,0 +1,119 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
makeBinaryWrapper,
pkg-config,
asciidoc,
libxslt,
docbook_xsl,
bash,
kmod,
binutils,
bzip2,
coreutils,
cpio,
findutils,
gnugrep,
gnused,
gnutar,
gzip,
lz4,
lzop,
squashfsTools,
util-linux,
xz,
zstd,
}:
stdenv.mkDerivation rec {
pname = "dracut";
version = "059";
src = fetchFromGitHub {
owner = "dracutdevs";
repo = "dracut";
rev = version;
hash = "sha256-zSyC2SnSQkmS/mDpBXG2DtVVanRRI9COKQJqYZZCPJM=";
};
strictDeps = true;
buildInputs = [
bash
kmod
];
nativeBuildInputs = [
makeBinaryWrapper
pkg-config
asciidoc
libxslt
docbook_xsl
];
postPatch = ''
substituteInPlace dracut.sh \
--replace 'dracutbasedir="$dracutsysrootdir"/usr/lib/dracut' 'dracutbasedir="$dracutsysrootdir"'"$out/lib/dracut"
substituteInPlace lsinitrd.sh \
--replace 'dracutbasedir=/usr/lib/dracut' "dracutbasedir=$out/lib/dracut"
echo 'DRACUT_VERSION=${version}' >dracut-version.sh
'';
postFixup = ''
wrapProgram $out/bin/dracut --prefix PATH : ${
lib.makeBinPath [
coreutils
util-linux
]
} --suffix DRACUT_PATH : ${
lib.makeBinPath [
bash
binutils
coreutils
findutils
gnugrep
gnused
gnutar
stdenv.cc.libc # for ldd command
util-linux
]
}
wrapProgram $out/bin/dracut-catimages --set PATH ${
lib.makeBinPath [
coreutils
cpio
findutils
gzip
]
}
wrapProgram $out/bin/lsinitrd --set PATH ${
lib.makeBinPath [
binutils
bzip2
coreutils
cpio
gnused
gzip
lz4
lzop
squashfsTools
util-linux
xz
zstd
]
}
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
homepage = "https://github.com/dracutdevs/dracut/wiki";
description = "Event driven initramfs infrastructure";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "drafting-mono";
version = "1.1-unstable-2024-06-04";
src = fetchFromGitHub {
owner = "indestructible-type";
repo = "Drafting";
rev = "c387df13576c3b541352725b021f9f99302e52d6";
hash = "sha256-J64mmDOzTV4MRuZO3MB2SSX5agCRjLDjXAPXuDfdlOM=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp fonts/*/*.otf $out/share/fonts/truetype
runHook postInstall
'';
meta = {
homepage = "https://indestructibletype.com/Drafting/";
description = "Drafting* Mono a mixed serif typewriter inspired font by indestructible type*";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ gavink97 ];
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/src/lib/map/Mapper.cpp b/src/lib/map/Mapper.cpp
index 6eaa2c5..781988c 100644
--- a/src/lib/map/Mapper.cpp
+++ b/src/lib/map/Mapper.cpp
@@ -22,6 +22,7 @@
//#include "common/Crc32Hw.hpp"
#include "common/DragenLogger.hpp"
#include "map/Mapper.hpp"
+#include <boost/range/iterator_range.hpp>
namespace dragenos {
namespace map {

View File

@@ -0,0 +1,60 @@
diff --git a/src/include/map/SeedPosition.hpp b/src/include/map/SeedPosition.hpp
index 30a7d47..c05af16 100644
--- a/src/include/map/SeedPosition.hpp
+++ b/src/include/map/SeedPosition.hpp
@@ -16,6 +16,7 @@
#define MAP_SEED_POSITION_HPP
#include <ostream>
+#include <cstdint>
#include "sequences/Seed.hpp"
diff --git a/src/include/sequences/Read.hpp b/src/include/sequences/Read.hpp
index 460c1cb..c7ff619 100644
--- a/src/include/sequences/Read.hpp
+++ b/src/include/sequences/Read.hpp
@@ -16,6 +16,7 @@
#define SEQUENCES_READ_HPP
#include <iostream>
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/src/include/sequences/Seed.hpp b/src/include/sequences/Seed.hpp
index a242153..dd4d23b 100644
--- a/src/include/sequences/Seed.hpp
+++ b/src/include/sequences/Seed.hpp
@@ -16,6 +16,7 @@
#define SEQUENCES_SEED_HPP
#include <ostream>
+#include <cstdint>
#include <vector>
#include "sequences/Read.hpp"
diff --git a/src/lib/sequences/tests/unit/CrcHasherMocks.hpp b/src/lib/sequences/tests/unit/CrcHasherMocks.hpp
index 1866be7..5d9b7d7 100644
--- a/src/lib/sequences/tests/unit/CrcHasherMocks.hpp
+++ b/src/lib/sequences/tests/unit/CrcHasherMocks.hpp
@@ -2,6 +2,7 @@
#include <array>
#include <cassert>
+#include <cstdint>
#include <cstdlib>
#include <string>
diff --git a/stubs/dragen/src/host/dragen_api/read_group_list.hpp b/stubs/dragen/src/host/dragen_api/read_group_list.hpp
index eefb9ae..623a77f 100644
--- a/stubs/dragen/src/host/dragen_api/read_group_list.hpp
+++ b/stubs/dragen/src/host/dragen_api/read_group_list.hpp
@@ -14,6 +14,7 @@
#define __READ_GROUP_LIST_HPP__
#include "dragen_exception.hpp"
+#include <cstdint>
class ReadGroupList {
public:
const std::string &getReadGroupName(const uint16_t idx) const {

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchFromGitHub,
boost,
gtest,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dragmap";
version = "1.3.0";
src = fetchFromGitHub {
owner = "Illumina";
repo = "DRAGMAP";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-f1jsOErriS1I/iUS4CzJ3+Dz8SMUve/ccb3KaE+L7U8=";
};
nativebuildInputs = [ boost ];
buildInputs = [
gtest
zlib
];
patches = [
# pclose is called on a NULL value. This is no longer allowed since
# https://github.com/bminor/glibc/commit/64b1a44183a3094672ed304532bedb9acc707554
./stdio-pclose.patch
# Add missing include cstdint. Upstream does not accept PR. Issue opened at
# https://github.com/Illumina/DRAGMAP/issues/63
./cstdint.patch
# Missing import in Mapper.cpp
# Issue opened upstream https://github.com/Illumina/DRAGMAP/pull/66
./boost-iterator-range.patch
];
env = {
GTEST_INCLUDEDIR = "${gtest.dev}/include";
CPPFLAGS = "-I ${boost.dev}/include";
LDFLAGS = "-L ${boost.out}/lib";
};
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp build/release/dragen-os $out/bin/
runHook postInstall
'';
# Tests are launched by default from makefile
doCheck = false;
meta = {
description = "Open Source version of Dragen mapper for genomics";
mainProgram = "dragen-os";
longDescription = ''
DRAGMAP is an open-source software implementation of the DRAGEN mapper,
which the Illumina team created to procude the same results as their
proprietary DRAGEN hardware.
'';
homepage = "https://github.com/Illumina/DRAGMAP";
changelog = "https://github.com/Illumina/DRAGMAP/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ apraga ];
};
})

View File

@@ -0,0 +1,12 @@
diff --git a/stubs/dragen/src/host/infra/linux/infra_linux_utils.cpp b/stubs/dragen/src/host/infra/linux/infra_linux_utils.cpp
index cd02cd4..c26e9cf 100644
--- a/stubs/dragen/src/host/infra/linux/infra_linux_utils.cpp
+++ b/stubs/dragen/src/host/infra/linux/infra_linux_utils.cpp
@@ -57,7 +57,6 @@ int GetDmiValue(const std::string& label, std::string& value)
FILE* dmiOutput = popen("sudo /usr/sbin/dmidecode -t 2", "r");
if (dmiOutput == NULL) {
perror("dmidecode popen");
- pclose(dmiOutput);
return -1;
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
gtk3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dragon-drop";
version = "1.2.0";
src = fetchFromGitHub {
owner = "mwh";
repo = "dragon";
rev = "v${finalAttrs.version}";
hash = "sha256-wqG6idlVvdN+sPwYgWu3UL0la5ssvymZibiak3KeV7M=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk3 ];
makeFlags = [ "NAME=dragon-drop" ];
installFlags = [ "PREFIX=${placeholder "out"}" ];
postInstall = ''
ln -s $out/bin/dragon-drop $out/bin/xdragon
'';
meta = {
description = "Simple drag-and-drop source/sink for X or Wayland (called dragon in upstream)";
homepage = "https://github.com/mwh/dragon";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
das_j
taliyahwebb
];
mainProgram = "dragon-drop";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
libjack2,
libGL,
pkg-config,
xorg,
}:
stdenv.mkDerivation rec {
pname = "dragonfly-reverb";
version = "3.2.10";
src = fetchFromGitHub {
owner = "michaelwillis";
repo = "dragonfly-reverb";
tag = version;
hash = "sha256-YXJ4U5J8Za+DlXvp6QduvCHIVC2eRJ3+I/KPihCaIoY=";
fetchSubmodules = true;
};
postPatch = ''
patchShebangs dpf/utils/generate-ttl.sh
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libjack2
xorg.libX11
libGL
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/lib/lv2/
mkdir -p $out/lib/vst/
cd bin
for bin in DragonflyEarlyReflections DragonflyPlateReverb DragonflyHallReverb DragonflyRoomReverb; do
cp -a $bin $out/bin/
cp -a $bin-vst.so $out/lib/vst/
cp -a $bin.lv2/ $out/lib/lv2/ ;
done
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/michaelwillis/dragonfly-reverb";
description = "Hall-style reverb based on freeverb3 algorithms";
maintainers = [ maintainers.magnetophon ];
license = licenses.gpl3Plus;
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,132 @@
diff --git a/helio/cmake/third_party.cmake b/helio/cmake/third_party.cmake
index aeb78d9..e9d4e6b 100644
--- a/helio/cmake/third_party.cmake
+++ b/helio/cmake/third_party.cmake
@@ -143,7 +143,7 @@ endfunction()
FetchContent_Declare(
gtest
- URL https://github.com/google/googletest/archive/release-1.11.0.zip
+ DOWNLOAD_COMMAND true
)
FetchContent_GetProperties(gtest)
@@ -154,7 +154,7 @@ endif ()
FetchContent_Declare(
benchmark
- URL https://github.com/google/benchmark/archive/v1.6.1.tar.gz
+ DOWNLOAD_COMMAND true
)
FetchContent_GetProperties(benchmark)
@@ -169,7 +169,7 @@ endif ()
FetchContent_Declare(
abseil_cpp
- URL https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz
+ DOWNLOAD_COMMAND true
PATCH_COMMAND patch -p1 < "${CMAKE_CURRENT_LIST_DIR}/../patches/abseil-20211102.patch"
)
@@ -183,11 +183,7 @@ endif()
FetchContent_Declare(
glog
- GIT_REPOSITORY https://github.com/romange/glog
- GIT_TAG Absl
-
- GIT_PROGRESS TRUE
- GIT_SHALLOW TRUE
+ DOWNLOAD_COMMAND true
)
FetchContent_GetProperties(glog)
@@ -233,10 +229,7 @@ endif()
add_third_party(
gperf
- URL https://github.com/gperftools/gperftools/archive/gperftools-2.9.1.tar.gz
- #GIT_REPOSITORY https://github.com/gperftools/gperftools
- #GIT_TAG gperftools-2.9.1
- GIT_SHALLOW TRUE
+ DOWNLOAD_COMMAND true
PATCH_COMMAND autoreconf -i # update runs every time for some reason
# CMAKE_PASS_FLAGS "-DGPERFTOOLS_BUILD_HEAP_PROFILER=OFF -DGPERFTOOLS_BUILD_HEAP_CHECKER=OFF \
# -DGPERFTOOLS_BUILD_DEBUGALLOC=OFF -DBUILD_TESTING=OFF \
@@ -260,11 +253,12 @@ else()
endif()
add_third_party(mimalloc
- URL https://github.com/microsoft/mimalloc/archive/refs/tags/v2.0.5.tar.gz
+ DOWNLOAD_COMMAND true
# Add -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-O0 to debug
CMAKE_PASS_FLAGS "-DCMAKE_BUILD_TYPE=Release -DMI_BUILD_SHARED=OFF -DMI_BUILD_TESTS=OFF \
- -DMI_INSTALL_TOPLEVEL=ON -DMI_OVERRIDE=${MI_OVERRIDE} -DCMAKE_C_FLAGS=-g"
+ -DMI_INSTALL_TOPLEVEL=ON -DMI_OVERRIDE=${MI_OVERRIDE} -DCMAKE_C_FLAGS=-g \
+ -DCMAKE_INSTALL_LIBDIR=${THIRD_PARTY_LIB_DIR}/mimalloc/lib"
BUILD_COMMAND make -j4 mimalloc-static
INSTALL_COMMAND make install
@@ -274,7 +268,7 @@ add_third_party(mimalloc
)
add_third_party(jemalloc
- URL https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2
+ URL REPLACEJEMALLOCURL
PATCH_COMMAND ./autogen.sh
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${THIRD_PARTY_LIB_DIR}/jemalloc --with-jemalloc-prefix=je_ --disable-libdl
)
@@ -282,24 +276,23 @@ add_third_party(jemalloc
add_third_party(
xxhash
- URL https://github.com/Cyan4973/xxHash/archive/v0.8.0.tar.gz
+ DOWNLOAD_COMMAND true
SOURCE_SUBDIR cmake_unofficial
- CMAKE_PASS_FLAGS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF"
+ CMAKE_PASS_FLAGS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF \
+ -DCMAKE_INSTALL_LIBDIR=${THIRD_PARTY_LIB_DIR}/xxhash/lib"
)
add_third_party(
uring
- GIT_REPOSITORY https://github.com/axboe/liburing.git
- GIT_TAG liburing-2.1
+ DOWNLOAD_COMMAND true
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${THIRD_PARTY_LIB_DIR}/uring
BUILD_IN_SOURCE 1
)
add_third_party(
rapidjson
- GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
- GIT_TAG 1a803826f1197b5e30703afe4b9c0e7dd48074f5
+ DOWNLOAD_COMMAND true
CMAKE_PASS_FLAGS "-DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF \
-DRAPIDJSON_BUILD_DOC=OFF"
LIB "none"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0dc0824..d5b38b3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,6 @@
add_third_party(
lua
- URL https://github.com/lua/lua/archive/refs/tags/v5.4.4.tar.gz
+ URL REPLACELUAURL
PATCH_COMMAND patch -p1 -i "${CMAKE_SOURCE_DIR}/patches/lua-v5.4.4.patch"
CONFIGURE_COMMAND echo
BUILD_IN_SOURCE 1
@@ -11,7 +11,8 @@ add_third_party(
add_third_party(
dconv
- URL https://github.com/google/double-conversion/archive/refs/tags/v3.2.0.tar.gz
+ DOWNLOAD_COMMAND true
+ CMAKE_PASS_FLAGS "-DCMAKE_INSTALL_LIBDIR=${THIRD_PARTY_LIB_DIR}/dconv/lib"
LIB libdouble-conversion.a
)

View File

@@ -0,0 +1,553 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 846b4448..b4900ead 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@ option (PRINT_UNSYMBOLIZED_STACK_TRACES
"Print file offsets in traces instead of symbolizing" OFF)
option (WITH_CUSTOM_PREFIX "Enable support for user-generated message prefixes" ON)
option (WITH_GFLAGS "Use gflags" ON)
+option (WITH_ABSL "Use absl flags" OFF)
option (WITH_GTEST "Use Google Test" ON)
option (WITH_PKGCONFIG "Enable pkg-config support" ON)
option (WITH_SYMBOLIZE "Enable symbolize module" ON)
@@ -87,6 +88,13 @@ if (WITH_GFLAGS)
endif (gflags_FOUND)
endif (WITH_GFLAGS)
+if (WITH_ABSL)
+ set (HAVE_ABSL_FLAGS 1)
+ set (ac_cv_have_abslflags 1)
+else (WITH_ABSL)
+set (ac_cv_have_abslflags 0)
+endif (WITH_ABSL)
+
find_package (Threads)
find_package (Unwind)
@@ -1025,7 +1033,7 @@ write_basic_package_version_file (
${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake
COMPATIBILITY SameMajorVersion)
-export (TARGETS glog NAMESPACE glog:: FILE glog-targets.cmake)
+# export (TARGETS glog NAMESPACE glog:: FILE glog-targets.cmake)
export (PACKAGE glog)
get_filename_component (_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
diff --git a/src/base/commandlineflags.h b/src/base/commandlineflags.h
index bcb12dea..1c9d9294 100644
--- a/src/base/commandlineflags.h
+++ b/src/base/commandlineflags.h
@@ -57,6 +57,25 @@
#include <gflags/gflags.h>
+#else
+#ifdef HAVE_ABSL_FLAGS
+#include <absl/flags/flag.h>
+
+#define FLAG(name) absl::GetFlag(FLAGS_##name)
+
+#define DEFINE_bool(name, value, meaning) \
+ ABSL_FLAG(bool, name, value, meaning)
+
+#define DEFINE_int32(name, value, meaning) \
+ ABSL_FLAG(GOOGLE_NAMESPACE::int32, name, value, meaning)
+
+#define DEFINE_uint32(name, value, meaning) \
+ ABSL_FLAG(GOOGLE_NAMESPACE::uint32, name, value, meaning)
+
+#define DEFINE_string(name, value, meaning) \
+ ABSL_FLAG(std::string, name, value, meaning)
+
+
#else
#include <glog/logging.h>
@@ -108,6 +127,7 @@
} \
using fLS::FLAGS_##name
+#endif
#endif // HAVE_LIB_GFLAGS
// Define GLOG_DEFINE_* using DEFINE_* . By using these macros, we
diff --git a/src/base/mutex.h b/src/base/mutex.h
index e82c597f..a58c1412 100644
--- a/src/base/mutex.h
+++ b/src/base/mutex.h
@@ -319,11 +319,6 @@ class WriterMutexLock {
void operator=(const WriterMutexLock&);
};
-// Catch bug where variable name is omitted, e.g. MutexLock (&mu);
-#define MutexLock(x) COMPILE_ASSERT(0, mutex_lock_decl_missing_var_name)
-#define ReaderMutexLock(x) COMPILE_ASSERT(0, rmutex_lock_decl_missing_var_name)
-#define WriterMutexLock(x) COMPILE_ASSERT(0, wmutex_lock_decl_missing_var_name)
-
} // namespace MUTEX_NAMESPACE
using namespace MUTEX_NAMESPACE;
diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in
index b225b7ec..a4c58c96 100644
--- a/src/config.h.cmake.in
+++ b/src/config.h.cmake.in
@@ -34,6 +34,8 @@
/* define if you have google gflags library */
#cmakedefine HAVE_LIB_GFLAGS
+#cmakedefine HAVE_ABSL_FLAGS
+
/* define if you have google gmock library */
#cmakedefine HAVE_LIB_GMOCK
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
index 95a573b1..54cd838f 100644
--- a/src/glog/logging.h.in
+++ b/src/glog/logging.h.in
@@ -89,6 +89,10 @@
#include <gflags/gflags.h>
#endif
+#if @ac_cv_have_abslflags@
+#include <absl/flags/declare.h>
+#endif
+
#if @ac_cv_cxx11_atomic@ && __cplusplus >= 201103L
#include <atomic>
#elif defined(GLOG_OS_WINDOWS)
@@ -395,6 +399,14 @@ typedef void(*CustomPrefixCallback)(std::ostream& s, const LogMessageInfo& l, vo
#undef DECLARE_uint32
#endif
+#if @ac_cv_have_abslflags@
+#define DECLARE_VARIABLE 1
+#define DECLARE_bool(name) ABSL_DECLARE_FLAG(bool, name)
+#define DECLARE_int32(name) ABSL_DECLARE_FLAG(@ac_google_namespace@::int32, name)
+#define DECLARE_uint32(name) ABSL_DECLARE_FLAG(@ac_google_namespace@::uint32, name)
+#define DECLARE_string(name) ABSL_DECLARE_FLAG(std::string, name)
+#endif
+
#ifndef DECLARE_VARIABLE
#define DECLARE_VARIABLE(type, shorttype, name, tn) \
namespace fL##shorttype { \
diff --git a/src/glog/vlog_is_on.h.in b/src/glog/vlog_is_on.h.in
index 7526fc34..16e60f46 100644
--- a/src/glog/vlog_is_on.h.in
+++ b/src/glog/vlog_is_on.h.in
@@ -64,6 +64,14 @@
#include <glog/log_severity.h>
#if defined(__GNUC__)
+
+#if @ac_cv_have_abslflags@
+ extern int32_t absl_proxy_v;
+ #define VLEVEL (@ac_google_namespace@::absl_proxy_v)
+#else
+ #define VLEVEL (FLAGS_v)
+#endif
+
// We emit an anonymous static int* variable at every VLOG_IS_ON(n) site.
// (Normally) the first time every VLOG_IS_ON(n) site is hit,
// we determine what variable will dynamically control logging at this site:
@@ -74,7 +82,7 @@
__extension__ \
({ static @ac_google_namespace@::SiteFlag vlocal__ = {NULL, NULL, 0, NULL}; \
@ac_google_namespace@::int32 verbose_level__ = (verboselevel); \
- (vlocal__.level == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \
+ (vlocal__.level == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &VLEVEL, \
__FILE__, verbose_level__) : *vlocal__.level >= verbose_level__); \
})
#else
diff --git a/src/logging.cc b/src/logging.cc
index 4028ccc0..fc618d3a 100644
--- a/src/logging.cc
+++ b/src/logging.cc
@@ -103,7 +103,9 @@ using std::fdopen;
#endif
// There is no thread annotation support.
+#ifndef EXCLUSIVE_LOCKS_REQUIRED
#define EXCLUSIVE_LOCKS_REQUIRED(mu)
+#endif
static bool BoolFromEnv(const char *varname, bool defval) {
const char* const valstr = getenv(varname);
@@ -351,8 +353,9 @@ static const char* GetAnsiColorCode(GLogColor color) {
// Safely get max_log_size, overriding to 1 if it somehow gets defined as 0
static uint32 MaxLogSize() {
- return (FLAGS_max_log_size > 0 && FLAGS_max_log_size < 4096
- ? FLAGS_max_log_size
+ uint32 maxlogsize = FLAG(max_log_size);
+ return (maxlogsize > 0 && maxlogsize < 4096
+ ? maxlogsize
: 1);
}
@@ -721,7 +724,7 @@ inline void LogDestination::SetStderrLogging(LogSeverity min_severity) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
MutexLock l(&log_mutex);
- FLAGS_stderrthreshold = min_severity;
+ absl::SetFlag(&FLAGS_stderrthreshold, min_severity);
}
inline void LogDestination::LogToStderr() {
@@ -747,8 +750,8 @@ static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity,
const char* message, size_t len) {
bool is_stdout = (output == stdout);
const GLogColor color = (LogDestination::terminal_supports_color() &&
- ((!is_stdout && FLAGS_colorlogtostderr) ||
- (is_stdout && FLAGS_colorlogtostdout)))
+ ((!is_stdout && FLAG(colorlogtostderr)) ||
+ (is_stdout && FLAG(colorlogtostdout))))
? SeverityToColor(severity)
: COLOR_DEFAULT;
@@ -789,7 +792,7 @@ static void ColoredWriteToStdout(LogSeverity severity, const char* message,
FILE* output = stdout;
// We also need to send logs to the stderr when the severity is
// higher or equal to the stderr threshold.
- if (severity >= FLAGS_stderrthreshold) {
+ if (severity >= FLAG(stderrthreshold)) {
output = stderr;
}
ColoredWriteToStderrOrStdout(output, severity, message, len);
@@ -808,7 +811,7 @@ static void WriteToStderr(const char* message, size_t len) {
inline void LogDestination::MaybeLogToStderr(LogSeverity severity,
const char* message, size_t message_len, size_t prefix_len) {
- if ((severity >= FLAGS_stderrthreshold) || FLAGS_alsologtostderr) {
+ if ((severity >= FLAG(stderrthreshold)) || FLAG(alsologtostderr)) {
ColoredWriteToStderr(severity, message, message_len);
#ifdef GLOG_OS_WINDOWS
(void) prefix_len;
@@ -835,8 +838,8 @@ inline void LogDestination::MaybeLogToStderr(LogSeverity severity,
inline void LogDestination::MaybeLogToEmail(LogSeverity severity,
const char* message, size_t len) {
if (severity >= email_logging_severity_ ||
- severity >= FLAGS_logemaillevel) {
- string to(FLAGS_alsologtoemail);
+ severity >= FLAG(logemaillevel)) {
+ string to(FLAG(alsologtoemail));
if (!addresses_.empty()) {
if (!to.empty()) {
to += ",";
@@ -862,7 +865,7 @@ inline void LogDestination::MaybeLogToLogfile(LogSeverity severity,
time_t timestamp,
const char* message,
size_t len) {
- const bool should_flush = severity > FLAGS_logbuflevel;
+ const bool should_flush = severity > FLAG(logbuflevel);
LogDestination* destination = log_destination(severity);
destination->logger_->Write(should_flush, timestamp, message, len);
}
@@ -871,9 +874,9 @@ inline void LogDestination::LogToAllLogfiles(LogSeverity severity,
time_t timestamp,
const char* message,
size_t len) {
- if (FLAGS_logtostdout) { // global flag: never log to file
+ if (FLAG(logtostdout)) { // global flag: never log to file
ColoredWriteToStdout(severity, message, len);
- } else if (FLAGS_logtostderr) { // global flag: never log to file
+ } else if (FLAG(logtostderr)) { // global flag: never log to file
ColoredWriteToStderr(severity, message, len);
} else {
for (int i = severity; i >= 0; --i) {
@@ -1032,25 +1035,25 @@ void LogFileObject::FlushUnlocked(){
bytes_since_flush_ = 0;
}
// Figure out when we are due for another flush.
- const int64 next = (FLAGS_logbufsecs
+ const int64 next = (FLAG(logbufsecs)
* static_cast<int64>(1000000)); // in usec
next_flush_time_ = CycleClock_Now() + UsecToCycles(next);
}
bool LogFileObject::CreateLogfile(const string& time_pid_string) {
string string_filename = base_filename_;
- if (FLAGS_timestamp_in_logfile_name) {
+ if (FLAG(timestamp_in_logfile_name)) {
string_filename += time_pid_string;
}
string_filename += filename_extension_;
const char* filename = string_filename.c_str();
//only write to files, create if non-existant.
int flags = O_WRONLY | O_CREAT;
- if (FLAGS_timestamp_in_logfile_name) {
+ if (FLAG(timestamp_in_logfile_name)) {
//demand that the file is unique for our timestamp (fail if it exists).
flags = flags | O_EXCL;
}
- int fd = open(filename, flags, FLAGS_logfile_mode);
+ int fd = open(filename, flags, FLAG(logfile_mode));
if (fd == -1) return false;
#ifdef HAVE_FCNTL
// Mark the file close-on-exec. We don't really care if this fails
@@ -1083,7 +1086,7 @@ bool LogFileObject::CreateLogfile(const string& time_pid_string) {
file_ = fdopen(fd, "a"); // Make a FILE*.
if (file_ == NULL) { // Man, we're screwed!
close(fd);
- if (FLAGS_timestamp_in_logfile_name) {
+ if (FLAG(timestamp_in_logfile_name)) {
unlink(filename); // Erase the half-baked evidence: an unusable log file, only if we just created it.
}
return false;
@@ -1125,8 +1128,8 @@ bool LogFileObject::CreateLogfile(const string& time_pid_string) {
// Make an additional link to the log file in a place specified by
// FLAGS_log_link, if indicated
- if (!FLAGS_log_link.empty()) {
- linkpath = FLAGS_log_link + "/" + linkname;
+ if (!FLAG(log_link).empty()) {
+ linkpath = FLAG(log_link) + "/" + linkname;
unlink(linkpath.c_str()); // delete old one if it exists
if (symlink(filename, linkpath.c_str()) != 0) {
// silently ignore failures
@@ -1165,7 +1168,7 @@ void LogFileObject::Write(bool force_flush,
rollover_attempt_ = 0;
struct ::tm tm_time;
- if (FLAGS_log_utc_time) {
+ if (FLAG(log_utc_time)) {
gmtime_r(&timestamp, &tm_time);
} else {
localtime_r(&timestamp, &tm_time);
@@ -1253,14 +1256,14 @@ void LogFileObject::Write(bool force_flush,
<< ' '
<< setw(2) << tm_time.tm_hour << ':'
<< setw(2) << tm_time.tm_min << ':'
- << setw(2) << tm_time.tm_sec << (FLAGS_log_utc_time ? " UTC\n" : "\n")
+ << setw(2) << tm_time.tm_sec << (FLAG(log_utc_time) ? " UTC\n" : "\n")
<< "Running on machine: "
<< LogDestination::hostname() << '\n';
if(!g_application_fingerprint.empty()) {
file_header_stream << "Application fingerprint: " << g_application_fingerprint << '\n';
}
- const char* const date_time_format = FLAGS_log_year_in_prefix
+ const char* const date_time_format = FLAG(log_year_in_prefix)
? "yyyymmdd hh:mm:ss.uuuuuu"
: "mmdd hh:mm:ss.uuuuuu";
file_header_stream << "Running duration (h:mm:ss): "
@@ -1284,7 +1287,7 @@ void LogFileObject::Write(bool force_flush,
// greater than 4096, thereby indicating an error.
errno = 0;
fwrite(message, 1, message_len, file_);
- if ( FLAGS_stop_logging_if_full_disk &&
+ if ( FLAG(stop_logging_if_full_disk) &&
errno == ENOSPC ) { // disk full, stop writing to disk
stop_writing = true; // until the disk is
return;
@@ -1307,7 +1310,7 @@ void LogFileObject::Write(bool force_flush,
FlushUnlocked();
#ifdef GLOG_OS_LINUX
// Only consider files >= 3MiB
- if (FLAGS_drop_log_memory && file_length_ >= (3U << 20U)) {
+ if (FLAG(drop_log_memory) && file_length_ >= (3U << 20U)) {
// Don't evict the most recent 1-2MiB so as not to impact a tailer
// of the log file and to avoid page rounding issue on linux < 4.7
uint32 total_drop_length =
@@ -1348,7 +1351,7 @@ void LogCleaner::Disable() {
}
void LogCleaner::UpdateCleanUpTime() {
- const int64 next = (FLAGS_logcleansecs
+ const int64 next = (FLAG(logcleansecs)
* 1000000); // in usec
next_cleanup_time_ = CycleClock_Now() + UsecToCycles(next);
}
@@ -1664,7 +1667,7 @@ void LogMessage::Init(const char* file,
// I20201018 160715 f5d4fbb0 logging.cc:1153]
// (log level, GMT year, month, date, time, thread_id, file basename, line)
// We exclude the thread_id for the default thread.
- if (FLAGS_log_prefix && (line != kNoLogPrefix)) {
+ if (FLAG(log_prefix) && (line != kNoLogPrefix)) {
std::ios saved_fmt(NULL);
saved_fmt.copyfmt(stream());
stream().fill('0');
@@ -1672,7 +1675,7 @@ void LogMessage::Init(const char* file,
if (custom_prefix_callback == NULL) {
#endif
stream() << LogSeverityNames[severity][0];
- if (FLAGS_log_year_in_prefix) {
+ if (FLAG(log_year_in_prefix)) {
stream() << setw(4) << 1900 + logmsgtime_.year();
}
stream() << setw(2) << 1 + logmsgtime_.month()
@@ -1703,11 +1706,11 @@ void LogMessage::Init(const char* file,
}
data_->num_prefix_chars_ = data_->stream_.pcount();
- if (!FLAGS_log_backtrace_at.empty()) {
+ if (!FLAG(log_backtrace_at).empty()) {
char fileline[128];
snprintf(fileline, sizeof(fileline), "%s:%d", data_->basename_, line);
#ifdef HAVE_STACKTRACE
- if (FLAGS_log_backtrace_at == fileline) {
+ if (FLAG(log_backtrace_at) == fileline) {
string stacktrace;
DumpStackTraceToString(&stacktrace);
stream() << " (stacktrace:\n" << stacktrace << ") ";
@@ -1746,7 +1749,7 @@ ostream& LogMessage::stream() {
// Flush buffered message, called by the destructor, or any other function
// that needs to synchronize the log.
void LogMessage::Flush() {
- if (data_->has_been_flushed_ || data_->severity_ < FLAGS_minloglevel) {
+ if (data_->has_been_flushed_ || data_->severity_ < FLAG(minloglevel)) {
return;
}
@@ -1808,7 +1811,7 @@ static char fatal_message[256];
void ReprintFatalMessage() {
if (fatal_message[0]) {
const size_t n = strlen(fatal_message);
- if (!FLAGS_logtostderr) {
+ if (!FLAG(logtostderr)) {
// Also write to stderr (don't color to avoid terminal checks)
WriteToStderr(fatal_message, n);
}
@@ -1837,8 +1840,8 @@ void LogMessage::SendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
// global flag: never log to file if set. Also -- don't log to a
// file if we haven't parsed the command line flags to get the
// program name.
- if (FLAGS_logtostderr || FLAGS_logtostdout || !IsGoogleLoggingInitialized()) {
- if (FLAGS_logtostdout) {
+ if (FLAG(logtostderr) || FLAG(logtostdout) || !IsGoogleLoggingInitialized()) {
+ if (FLAG(logtostdout)) {
ColoredWriteToStdout(data_->severity_, data_->message_text_,
data_->num_chars_to_log_);
} else {
@@ -1891,7 +1894,7 @@ void LogMessage::SendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
fatal_time = logmsgtime_.timestamp();
}
- if (!FLAGS_logtostderr && !FLAGS_logtostdout) {
+ if (!FLAG(logtostderr) && !FLAG(logtostdout)) {
for (int i = 0; i < NUM_SEVERITIES; ++i) {
if (LogDestination::log_destinations_[i]) {
LogDestination::log_destinations_[i]->logger_->Write(true, 0, "", 0);
@@ -2238,7 +2241,7 @@ static bool SendEmailInternal(const char*dest, const char *subject,
subject, body, dest);
}
- string logmailer = FLAGS_logmailer;
+ string logmailer = FLAG(logmailer);
if (logmailer.empty()) {
logmailer = "/bin/mail";
}
@@ -2338,9 +2341,9 @@ const vector<string>& GetLoggingDirectories() {
if (logging_directories_list == NULL) {
logging_directories_list = new vector<string>;
- if ( !FLAGS_log_dir.empty() ) {
+ if ( !FLAG(log_dir).empty() ) {
// A dir was specified, we should use it
- logging_directories_list->push_back(FLAGS_log_dir);
+ logging_directories_list->push_back(FLAG(log_dir));
} else {
GetTempDirectories(logging_directories_list);
#ifdef GLOG_OS_WINDOWS
@@ -2654,7 +2657,7 @@ LogMessageTime::LogMessageTime(std::tm t) {
LogMessageTime::LogMessageTime(std::time_t timestamp, WallTime now) {
std::tm t;
- if (FLAGS_log_utc_time)
+ if (FLAG(log_utc_time))
gmtime_r(&timestamp, &t);
else
localtime_r(&timestamp, &t);
@@ -2673,7 +2676,7 @@ void LogMessageTime::init(const std::tm& t, std::time_t timestamp,
void LogMessageTime::CalcGmtOffset() {
std::tm gmt_struct;
int isDst = 0;
- if ( FLAGS_log_utc_time ) {
+ if ( FLAG(log_utc_time )) {
localtime_r(&timestamp_, &gmt_struct);
isDst = gmt_struct.tm_isdst;
gmt_struct = time_struct_;
diff --git a/src/raw_logging.cc b/src/raw_logging.cc
index 43159832..8532362b 100644
--- a/src/raw_logging.cc
+++ b/src/raw_logging.cc
@@ -123,8 +123,8 @@ static char crash_buf[kLogBufSize + 1] = { 0 }; // Will end in '\0'
GLOG_ATTRIBUTE_FORMAT(printf, 4, 5)
void RawLog__(LogSeverity severity, const char* file, int line,
const char* format, ...) {
- if (!(FLAGS_logtostdout || FLAGS_logtostderr ||
- severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr ||
+ if (!(FLAG(logtostdout) || FLAG(logtostderr) ||
+ severity >= FLAG(stderrthreshold) || FLAG(alsologtostderr) ||
!IsGoogleLoggingInitialized())) {
return; // this stderr log message is suppressed
}
diff --git a/src/utilities.cc b/src/utilities.cc
index a332f1a1..a9d5102a 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -141,7 +141,7 @@ static void DumpStackTrace(int skip_count, DebugWriter *writerfn, void *arg) {
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count+1);
for (int i = 0; i < depth; i++) {
#if defined(HAVE_SYMBOLIZE)
- if (FLAGS_symbolize_stacktrace) {
+ if (FLAG(symbolize_stacktrace)) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
diff --git a/src/vlog_is_on.cc b/src/vlog_is_on.cc
index e478a366..4b7a5cae 100644
--- a/src/vlog_is_on.cc
+++ b/src/vlog_is_on.cc
@@ -43,14 +43,24 @@
#include <glog/logging.h>
#include <glog/raw_logging.h>
#include "base/googleinit.h"
+#include "config.h"
// glog doesn't have annotation
#define ANNOTATE_BENIGN_RACE(address, description)
using std::string;
+#ifdef HAVE_ABSL_FLAGS
+
+ABSL_FLAG(int32_t, v, 0, "Show all VLOG(m) messages for m <= this."
+" Overridable by --vmodule.").OnUpdate([] {
+ GOOGLE_NAMESPACE::absl_proxy_v = absl::GetFlag(FLAGS_v);
+ });
+
+#else
GLOG_DEFINE_int32(v, 0, "Show all VLOG(m) messages for m <= this."
" Overridable by --vmodule.");
+#endif
GLOG_DEFINE_string(vmodule, "", "per-module verbose level."
" Argument is a comma-separated list of <module name>=<log level>."
@@ -60,6 +70,8 @@ GLOG_DEFINE_string(vmodule, "", "per-module verbose level."
_START_GOOGLE_NAMESPACE_
+int32_t absl_proxy_v = 0;
+
namespace glog_internal_namespace_ {
// Used by logging_unittests.cc so can't make it static here.
@@ -132,7 +144,8 @@ static void VLOG2Initializer() {
// Can now parse --vmodule flag and initialize mapping of module-specific
// logging levels.
inited_vmodule = false;
- const char* vmodule = FLAGS_vmodule.c_str();
+ string vmodule_str = FLAG(vmodule);
+ const char* vmodule = vmodule_str.c_str();
const char* sep;
VModuleInfo* head = NULL;
VModuleInfo* tail = NULL;
@@ -164,7 +177,7 @@ static void VLOG2Initializer() {
// This can be called very early, so we use SpinLock and RAW_VLOG here.
int SetVLOGLevel(const char* module_pattern, int log_level) {
- int result = FLAGS_v;
+ int result = FLAG(v);
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{

View File

@@ -0,0 +1,117 @@
{
fetchFromGitHub,
fetchurl,
lib,
stdenv,
double-conversion,
gperftools,
mimalloc,
rapidjson,
liburing,
xxHash,
gbenchmark,
glog,
gtest,
jemalloc,
gcc-unwrapped,
autoconf,
autoconf-archive,
automake,
cmake,
ninja,
boost,
libunwind,
libtool,
openssl,
}:
let
pname = "dragonflydb";
version = "0.1.0";
src = fetchFromGitHub {
owner = pname;
repo = "dragonfly";
tag = "v${version}";
hash = "sha256-P6WMW/n+VezWDXGagT4B+ZYyCp8oufDV6MTrpKpLZcs=";
fetchSubmodules = true;
};
# Needed exactly 5.4.4 for patch to work
lua = fetchurl {
url = "https://github.com/lua/lua/archive/refs/tags/v5.4.4.tar.gz";
hash = "sha256-L/ibvqIqfIuRDWsAb1ukVZ7c9GiiVTfO35mI7ZD2tFA=";
};
# Needed exactly 20211102.0 for patch to work
abseil-cpp_202111 = fetchFromGitHub {
owner = "abseil";
repo = "abseil-cpp";
rev = "20211102.0";
sha256 = "sha256-sSXT6D4JSrk3dA7kVaxfKkzOMBpqXQb0WbMYWG+nGwk=";
};
in
stdenv.mkDerivation {
inherit pname version src;
postPatch = ''
mkdir -p ./build/{third_party,_deps}
ln -s ${double-conversion.src} ./build/third_party/dconv
ln -s ${mimalloc.src} ./build/third_party/mimalloc
ln -s ${rapidjson.src} ./build/third_party/rapidjson
ln -s ${gbenchmark.src} ./build/_deps/benchmark-src
ln -s ${gtest.src} ./build/_deps/gtest-src
cp -R --no-preserve=mode,ownership ${gperftools.src} ./build/third_party/gperf
cp -R --no-preserve=mode,ownership ${liburing.src} ./build/third_party/uring
cp -R --no-preserve=mode,ownership ${xxHash.src} ./build/third_party/xxhash
cp -R --no-preserve=mode,ownership ${abseil-cpp_202111} ./build/_deps/abseil_cpp-src
cp -R --no-preserve=mode,ownership ${glog.src} ./build/_deps/glog-src
chmod u+x ./build/third_party/uring/configure
cp ./build/third_party/xxhash/cli/xxhsum.{1,c} ./build/third_party/xxhash
patch -p1 -d ./build/_deps/glog-src < ${./glog.patch}
sed '
s@REPLACEJEMALLOCURL@file://${jemalloc.src}@
s@REPLACELUAURL@file://${lua}@
' ${./fixes.patch} | patch -p1
'';
nativeBuildInputs = [
autoconf
autoconf-archive
automake
cmake
ninja
];
buildInputs = [
boost
libunwind
libtool
openssl
];
cmakeFlags = [
"-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
"-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
];
ninjaFlags = [ "dragonfly" ];
doCheck = false;
dontUseNinjaInstall = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ./dragonfly $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Modern replacement for Redis and Memcached";
homepage = "https://dragonflydb.io/";
license = licenses.bsl11;
platforms = platforms.linux;
maintainers = with maintainers; [ yureien ];
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
}:
stdenv.mkDerivation {
pname = "drat-trim";
version = "2023-05-22";
src = fetchFromGitHub {
owner = "marijnheule";
repo = "drat-trim";
tag = "v05.22.2023";
hash = "sha256-sV3A0f1TLSaTIdAtT6y8rU3ZS2UqEePJYSf3UySOlSA=";
};
patches = [
# gcc-14 build fix: https://github.com/marijnheule/drat-trim/pull/40
(fetchpatch {
name = "gcc-14-fix.patch";
url = "https://github.com/marijnheule/drat-trim/commit/8186a7dc083a3951ba87e5ff35d36f1ea2c03f0d.patch";
hash = "sha256-jgsOYcRYD2VGdOrXW9D8Jh80Nqd+Kp3d2IU+bNK1yGg=";
})
];
postPatch = ''
substituteInPlace Makefile --replace gcc cc
'';
installPhase = ''
runHook preInstall
install -Dt $out/bin drat-trim lrat-check
runHook postInstall
'';
meta = with lib; {
description = "Proof checker for unSAT proofs";
longDescription = ''
DRAT-trim is a satisfiability proof checking and trimming
utility designed to validate proofs for all known satisfiability
solving and preprocessing techniques. DRAT-trim can also emit
trimmed formulas, optimized proofs, and TraceCheck+ dependency
graphs.
DRAT-trim has been used as part of the judging process in the
annual SAT Competition in recent years, in order to check
competing SAT solvers' work when they claim that a SAT instance
is unsatisfiable.
This package also contains the related tool LRAT-check, which checks a
proof format called LRAT which extends DRAT with hint statements to speed
up the checking process.
'';
homepage = "https://www.cs.utexas.edu/~marijn/drat-trim/";
license = licenses.mit;
maintainers = with maintainers; [ kini ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,3 @@
{
"yarn_offline_cache_hash": "sha256-SoCuCzrKUWWsD/oEh2W3/T1/hhd7ghfpeBojo84sEI8="
}

View File

@@ -0,0 +1,82 @@
{
"name": "draupnir",
"version": "2.6.1",
"description": "A moderation tool for Matrix",
"main": "lib/index.js",
"repository": "https://github.com/the-draupnir-project/Draupnir.git",
"author": "Gnuxie",
"license": "AFL-3.0",
"private": true,
"scripts": {
"build": "tsc --project test/tsconfig.json && tsc > /dev/null 2>&1",
"postbuild": "corepack yarn describe-version",
"describe-version": "(git describe > version.txt.tmp && mv version.txt.tmp version.txt) || true && rm -f version.txt.tmp",
"remove-tests-from-lib": "rm -rf lib/test/ && cp -r lib/src/* lib/ && rm -rf lib/src/",
"lint": "corepack yarn eslint --cache src test && corepack yarn prettier --cache --ignore-unknown --check src test",
"start:dev": "corepack yarn build && node --async-stack-traces lib/index.js",
"test:unit": "mocha --require './test/tsnode.cjs' --forbid-only 'test/unit/**/*.{ts,tsx}'",
"test:unit:single": "mocha --require test/tsnode.cjs",
"test:integration": "NODE_ENV=harness mocha --require test/tsnode.cjs --async-stack-traces --forbid-only --require test/integration/fixtures.ts --timeout 300000 --project ./tsconfig.json \"test/integration/**/*Test.ts\"",
"test:integration:single": "NODE_ENV=harness corepack yarn mocha --require test/tsnode.cjs --require test/integration/fixtures.ts --timeout 300000 --project ./tsconfig.json",
"test:appservice:integration": "NODE_ENV=harness mocha --require test/tsnode.cjs --async-stack-traces --forbid-only --timeout 300000 --project ./tsconfig.json \"test/appservice/integration/**/*Test.ts\"",
"test:appservice:integration:single": "NODE_ENV=harness corepack yarn mocha --require test/tsnode.cjs --timeout 300000 --project ./tsconfig.json",
"test:manual": "NODE_ENV=harness ts-node test/integration/manualLaunchScript.ts"
},
"devDependencies": {
"@eslint/js": "^9.7.0",
"@types/better-sqlite3": "^7.6.9",
"@types/config": "^3.3.1",
"@types/crypto-js": "^4.2.2",
"@types/eslint__js": "^8.42.3",
"@types/express": "^4.17.21",
"@types/html-to-text": "^8.0.1",
"@types/js-yaml": "^4.0.9",
"@types/jsdom": "21.1.7",
"@types/mocha": "^10.0.7",
"@types/nedb": "^1.8.16",
"@types/node": "^20.14.11",
"@types/pg": "^8.6.5",
"@types/request": "^2.48.12",
"crypto-js": "^4.2.0",
"eslint": "^9.7.0",
"expect": "^29.7.0",
"mocha": "^10.7.0",
"prettier": "^3.3.3",
"ts-auto-mock": "^3.7.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"typescript-eslint": "^7.16.1"
},
"dependencies": {
"@gnuxie/typescript-result": "^1.0.0",
"@sentry/node": "^7.17.2",
"@sinclair/typebox": "0.34.13",
"@the-draupnir-project/interface-manager": "4.2.5",
"@the-draupnir-project/matrix-basic-types": "1.4.0",
"@the-draupnir-project/mps-interface-adaptor": "^0.4.1",
"better-sqlite3": "^9.4.3",
"body-parser": "^1.20.2",
"config": "^3.3.9",
"express": "^4.19",
"html-to-text": "^8.0.0",
"js-yaml": "^4.1.0",
"jsdom": "^24.0.0",
"matrix-appservice-bridge": "^10.3.1",
"matrix-bot-sdk": "npm:@vector-im/matrix-bot-sdk@^0.7.1-element.6",
"matrix-protection-suite": "npm:@gnuxie/matrix-protection-suite@3.11.0",
"matrix-protection-suite-for-matrix-bot-sdk": "npm:@gnuxie/matrix-protection-suite-for-matrix-bot-sdk@3.11.0",
"pg": "^8.8.0",
"yaml": "^2.3.2"
},
"overrides": {
"matrix-bot-sdk": "$@vector-im/matrix-bot-sdk",
"@vector-im/matrix-bot-sdk": "npm:@vector-im/matrix-bot-sdk@^0.7.1-element.6",
"@the-draupnir-project/matrix-basic-types": "$the-draupnir-project/matrix-basic-types",
"@the-draupnir-project/interface-manager": "$the-draupnir-project/interface-manager",
"matrix-protection-suite": "$matrix-protection-suite"
},
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
}

View File

@@ -0,0 +1,125 @@
{
lib,
fetchFromGitHub,
makeWrapper,
nodejs,
matrix-sdk-crypto-nodejs,
python3,
sqlite,
srcOnly,
removeReferencesTo,
mkYarnPackage,
fetchYarnDeps,
stdenv,
cctools,
nixosTests,
}:
# docs: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#yarn2nix-javascript-yarn2nix
let
hashesFile = builtins.fromJSON (builtins.readFile ./hashes.json);
nodeSources = srcOnly nodejs;
in
mkYarnPackage rec {
pname = "draupnir";
version = "2.6.1";
src = fetchFromGitHub {
owner = "the-draupnir-project";
repo = "Draupnir";
tag = "v${version}";
hash = "sha256-KO2jm9yD/LnJSY1dAbPQ2fJZhmrxWJHU+TIaZzK97bg=";
};
nativeBuildInputs = [
makeWrapper
sqlite
];
offlineCache = fetchYarnDeps {
name = "${pname}-yarn-offline-cache";
yarnLock = src + "/yarn.lock";
hash = hashesFile.yarn_offline_cache_hash;
};
packageJSON = ./package.json;
pkgConfig = {
"@matrix-org/matrix-sdk-crypto-nodejs" = {
postInstall = ''
# replace with the existing package in nixpkgs
cd ..
rm -r matrix-sdk-crypto-nodejs
ln -s ${matrix-sdk-crypto-nodejs}/lib/node_modules/@matrix-org/* ./
'';
};
better-sqlite3 = {
nativeBuildInputs = [ python3 ] ++ lib.optional stdenv.hostPlatform.isDarwin cctools.libtool;
postInstall = ''
# build native sqlite bindings
npm run build-release --offline --nodedir="${nodeSources}"
find build -type f -exec \
${lib.getExe removeReferencesTo} -t "${nodeSources}" {} \;
'';
};
};
preBuild = ''
# install proper version info
mkdir --parents deps/draupnir/
echo "${version}-nix" > deps/draupnir/version.txt
# makes network requests
sed -i 's/corepack //g' deps/draupnir/package.json
'';
buildPhase = ''
runHook preBuild
yarn --offline --verbose build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir --parents $out/share
cp --archive . $out/share/draupnir
makeWrapper ${lib.getExe nodejs} $out/bin/draupnir \
--add-flags $out/share/draupnir/deps/draupnir/lib/index.js
runHook postInstall
'';
distPhase = "true";
passthru = {
tests = { inherit (nixosTests) draupnir; };
updateScript = ./update.sh;
};
meta = with lib; {
description = "Moderation tool for Matrix";
homepage = "https://github.com/the-draupnir-project/Draupnir";
longDescription = ''
As an all-in-one moderation tool, it can protect your server from
malicious invites, spam messages, and whatever else you don't want.
In addition to server-level protection, Draupnir is great for communities
wanting to protect their rooms without having to use their personal
accounts for moderation.
The bot by default includes support for bans, redactions, anti-spam,
server ACLs, room directory changes, room alias transfers, account
deactivation, room shutdown, and more.
A Synapse module is also available to apply the same rulesets the bot
uses across an entire homeserver.
'';
license = licenses.afl3;
maintainers = with maintainers; [ RorySys ];
mainProgram = "draupnir";
};
}

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts coreutils jq prefetch-yarn-deps git
set -euo pipefail
set -x
cd "$(git rev-parse --show-toplevel)"
TMPDIR=$(mktemp -d)
echo "Getting versions..."
latestVersion="$(curl -sL "https://api.github.com/repos/the-draupnir-project/Draupnir/releases?per_page=1" | jq -r '.[0].tag_name | ltrimstr("v")')"
echo " --> Latest version: ${latestVersion}"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; draupnir.version or (lib.getVersion draupnir)" | tr -d '"')
echo " --> Current version: ${currentVersion}"
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "Draupnir is up-to-date: $currentVersion"
exit 0
else
echo "We are out of date..."
fi
curl https://raw.githubusercontent.com/the-draupnir-project/Draupnir/v$latestVersion/package.json -o pkgs/by-name/dr/draupnir/package.json
update-source-version draupnir "$latestVersion"
# Update yarn offline cache hash
cd $TMPDIR
curl https://raw.githubusercontent.com/the-draupnir-project/Draupnir/v$latestVersion/yarn.lock -o yarn.lock
TMP_PREFETCH_HASH=`prefetch-yarn-deps yarn.lock`
NEW_YARN_OFFLINE_HASH=`nix --extra-experimental-features nix-command hash to-sri --type sha256 $TMP_PREFETCH_HASH`
cd -
echo "New yarn offline hash: $NEW_YARN_OFFLINE_HASH"
TMPFILE=$(mktemp)
jq '.yarn_offline_cache_hash = "'$NEW_YARN_OFFLINE_HASH'"' pkgs/by-name/dr/draupnir/hashes.json > $TMPFILE
mv -- "$TMPFILE" pkgs/by-name/dr/draupnir/hashes.json

View File

@@ -0,0 +1,74 @@
{
lib,
fetchFromGitHub,
meson,
ninja,
pkg-config,
python3,
gtk3,
appstream-glib,
desktop-file-utils,
gobject-introspection,
wrapGAppsHook3,
glib,
gdk-pixbuf,
pango,
gettext,
itstool,
}:
python3.pkgs.buildPythonApplication rec {
pname = "drawing";
version = "1.0.2";
format = "other";
src = fetchFromGitHub {
owner = "maoschanz";
repo = "drawing";
tag = version;
hash = "sha256-kNF9db8NoHWW1A0WEFQzxHqAQ4A7kxInMRZFJOXQX/k=";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
gobject-introspection
meson
ninja
pkg-config
wrapGAppsHook3
glib
gettext
itstool
];
buildInputs = [
glib
gtk3
gdk-pixbuf
pango
];
propagatedBuildInputs = with python3.pkgs; [
pycairo
pygobject3
];
postPatch = ''
chmod +x build-aux/meson/postinstall.py # patchShebangs requires executable file
patchShebangs build-aux/meson/postinstall.py
'';
strictDeps = false;
meta = {
description = "Free basic image editor, similar to Microsoft Paint, but aiming at the GNOME desktop";
mainProgram = "drawing";
homepage = "https://maoschanz.github.io/drawing/";
changelog = "https://github.com/maoschanz/drawing/releases/tag/${version}";
maintainers = with lib.maintainers; [ mothsart ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,124 @@
{
stdenv,
lib,
fetchFromGitHub,
cargo,
extra-cmake-modules,
rustc,
rustPlatform,
# common deps
libzip,
qt6Packages,
# client deps
ffmpeg,
libsecret,
libwebp,
# optional client deps
giflib,
libvpx,
miniupnpc,
# optional server deps
libmicrohttpd,
libsodium,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd ? null,
# options
buildClient ? true,
buildServer ? true,
buildServerGui ? true, # if false builds a headless server
buildExtraTools ? false,
}:
assert lib.assertMsg (
buildClient || buildServer || buildExtraTools
) "You must specify at least one of buildClient, buildServer, or buildExtraTools.";
let
clientDeps = with qt6Packages; [
qtbase
qtkeychain
qtmultimedia
qtsvg
qttools
ffmpeg
libsecret
libwebp
# optional:
giflib # gif animation export support
libvpx # WebM video export
miniupnpc # automatic port forwarding
];
serverDeps = [
# optional:
libmicrohttpd # HTTP admin api
libsodium # ext-auth support
]
++ lib.optional withSystemd systemd;
in
stdenv.mkDerivation rec {
pname = "drawpile";
version = "2.2.2";
src = fetchFromGitHub {
owner = "drawpile";
repo = "drawpile";
rev = version;
sha256 = "sha256-xcutcSpbFt+pb7QP1E/RG6iNnZwpfhIZTxr+1usLKHc=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-VUX6J7TfxWpa07HPFZ8JzpltIwJUYAl5TABIpBmGYYo=";
};
nativeBuildInputs = [
cargo
extra-cmake-modules
rustc
rustPlatform.cargoSetupHook
(
if buildClient || buildServerGui then
qt6Packages.wrapQtAppsHook
else
qt6Packages.wrapQtAppsNoGuiHook
)
];
buildInputs = [
libzip
qt6Packages.qtwebsockets
]
++ lib.optionals buildClient clientDeps
++ lib.optionals buildServer serverDeps;
cmakeFlags = [
(lib.cmakeFeature "INITSYS" (lib.optionalString withSystemd "systemd"))
(lib.cmakeBool "CLIENT" buildClient)
(lib.cmakeBool "SERVER" buildServer)
(lib.cmakeBool "SERVERGUI" buildServerGui)
(lib.cmakeBool "TOOLS" buildExtraTools)
];
meta = {
description = "Collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously";
homepage = "https://drawpile.net/";
downloadPage = "https://drawpile.net/download/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
}
// lib.optionalAttrs buildServer {
mainProgram = "drawpile-srv";
}
// lib.optionalAttrs buildClient {
mainProgram = "drawpile";
};
}

View File

@@ -0,0 +1,100 @@
{
stdenv,
lib,
fetchFrom9Front,
unstableGitUpdater,
installShellFiles,
makeWrapper,
apple-sdk_13,
xorg,
pkg-config,
wayland-scanner,
pipewire,
wayland,
wayland-protocols,
libxkbcommon,
libdecor,
pulseaudio,
nixosTests,
withWayland ? false,
}:
let
withXorg = !(withWayland || stdenv.hostPlatform.isDarwin);
in
stdenv.mkDerivation {
pname = "drawterm";
version = "0-unstable-2025-09-11";
src = fetchFrom9Front {
owner = "plan9front";
repo = "drawterm";
rev = "7523180ec9e5210e28eb0191268066188cdf91ab";
hash = "sha256-IOZCpNXJcTpqCRsNp8aaP2vORvusLktLtyoQ7gykJB8=";
};
enableParallelBuilding = true;
strictDeps = true;
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optionals withWayland [
pkg-config
wayland-scanner
];
buildInputs =
lib.optionals withWayland [
pipewire
wayland
wayland-protocols
libxkbcommon
libdecor
]
++ lib.optionals withXorg [
xorg.libX11
xorg.libXt
]
++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_13;
makeFlags =
lib.optional withWayland "CONF=linux"
++ lib.optional (!(withWayland || stdenv.hostPlatform.isDarwin)) "CONF=unix"
++ lib.optionals stdenv.hostPlatform.isDarwin [
"CONF=osx-cocoa"
"CC=clang"
];
installPhase = ''
installManPage drawterm.1
''
+ lib.optionalString withWayland ''
install -Dm755 -t $out/bin/ drawterm
''
+ lib.optionalString (!(withWayland || stdenv.hostPlatform.isDarwin)) ''
# wrapping the oss output with pulse seems to be the easiest
mv drawterm drawterm.bin
install -Dm755 -t $out/bin/ drawterm.bin
makeWrapper ${pulseaudio}/bin/padsp $out/bin/drawterm --add-flags $out/bin/drawterm.bin
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv gui-cocoa/drawterm.app $out/Applications/
mv drawterm $out/Applications/drawterm.app/
ln -s $out/Applications/drawterm.app/drawterm $out/bin/
'';
passthru = {
updateScript = unstableGitUpdater { shallowClone = false; };
tests = nixosTests.drawterm;
};
meta = {
description = "Connect to Plan 9 CPU servers from other operating systems";
homepage = "https://drawterm.9front.org/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moody ];
platforms = with lib.platforms; linux ++ darwin;
mainProgram = "drawterm";
};
}

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
bison,
flex,
gettext,
makeWrapper,
SDL2,
SDL2_image,
SDL2_mixer,
expat,
glew,
freetype,
libSM,
libXext,
libGL,
libGLU,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dreamchess";
version = "0.3.0";
src = fetchFromGitHub {
owner = "dreamchess";
repo = "dreamchess";
rev = "${finalAttrs.version}";
hash = "sha256-qus/RjwdAl9SuDXfLVKTPImqrvPF3xSDVlbXYLM3JNE=";
};
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
expat
glew
freetype
libSM
libXext
libGL
libGLU
xorg.libxcb
xorg.libX11
];
nativeBuildInputs = [
cmake
bison
flex
gettext
makeWrapper
];
cmakeFlags = [
(lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
(lib.cmakeFeature "OpenGL_GL_PREFERENCE" "GLVND")
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share")
];
# This makes sure the default engine (dreamer) will be called from
# the /nix/store/ as well when starting a new game
postFixup = ''
wrapProgram $out/bin/dreamchess \
--prefix PATH : $out/bin
'';
doInstallCheck = true;
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
stat "''${!outputBin}/bin/dreamer"
'';
meta = {
homepage = "https://github.com/dreamchess/dreamchess";
description = "OpenGL Chess Game";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ spk ];
platforms = lib.platforms.linux;
mainProgram = "dreamchess";
};
})

View File

@@ -0,0 +1,22 @@
{
lib,
writeTextFile,
mesa,
}:
writeTextFile {
name = "dri-pkgconfig-stub";
# Version intentionally hardcoded to avoid rebuilds on Mesa updates.
# If anything ever requires a newer version, this can simply be bumped manually.
text = ''
dridriverdir=${mesa.driverLink}/lib/dri
Name: dri
Version: 25.0
Description: Nixpkgs graphics driver path stub
'';
destination = "/lib/pkgconfig/dri.pc";
meta.badPlatforms = lib.platforms.darwin;
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "driftctl";
version = "0.40.0";
src = fetchFromGitHub {
owner = "snyk";
repo = "driftctl";
rev = "v${version}";
sha256 = "sha256-IDKfW0NCEsgKXpHA7SwkHjMeoGAIYITlDVR/vI/b9hk=";
};
vendorHash = "sha256-JFvC9PReziktHSXbltGkGHjVR8hTM1hPJ0OqrZQXRQM=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X github.com/snyk/driftctl/pkg/version.version=v${version}"
"-X github.com/snyk/driftctl/build.env=release"
"-X github.com/snyk/driftctl/build.enableUsageReporting=false"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd driftctl \
--bash <($out/bin/driftctl completion bash) \
--fish <($out/bin/driftctl completion fish) \
--zsh <($out/bin/driftctl completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/driftctl --help
$out/bin/driftctl version | grep "v${version}"
# check there's no telemetry flag
$out/bin/driftctl --help | grep -vz "telemetry"
runHook postInstallCheck
'';
meta = {
homepage = "https://driftctl.com/";
changelog = "https://github.com/snyk/driftctl/releases/tag/v${version}";
description = "Detect, track and alert on infrastructure drift";
mainProgram = "driftctl";
longDescription = ''
driftctl is a free and open-source CLI that warns of infrastructure drift
and fills in the missing piece in your DevSecOps toolbox.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kaction
jk
qjoly
];
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
autoreconfHook,
cairo,
fetchFromGitHub,
giflib,
glib,
gtk2-x11,
libjpeg,
libpcap,
libpng,
libuv,
libwebsockets,
libwebp,
openssl,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "driftnet";
version = "1.5.0";
src = fetchFromGitHub {
owner = "deiv";
repo = "driftnet";
tag = "v${version}";
hash = "sha256-lMn60vtOMPs1Tr+SnAOUZDrNIO7gEXdHpizjXiEkkoM=";
};
enableParallelBuilding = true;
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
cairo
giflib
glib
gtk2-x11
libjpeg
libpcap
libpng
libuv
libwebsockets
libwebp
openssl
];
meta = {
description = "Watches network traffic, and picks out and displays JPEG and GIF images for display";
homepage = "https://github.com/deiv/driftnet";
changelog = "https://github.com/deiv/driftnet/releases/tag/v${version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ offline ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "driftnet";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "drill";
version = "0.8.3";
src = fetchFromGitHub {
owner = "fcsonline";
repo = "drill";
rev = version;
sha256 = "sha256-4y5gpkQB0U6Yq92O6DDD5eq/i/36l/VfeyiE//pcZOk=";
};
cargoHash = "sha256-wrfQtJHhSG53tV3R4u/Ri4iv1VoAmuT3xleAQEJOIzE=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_DIR = "${lib.getDev openssl}";
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
openssl
];
meta = with lib; {
description = "HTTP load testing application inspired by Ansible syntax";
homepage = "https://github.com/fcsonline/drill";
license = licenses.gpl3Only;
maintainers = with maintainers; [ Br1ght0ne ];
mainProgram = "drill";
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
jdk8,
coreutils,
which,
gnumake,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "drip";
version = "0.2.4";
src = fetchFromGitHub {
repo = "drip";
owner = "ninjudd";
tag = finalAttrs.version;
hash = "sha256-ASsEPS8l3E3ReerIrVRQ1ICyMKMFa1XE+WYqxxsXhv4=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk8 ];
patches = [ ./wait.patch ];
postPatch = ''
patchShebangs .
'';
installPhase = ''
runHook preInstall
mkdir $out
cp ./* $out -r
wrapProgram $out/bin/drip \
--prefix PATH : ${
lib.makeBinPath [
coreutils
which
gnumake
jdk8
]
}
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
meta = {
description = "Launcher for the Java Virtual Machine intended to be a drop-in replacement for the java command, only faster";
license = lib.licenses.epl10;
homepage = "https://github.com/ninjudd/drip";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
rybern
awwpotato
];
};
})

View File

@@ -0,0 +1,11 @@
diff --git a/src/drip_daemon.c b/src/drip_daemon.c
index cbfd4d9..79fdaf4 100644
--- a/src/drip_daemon.c
+++ b/src/drip_daemon.c
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
+#include <sys/wait.h>
static char* jvm_dir;

View File

@@ -0,0 +1,43 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule rec {
pname = "drive";
version = "0.4.0";
src = fetchFromGitHub {
owner = "odeke-em";
repo = "drive";
rev = "v${version}";
hash = "sha256-mNOeOB0Tn5eqULFJZuE18PvLoHtnspv4AElmgEQKXcU=";
};
vendorHash = "sha256-F/ikdr7UCVlNv2yiEemyB7eIkYi3mX+rJvSfX488RFc=";
patches = [
# Add Go Modules support
(fetchpatch {
url = "https://github.com/odeke-em/drive/commit/0fb4bb2cf83a7293d9a33b00f8fc07e1c8dd8b7c.patch";
hash = "sha256-4PxsgfufhTfmy/7N5QahIhmRa0rb2eUDXJ66pYb6jFg=";
})
];
subPackages = [ "cmd/drive" ];
ldflags = [
"-s"
"-w"
];
meta = with lib; {
homepage = "https://github.com/odeke-em/drive";
description = "Google Drive client for the commandline";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "drive";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitLab,
libdrm,
json_c,
pciutils,
meson,
ninja,
pkg-config,
scdoc,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "drm_info";
version = "2.8.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "emersion";
repo = "drm_info";
rev = "v${finalAttrs.version}";
hash = "sha256-LtZ7JJmVNWMjJL2F6k+tcBpJ2v2fd+HNWyHAOvIi7Ko=";
};
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
scdoc
];
buildInputs = [
libdrm
json_c
pciutils
];
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Small utility to dump info about DRM devices";
mainProgram = "drm_info";
homepage = "https://gitlab.freedesktop.org/emersion/drm_info";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kiskae ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,13 @@
diff --git i/test.sh w/test.sh
index 4796ff11..a6627fec 100755
--- i/test.sh
+++ w/test.sh
@@ -148,7 +148,7 @@ function do_drogon_ctl_test()
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_CXX_STANDARD=17"
fi
- cmake .. $cmake_gen
+ cmake .. $cmake_gen -DDrogon_DIR=$out/lib/cmake/Drogon -DTrantor_DIR=$out/lib/cmake/Trantor
if [ $? -ne 0 ]; then
echo "Failed to run CMake for example project"

View File

@@ -0,0 +1,86 @@
{
stdenv,
fetchFromGitHub,
cmake,
jsoncpp,
libossp_uuid,
zlib,
lib,
# optional but of negligible size
openssl,
brotli,
c-ares,
# optional databases
sqliteSupport ? true,
sqlite,
postgresSupport ? false,
libpq,
redisSupport ? false,
hiredis,
mysqlSupport ? false,
libmysqlclient,
mariadb,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "drogon";
version = "1.9.11";
src = fetchFromGitHub {
owner = "drogonframework";
repo = "drogon";
tag = "v${finalAttrs.version}";
hash = "sha256-eFOYmqfyb/yp83HRa0hWSMuROozR/nfnEp7k5yx8hj0=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doInstallCheck)
(lib.cmakeBool "BUILD_EXAMPLES" false)
];
propagatedBuildInputs = [
jsoncpp
libossp_uuid
zlib
openssl
brotli
c-ares
]
++ lib.optional sqliteSupport sqlite
++ lib.optional postgresSupport libpq
++ lib.optional redisSupport hiredis
# drogon uses mariadb for mysql (see https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#Library-Dependencies)
++ lib.optionals mysqlSupport [
libmysqlclient
mariadb
];
patches = [
# this part of the test would normally fail because it attempts to configure a CMake project that uses find_package on itself
# this patch makes drogon and trantor visible to the test
./fix_find_package.patch
];
# modifying PATH here makes drogon_ctl visible to the test
installCheckPhase = ''
(
cd ..
PATH=$PATH:$out/bin $SHELL test.sh
)
'';
# this excludes you, pkgsStatic (cmake wants to run built binaries
# in the buildPhase)
doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
meta = with lib; {
homepage = "https://github.com/drogonframework/drogon";
description = "C++14/17 based HTTP web application framework";
license = licenses.mit;
maintainers = with maintainers; [ urlordjames ];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
ffmpeg,
libjpeg_turbo,
gtk3,
alsa-lib,
speex,
libusbmuxd,
libappindicator-gtk3,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "2.1.4";
src = fetchFromGitHub {
owner = "aramg";
repo = "droidcam";
rev = "v${version}";
sha256 = "sha256-z/SteW3jYR/VR+HffvTetdGs5oz4qWBNkaqLYiP1V8c=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
ffmpeg
libjpeg_turbo
gtk3
alsa-lib
speex
libusbmuxd
libappindicator-gtk3
];
postPatch = ''
substituteInPlace src/droidcam.c \
--replace "/opt/droidcam-icon.png" "$out/share/icons/hicolor/96x96/apps/droidcam.png"
substituteInPlace droidcam.desktop \
--replace "/opt/droidcam-icon.png" "droidcam" \
--replace "/usr/local/bin/droidcam" "droidcam"
'';
preBuild = ''
makeFlagsArray+=("JPEG=$(pkg-config --libs --cflags libturbojpeg)")
makeFlagsArray+=("USBMUXD=$(pkg-config --libs --cflags libusbmuxd-2.0)")
'';
installPhase = ''
runHook preInstall
install -Dt $out/bin droidcam droidcam-cli
install -D icon2.png $out/share/icons/hicolor/96x96/apps/droidcam.png
install -D droidcam.desktop $out/share/applications/droidcam.desktop
runHook postInstall
'';
meta = with lib; {
description = "Linux client for DroidCam app";
homepage = "https://github.com/aramg/droidcam";
license = licenses.gpl2Only;
maintainers = [ maintainers.suhr ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
}:
let
srcs = {
x86_64-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-x64"
"https://archive.org/download/videomap/dms-ubuntu-x64"
];
sha256 = "1x7pp6k27lr206a8j2pn0wf4wjb0zi28s0g1g3rb08jmr8fh1jnh";
};
i686-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-x32"
"https://archive.org/download/videomap/dms-ubuntu-x32"
];
sha256 = "1d62d7jz50wzk5rqqm3xab66jdzi9i1j6mwxf7r7nsgm6j5zz8r4";
};
aarch64-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-arm64"
"https://archive.org/download/videomap/dms-ubuntu-arm64"
];
sha256 = "1l1x7iqbxn6zsh3d37yb5x15qsxlwy3cz8g2g8vnzkgaafw9vva0";
};
armv7l-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-arm"
"https://archive.org/download/videomap/dms-ubuntu-arm"
];
sha256 = "1i7q9mylzvbsfydv4xf83nyqkh0nh01612jrqm93q1w6d0k2zvcd";
};
};
in
stdenv.mkDerivation {
pname = "droidmote";
version = "3.0.6";
src =
srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
install -m755 -D $src $out/bin/droidmote
runHook postInstall
'';
meta = with lib; {
description = "Control your computer from your couch";
homepage = "https://www.videomap.it/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ atila ];
platforms = lib.attrNames srcs;
};
}

View File

@@ -0,0 +1,39 @@
From 93f4f92b017935a35988e7210036db8020753f9e Mon Sep 17 00:00:00 2001
From: Jake Hillion <jake@hillion.co.uk>
Date: Sun, 21 Feb 2021 21:26:39 +0000
Subject: [PATCH] removed dependency for systemcertpool
---
drone/internal/util.go | 7 +++++--
go.mod | 1 -
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drone/internal/util.go b/drone/internal/util.go
index 46c8ec6f..25d4def7 100644
--- a/drone/internal/util.go
+++ b/drone/internal/util.go
@@ -2,11 +2,11 @@ package internal
import (
"crypto/tls"
+ "crypto/x509"
"fmt"
"net/http"
"strings"
- "github.com/jackspirou/syscerts"
"github.com/urfave/cli"
"golang.org/x/net/proxy"
"golang.org/x/oauth2"
@@ -35,7 +35,10 @@ func NewClient(c *cli.Context) (drone.Client, error) {
}
// attempt to find system CA certs
- certs := syscerts.SystemRootsPool()
+ certs, err := x509.SystemCertPool()
+ if err != nil {
+ return nil, err
+ }
tlsConfig := &tls.Config{
RootCAs: certs,
InsecureSkipVerify: skip,

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
version = "1.9.0";
pname = "drone-cli";
revision = "v${version}";
src = fetchFromGitHub {
owner = "harness";
repo = "drone-cli";
rev = revision;
hash = "sha256-XE0myh+PAl8JhoUhEdjdCe52vQo3NuA8/v/x+v5zHK4=";
};
vendorHash = "sha256-22sefx/2iLvVzN+6wJ7kbDFAv10PQNmWbia+HFzmaW8=";
# patch taken from https://patch-diff.githubusercontent.com/raw/harness/drone-cli/pull/179.patch
# but with go.mod changes removed due to conflict
patches = [ ./0001-use-builtin-go-syscerts.patch ];
ldflags = [
"-X main.version=${version}"
];
meta = with lib; {
mainProgram = "drone";
maintainers = with maintainers; [ techknowlogick ];
license = licenses.asl20;
description = "Command line client for the Drone continuous integration server";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "drone-runner-docker";
version = "1.8.4";
src = fetchFromGitHub {
owner = "drone-runners";
repo = "drone-runner-docker";
tag = "v${version}";
sha256 = "sha256-xJbmxoyL4Sb6YkkwgysGte44ZBKYHjc5QdYa+b62C/M=";
};
vendorHash = "sha256-KcNp3VdJ201oxzF0bLXY4xWHqHNz54ZrVSI96cfhU+k=";
meta = with lib; {
maintainers = [ ];
license = licenses.unfreeRedistributable;
homepage = "https://github.com/drone-runners/drone-runner-docker";
description = "Drone pipeline runner that executes builds inside Docker containers";
mainProgram = "drone-runner-docker";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "drone-runner-exec";
version = "unstable-2020-04-19";
src = fetchFromGitHub {
owner = "drone-runners";
repo = "drone-runner-exec";
rev = "c0a612ef2bdfdc6d261dfbbbb005c887a0c3668d";
sha256 = "sha256-0UIJwpC5Y2TQqyZf6C6neICYBZdLQBWAZ8/K1l6KVRs=";
};
vendorHash = "sha256-ypYuQKxRhRQGX1HtaWt6F6BD9vBpD8AJwx/4esLrJsw=";
meta = with lib; {
description = "Drone pipeline runner that executes builds directly on the host machine";
homepage = "https://github.com/drone-runners/drone-runner-exec";
# https://polyformproject.org/licenses/small-business/1.0.0/
license = licenses.unfree;
maintainers = with maintainers; [ mic92 ];
mainProgram = "drone-runner-exec";
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule {
pname = "drone-runner-ssh";
version = "unstable-2022-12-22";
src = fetchFromGitHub {
owner = "drone-runners";
repo = "drone-runner-ssh";
rev = "ee70745c60e070a7fac57d9cecc41252e7a3ff55";
sha256 = "sha256-YUyhEA1kYIFLN+BI2A8PFeSgifoVNmNPKtdS58MwwVU=";
};
vendorHash = "sha256-Vj6ZmNwegKBVJPh6MsjtLMmX9WR76msuR2DPM8Qyhe0=";
meta = with lib; {
description = "Experimental Drone runner that executes a pipeline on a remote machine";
homepage = "https://github.com/drone-runners/drone-runner-ssh";
license = licenses.unfreeRedistributable;
mainProgram = "drone-runner-ssh";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "drone-scp";
version = "1.8.0";
src = fetchFromGitHub {
owner = "appleboy";
repo = "drone-scp";
rev = "v${version}";
hash = "sha256-qIIPvh+y1xPTXRGqUyCG2BnHQsgFlkbfi46vfM/Zgjg=";
};
vendorHash = "sha256-OCxqdb0VQP1jIRkiiAiyhRy15MiW2i9JbEATMedM0Bg=";
# Needs a specific user...
doCheck = false;
meta = with lib; {
description = "Copy files and artifacts via SSH using a binary, docker or Drone CI";
homepage = "https://github.com/appleboy/drone-scp";
license = licenses.mit;
maintainers = with maintainers; [ ambroisie ];
mainProgram = "drone-scp";
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchurl,
zlib,
libxcrypt,
enableSCP ? false,
sftpPath ? "/run/current-system/sw/libexec/sftp-server",
}:
let
# NOTE: DROPBEAR_PATH_SSH_PROGRAM is only necessary when enableSCP is true,
# but it is enabled here always anyways for consistency
dflags = {
SFTPSERVER_PATH = sftpPath;
DROPBEAR_PATH_SSH_PROGRAM = "${placeholder "out"}/bin/dbclient";
};
in
stdenv.mkDerivation rec {
pname = "dropbear";
version = "2025.88";
src = fetchurl {
url = "https://matt.ucc.asn.au/dropbear/releases/dropbear-${version}.tar.bz2";
sha256 = "sha256-eD9Q6iexfBbaiVePr9tt7PpEu49lkOVpik5NNnLcU9Q=";
};
CFLAGS = lib.pipe (lib.attrNames dflags) [
(map (name: "-D${name}=\\\"${dflags.${name}}\\\""))
(lib.concatStringsSep " ")
];
configureFlags = lib.optionals stdenv.hostPlatform.isMusl [
"--enable-wtmp=no"
"--enable-wtmpx=no"
];
# https://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html
preConfigure = ''
makeFlagsArray=(
VPATH=$(cat $NIX_CC/nix-support/orig-libc)/lib
PROGRAMS="${
lib.concatStringsSep " " (
[
"dropbear"
"dbclient"
"dropbearkey"
"dropbearconvert"
]
++ lib.optionals enableSCP [ "scp" ]
)
}"
)
'';
postInstall = lib.optionalString enableSCP ''
ln -rs $out/bin/scp $out/bin/dbscp
'';
patches = [
# Allow sessions to inherit the PATH from the parent dropbear.
# Otherwise they only get the usual /bin:/usr/bin kind of PATH
./pass-path.patch
];
buildInputs = [
zlib
libxcrypt
];
meta = {
description = "Small footprint implementation of the SSH 2 protocol";
homepage = "https://matt.ucc.asn.au/dropbear/dropbear.html";
changelog = "https://github.com/mkj/dropbear/raw/DROPBEAR_${version}/CHANGES";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,39 @@
diff --git a/src/svr-chansession.c b/src/svr-chansession.c
index 9ae2e60..2db7598 100644
--- a/src/svr-chansession.c
+++ b/src/svr-chansession.c
@@ -948,6 +948,8 @@ static void addchildpid(struct ChanSess *chansess, pid_t pid) {
static void execchild(const void *user_data) {
const struct ChanSess *chansess = user_data;
char *usershell = NULL;
+ const char *path = (getuid() == 0) ? DEFAULT_ROOT_PATH : DEFAULT_PATH;
+ const char *ldpath = NULL;
char *cp = NULL;
char *envcp = getenv("LANG");
if (envcp != NULL) {
@@ -965,6 +967,11 @@ static void execchild(const void *user_data) {
seedrandom();
#endif
+ if (getenv("PATH")) {
+ path = getenv("PATH");
+ }
+ ldpath = getenv("LD_LIBRARY_PATH");
+
/* clear environment if -e was not set */
/* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
* etc. This is hazardous, so should only be used for debugging. */
@@ -1012,10 +1019,9 @@ static void execchild(const void *user_data) {
addnewvar("LOGNAME", ses.authstate.pw_name);
addnewvar("HOME", ses.authstate.pw_dir);
addnewvar("SHELL", get_user_shell());
- if (getuid() == 0) {
- addnewvar("PATH", DEFAULT_ROOT_PATH);
- } else {
- addnewvar("PATH", DEFAULT_PATH);
+ addnewvar("PATH", path);
+ if (ldpath != NULL) {
+ addnewvar("LD_LIBRARY_PATH", ldpath);
}
if (cp != NULL) {
addnewvar("LANG", cp);

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
libbfd,
libnl,
libpcap,
ncurses,
readline,
zlib,
}:
stdenv.mkDerivation rec {
pname = "dropwatch";
version = "1.5.5";
src = fetchFromGitHub {
owner = "nhorman";
repo = "dropwatch";
rev = "v${version}";
sha256 = "sha256-+7bT1Gw4ncwLFkrxxbXjNs3KMM1sSQrCqXMYxKso9/4=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
libbfd
libnl
libpcap
ncurses
readline
zlib
];
enableParallelBuilding = true;
meta = with lib; {
description = "Linux kernel dropped packet monitor";
homepage = "https://github.com/nhorman/dropwatch";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ c0bw3b ];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchurl,
mysql_jdbc,
extensions ? { },
libJars ? [ ],
nixosTests,
mysqlSupport ? true,
}:
let
inherit (lib)
concatStringsSep
licenses
maintainers
mapAttrsToList
optionalString
forEach
;
in
stdenv.mkDerivation (finalAttrs: {
pname = "apache-druid";
version = "34.0.0";
src = fetchurl {
url = "mirror://apache/druid/${finalAttrs.version}/apache-druid-${finalAttrs.version}-bin.tar.gz";
hash = "sha256-y5Sx8mubb+XEqPxlhPL67od1kVck2M+IkvQP/CyrZpA=";
};
dontBuild = true;
loadExtensions = (
concatStringsSep "\n" (
mapAttrsToList (
dir: files:
''
if ! test -d $out/extensions/${dir}; then
mkdir $out/extensions/${dir};
fi
''
+ concatStringsSep "\n" (
forEach files (file: ''
if test -d ${file} ; then
cp ${file}/* $out/extensions/${dir}/
else
cp ${file} $out/extensions/${dir}/
fi
'')
)
) extensions
)
);
loadJars = concatStringsSep "\n" (forEach libJars (jar: "cp ${jar} $out/lib/"));
installPhase = ''
runHook preInstall
mkdir $out
mv * $out
${optionalString mysqlSupport "ln -s ${mysql_jdbc}/share/java/mysql-connector-j.jar $out/extensions/mysql-metadata-storage"}
${finalAttrs.loadExtensions}
${finalAttrs.loadJars}
runHook postInstall
'';
passthru = {
tests = nixosTests.druid.default.passthru.override { druidPackage = finalAttrs.finalPackage; };
};
meta = {
description = "Apache Druid: a high performance real-time analytics database";
homepage = "https://github.com/apache/druid";
license = licenses.asl20;
maintainers = with maintainers; [ vsharathchandra ];
mainProgram = "druid";
};
})

View File

@@ -0,0 +1,75 @@
{
lib,
appstream,
desktop-file-utils,
fetchFromGitHub,
glib,
gobject-introspection,
gtk4,
libadwaita,
meson,
ninja,
nix-update-script,
pkg-config,
python3Packages,
wrapGAppsHook4,
}:
python3Packages.buildPythonApplication rec {
pname = "drum-machine";
version = "1.4.0";
pyproject = false;
src = fetchFromGitHub {
owner = "Revisto";
repo = "drum-machine";
tag = "v${version}";
hash = "sha256-5NzbjPzmrsF/xKLBwQ4MDPxz6OjBHioO7vcLMzMhidA=";
};
strictDeps = true;
nativeBuildInputs = [
appstream
desktop-file-utils
glib
gobject-introspection
gtk4 # For `gtk-update-icon-theme`
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [ libadwaita ];
dependencies = with python3Packages; [
mido
pygame
pygobject3
];
dontWrapGApps = true;
makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ];
# NOTE: `postCheck` is intentionally not used here, as the entire checkPhase
# is skipped by `buildPythonApplication`
# https://github.com/NixOS/nixpkgs/blob/9d4343b7b27a3e6f08fc22ead568233ff24bbbde/pkgs/development/interpreters/python/mk-python-derivation.nix#L296
postInstallCheck = ''
mesonCheckPhase
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Modern and intuitive application for creating, playing, and managing drum patterns";
homepage = "https://apps.gnome.org/DrumMachine";
changelog = "https://github.com/Revisto/drum-machine/releases/tag/${src.tag}";
license = lib.licenses.gpl3Plus;
teams = [ lib.teams.gnome-circle ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchurl,
fetchDebianPatch,
alsa-lib,
expat,
glib,
libjack2,
libXext,
libX11,
libpng,
libpthreadstubs,
libsmf,
libsndfile,
lv2,
pkg-config,
zita-resampler,
}:
stdenv.mkDerivation rec {
version = "0.9.20";
pname = "drumgizmo";
src = fetchurl {
url = "https://www.drumgizmo.org/releases/${pname}-${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-AF8gQLiB29j963uI84TyNHIC0qwEWOCqmZIUWGq8V2o=";
};
patches = [
(fetchDebianPatch {
pname = "drumgizmo";
version = "0.9.20";
debianRevision = "3";
patch = "0005-fix_ftbfs_with_gcc13.patch";
hash = "sha256-y5NDZ+3t6GkBeF/5UY8dwtH8k0cuM+5SGBGPSV7AX7M=";
})
];
configureFlags = [ "--enable-lv2" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
alsa-lib
expat
glib
libjack2
libXext
libX11
libpng
libpthreadstubs
libsmf
libsndfile
lv2
zita-resampler
];
meta = with lib; {
description = "LV2 sample based drum plugin";
homepage = "https://www.drumgizmo.org";
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.nico202 ];
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
fetchFromGitLab,
php,
nixosTests,
writeScript,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "drupal";
version = "11.2.4";
src = fetchFromGitLab {
domain = "git.drupalcode.org";
owner = "project";
repo = "drupal";
tag = finalAttrs.version;
hash = "sha256-5uzq7zQHWJGi+YU9diRNSlSHIguypTXgOmtgAbF5TBU=";
};
vendorHash = "sha256-7jZRZ2qlQ7V5Y+aHScR31rahfoYF0p2yiiFiFHgDqa0=";
composerNoPlugins = false;
passthru = {
tests = {
inherit (nixosTests) drupal;
};
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update xmlstarlet
set -eu -o pipefail
version=$(curl -k --silent --globoff "https://updates.drupal.org/release-history/drupal/current" | xmlstarlet sel -t -v "project/releases/release[1]/tag")
nix-update drupal --version $version
'';
};
meta = {
description = "Drupal CMS";
license = lib.licenses.mit;
homepage = "https://drupal.org/";
maintainers = with lib.maintainers; [
OulipianSummer
];
platforms = php.meta.platforms;
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "dry";
version = "0.11.2";
src = fetchFromGitHub {
owner = "moncho";
repo = "dry";
rev = "v${version}";
hash = "sha256-JGtPX6BrB3q2EQyF6x2A5Wsn5DudOSVt3IxBAjjwlC8=";
};
proxyVendor = true;
vendorHash = "sha256-AduDbBpCoW7GmYrBPpL7wyLvwoez81qP/+mllgoHInY=";
meta = {
description = "Terminal application to manage Docker and Docker Swarm";
homepage = "https://moncho.github.io/dry/";
changelog = "https://github.com/moncho/dry/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.dump_stack ];
mainProgram = "dry";
};
}