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,32 @@
{
lib,
stdenv,
fetchzip,
zlib,
}:
stdenv.mkDerivation rec {
pname = "braa";
version = "0.82";
src = fetchzip {
url = "http://s-tech.elsat.net.pl/braa/braa-${version}.tar.gz";
hash = "sha256-GS3kk432BdGx/sLzzjXvotD9Qn4S3U4XtMmM0fWMhGA=";
};
buildInputs = [ zlib ];
installPhase = ''
runHook preInstall
install -Dm755 braa $out/bin/braa
runHook postInstall
'';
meta = with lib; {
description = "Mass snmp scanner";
homepage = "http://s-tech.elsat.net.pl";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ bycEEE ];
mainProgram = "braa";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "braincurses";
version = "1.1.0";
src = fetchFromGitHub {
owner = "bderrly";
repo = "braincurses";
tag = version;
sha256 = "0gpny9wrb0zj3lr7iarlgn9j4367awj09v3hhxz9r9a6yhk4anf5";
};
buildInputs = [ ncurses ];
# There is no install target in the Makefile
installPhase = ''
install -Dt $out/bin braincurses
'';
meta = with lib; {
homepage = "https://github.com/bderrly/braincurses";
description = "Version of the classic game Mastermind";
mainProgram = "braincurses";
license = licenses.gpl2Only;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
bluez,
cmake,
dbus,
libftdi1,
nix-update-script,
pkg-config,
useLibFTDI ? true,
useOpenMP ? true,
buildBluetooth ? true,
buildBluetoothLowEnergy ? true,
buildONNX ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "brainflow";
version = "5.18.1";
src = fetchFromGitHub {
owner = "brainflow-dev";
repo = "brainflow";
tag = finalAttrs.version;
hash = "sha256-VcWYH7DXpm0I8IgeDUTFs/13NfEIR5Q74iKFbFWReIA=";
};
patches = [ ];
cmakeFlags = [
(lib.cmakeBool "USE_LIBFTDI" useLibFTDI)
(lib.cmakeBool "USE_OPENMP" useOpenMP)
(lib.cmakeBool "BUILD_OYMOTION_SDK" false) # Needs a "GFORCE_SDK"
(lib.cmakeBool "BUILD_BLUETOOTH" buildBluetooth)
(lib.cmakeBool "BUILD_BLE" buildBluetoothLowEnergy)
(lib.cmakeBool "BUILD_ONNX" buildONNX)
];
buildInputs = [
dbus
]
++ lib.optional (buildBluetooth || buildBluetoothLowEnergy) bluez
++ lib.optional useLibFTDI libftdi1;
nativeBuildInputs = [
cmake
pkg-config
];
postPatch = ''
find . -type f -name 'build.cmake' -exec \
sed -i 's/DESTINATION inc/DESTINATION include/g' {} \;
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Library to obtain, parse and analyze data (EEG, EMG, ECG) from biosensors";
homepage = "https://brainflow.org/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
pandapip1
ziguana
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,2 @@
source "https://rubygems.org"
gem "brakeman"

View File

@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
brakeman (7.1.0)
racc
racc (1.8.1)
PLATFORMS
ruby
DEPENDENCIES
brakeman
BUNDLED WITH
2.6.9

View File

@@ -0,0 +1,23 @@
{
brakeman = {
dependencies = [ "racc" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1bs8bm3qj2wfy5h1bp8qi1d3vjw5zabhnq5rr288802kbakhiixv";
type = "gem";
};
version = "7.1.0";
};
racc = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0byn0c9nkahsl93y9ln5bysq4j31q8xkf2ws42swighxd4lnjzsa";
type = "gem";
};
version = "1.8.1";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
ruby,
bundlerApp,
bundlerUpdateScript,
}:
let
gems = import ./gemset.nix;
version = gems.brakeman.version;
in
bundlerApp {
pname = "brakeman";
exes = [ "brakeman" ];
gemdir = ./.;
passthru.updateScript = bundlerUpdateScript "brakeman";
meta = {
description = "Static analysis security scanner for Ruby on Rails";
homepage = "https://brakemanscanner.org/";
changelog = "https://github.com/presidentbeef/brakeman/blob/v${version}/CHANGES.md";
license = lib.licenses.unfreeRedistributable;
platforms = ruby.meta.platforms;
maintainers = [ ];
mainProgram = "brakeman";
};
}

View File

@@ -0,0 +1,89 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
gtk3,
itstool,
gst_all_1,
libxml2,
libnotify,
libcanberra-gtk3,
intltool,
dvdauthor,
libburn,
libisofs,
vcdimager,
wrapGAppsHook3,
hicolor-icon-theme,
}:
let
major = "3.12";
minor = "3";
binpath = lib.makeBinPath [
dvdauthor
vcdimager
];
in
stdenv.mkDerivation rec {
version = "${major}.${minor}";
pname = "brasero";
src = fetchurl {
url = "mirror://gnome/sources/brasero/${major}/${pname}-${version}.tar.xz";
hash = "sha256-h3SerjOhQSB9GwC+IzttgEWYLtMkntS5ja4fOpdf6hU=";
};
nativeBuildInputs = [
pkg-config
itstool
intltool
wrapGAppsHook3
];
buildInputs = [
gtk3
libxml2
libnotify
libcanberra-gtk3
libburn
libisofs
hicolor-icon-theme
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
gst_all_1.gst-libav
];
# brasero checks that the applications it uses aren't symlinks, but this
# will obviously not work on nix
patches = [ ./remove-symlink-check.patch ];
enableParallelBuilding = true;
configureFlags = [
"--with-girdir=$out/share/gir-1.0"
"--with-typelibdir=$out/lib/girepository-1.0"
];
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${binpath}")
'';
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
meta = with lib; {
description = "Gnome CD/DVD Burner";
homepage = "https://gitlab.gnome.org/GNOME/brasero";
maintainers = [ maintainers.bdimcheff ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
mainProgram = "brasero";
};
}

View File

@@ -0,0 +1,29 @@
diff --git a/libbrasero-burn/burn-plugin.c b/libbrasero-burn/burn-plugin.c
index f97bc5f..88e9d35 100644
--- a/libbrasero-burn/burn-plugin.c
+++ b/libbrasero-burn/burn-plugin.c
@@ -221,21 +221,10 @@ brasero_plugin_test_app (BraseroPlugin *plugin,
return;
}
- /* make sure that's not a symlink pointing to something with another
- * name like wodim.
- * NOTE: we used to test the target and see if it had the same name as
- * the symlink with GIO. The problem is, when the symlink pointed to
- * another symlink, then GIO didn't follow that other symlink. And in
- * the end it didn't work. So forbid all symlink. */
- if (g_file_test (prog_path, G_FILE_TEST_IS_SYMLINK)) {
- brasero_plugin_add_error (plugin,
- BRASERO_PLUGIN_ERROR_SYMBOLIC_LINK_APP,
- name);
- g_free (prog_path);
- return;
- }
+ /* disable symlink check on nixos */
+
/* Make sure it's a regular file */
- else if (!g_file_test (prog_path, G_FILE_TEST_IS_REGULAR)) {
+ if (!g_file_test (prog_path, G_FILE_TEST_IS_REGULAR)) {
brasero_plugin_add_error (plugin,
BRASERO_PLUGIN_ERROR_MISSING_APP,
name);

View File

@@ -0,0 +1,26 @@
{
lib,
symlinkJoin,
brasero-unwrapped,
cdrtools,
libdvdcss,
makeWrapper,
}:
let
binPath = lib.makeBinPath [ cdrtools ];
in
symlinkJoin {
name = "brasero-${brasero-unwrapped.version}";
paths = [ brasero-unwrapped ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/brasero \
--prefix PATH ':' ${binPath} \
--prefix LD_PRELOAD : ${lib.makeLibraryPath [ libdvdcss ]}/libdvdcss.so
'';
inherit (brasero-unwrapped) meta;
}

View File

@@ -0,0 +1,316 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
dpkg,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
adwaita-icon-theme,
gsettings-desktop-schemas,
gtk3,
gtk4,
qt6,
libX11,
libXScrnSaver,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libXrandr,
libXrender,
libXtst,
libdrm,
libkrb5,
libuuid,
libxkbcommon,
libxshmfence,
libgbm,
nspr,
nss,
pango,
pipewire,
snappy,
udev,
wayland,
xdg-utils,
coreutils,
xorg,
zlib,
# Darwin dependencies
unzip,
makeWrapper,
# command line arguments which are always set e.g "--disable-gpu"
commandLineArgs ? "",
# Necessary for USB audio devices.
pulseSupport ? stdenv.hostPlatform.isLinux,
libpulseaudio,
# For GPU acceleration support on Wayland (without the lib it doesn't seem to work)
libGL,
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder)
libvaSupport ? stdenv.hostPlatform.isLinux,
libva,
enableVideoAcceleration ? libvaSupport,
# For Vulkan support (--enable-features=Vulkan); disabled by default as it seems to break VA-API
vulkanSupport ? false,
addDriverRunpath,
enableVulkan ? vulkanSupport,
}:
{
pname,
version,
hash,
url,
}:
let
inherit (lib)
optional
optionals
makeLibraryPath
makeSearchPathOutput
makeBinPath
optionalString
strings
escapeShellArg
;
deps = [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
gtk4
libdrm
libX11
libGL
libxkbcommon
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libxshmfence
libXtst
libuuid
libgbm
nspr
nss
pango
pipewire
udev
wayland
xorg.libxcb
zlib
snappy
libkrb5
qt6.qtbase
]
++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva;
rpath = makeLibraryPath deps + ":" + makeSearchPathOutput "lib" "lib64" deps;
binpath = makeBinPath deps;
enableFeatures =
optionals enableVideoAcceleration [
"VaapiVideoDecoder"
"VaapiVideoEncoder"
]
++ optional enableVulkan "Vulkan";
disableFeatures = [
"OutdatedBuildDetector"
] # disable automatic updates
# The feature disable is needed for VAAPI to work correctly: https://github.com/brave/brave-browser/issues/20935
++ optionals enableVideoAcceleration [ "UseChromeOSDirectVideoDecoder" ];
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
inherit url hash;
};
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
doInstallCheck = stdenv.hostPlatform.isLinux;
nativeBuildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
dpkg
# override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
# Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
(buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
unzip
makeWrapper
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
# needed for GSETTINGS_SCHEMAS_PATH
glib
gsettings-desktop-schemas
gtk3
gtk4
# needed for XDG_ICON_DIRS
adwaita-icon-theme
];
installPhase =
lib.optionalString stdenv.hostPlatform.isLinux ''
runHook preInstall
mkdir -p $out $out/bin
cp -R usr/share $out
cp -R opt/ $out/opt
export BINARYWRAPPER=$out/opt/brave.com/brave/brave-browser
# Fix path to bash in $BINARYWRAPPER
substituteInPlace $BINARYWRAPPER \
--replace-fail /bin/bash ${stdenv.shell} \
--replace-fail 'CHROME_WRAPPER' 'WRAPPER'
ln -sf $BINARYWRAPPER $out/bin/brave
for exe in $out/opt/brave.com/brave/{brave,chrome_crashpad_handler}; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpath}" $exe
done
# Fix paths
substituteInPlace $out/share/applications/{brave-browser,com.brave.Browser}.desktop \
--replace-fail /usr/bin/brave-browser-stable $out/bin/brave
substituteInPlace $out/share/gnome-control-center/default-apps/brave-browser.xml \
--replace-fail /opt/brave.com $out/opt/brave.com
substituteInPlace $out/opt/brave.com/brave/default-app-block \
--replace-fail /opt/brave.com $out/opt/brave.com
# Correct icons location
icon_sizes=("16" "24" "32" "48" "64" "128" "256")
for icon in ''${icon_sizes[*]}
do
mkdir -p $out/share/icons/hicolor/$icon\x$icon/apps
ln -s $out/opt/brave.com/brave/product_logo_$icon.png $out/share/icons/hicolor/$icon\x$icon/apps/brave-browser.png
done
# Replace xdg-settings and xdg-mime
ln -sf ${xdg-utils}/bin/xdg-settings $out/opt/brave.com/brave/xdg-settings
ln -sf ${xdg-utils}/bin/xdg-mime $out/opt/brave.com/brave/xdg-mime
runHook postInstall
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/{Applications,bin}
cp -r . "$out/Applications/Brave Browser.app"
makeWrapper "$out/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" $out/bin/brave
runHook postInstall
'';
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
# Add command line args to wrapGApp.
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${rpath}
--prefix PATH : ${binpath}
--suffix PATH : ${
lib.makeBinPath [
xdg-utils
coreutils
]
}
--set CHROME_WRAPPER ${pname}
${optionalString (enableFeatures != [ ]) ''
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+,WaylandWindowDecorations --enable-wayland-ime=true}}"
''}
${optionalString (disableFeatures != [ ]) ''
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}"
''}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto}}"
${optionalString vulkanSupport ''
--prefix XDG_DATA_DIRS : "${addDriverRunpath.driverLink}/share"
''}
--add-flags ${escapeShellArg commandLineArgs}
)
'';
installCheckPhase = ''
# Bypass upstream wrapper which suppresses errors
$out/opt/brave.com/brave/brave --version
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://brave.com/";
description = "Privacy-oriented browser for Desktop and Laptop computers";
changelog =
"https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md#"
+ lib.replaceStrings [ "." ] [ "" ] version;
longDescription = ''
Brave browser blocks the ads and trackers that slow you down,
chew up your bandwidth, and invade your privacy. Brave lets you
contribute to your favorite creators automatically.
'';
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
uskudnik
rht
jefflabonte
nasirhm
buckley310
matteopacini
];
platforms = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
mainProgram = "brave";
};
}

View File

@@ -0,0 +1,39 @@
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage, ... }@args:
let
pname = "brave";
version = "1.83.112";
allArchives = {
aarch64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_arm64.deb";
hash = "sha256-IqPxbt3nCIrrqr3yVS0gDdiYsQ2OXVm3dabY8AH7IK0=";
};
x86_64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
hash = "sha256-Q0V5V9JYGAgKAV3L43fy5I8ojIcxyU7C5OnqvatlkPE=";
};
aarch64-darwin = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-v${version}-darwin-arm64.zip";
hash = "sha256-bHePzMfb/FcCkH2aWqi8669mYcfTT/908ZasxOhFDHk=";
};
x86_64-darwin = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-v${version}-darwin-x64.zip";
hash = "sha256-DNtEb7stYQ5uG+L7pdXXQZp/6dtx9eUlLgM0MpNLJac=";
};
};
archive =
if builtins.hasAttr stdenv.system allArchives then
allArchives.${stdenv.system}
else
throw "Unsupported platform.";
in
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) (
archive
// {
inherit pname version;
}
)

53
pkgs/by-name/br/brave/update.sh Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix jq
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
latestVersion="$(curl --fail -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/brave/brave-browser/releases/latest" | jq -r '.tag_name' | sed 's/^v//')"
hashAarch64="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/brave/brave-browser/releases/download/v${latestVersion}/brave-browser_${latestVersion}_arm64.deb")")"
hashAmd64="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/brave/brave-browser/releases/download/v${latestVersion}/brave-browser_${latestVersion}_amd64.deb")")"
hashAarch64Darwin="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/brave/brave-browser/releases/download/v${latestVersion}/brave-v${latestVersion}-darwin-arm64.zip")")"
hashAmd64Darwin="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/brave/brave-browser/releases/download/v${latestVersion}/brave-v${latestVersion}-darwin-x64.zip")")"
cat > $SCRIPT_DIR/package.nix << EOF
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage, ... }@args:
let
pname = "brave";
version = "${latestVersion}";
allArchives = {
aarch64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-browser_\${version}_arm64.deb";
hash = "${hashAarch64}";
};
x86_64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-browser_\${version}_amd64.deb";
hash = "${hashAmd64}";
};
aarch64-darwin = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-v\${version}-darwin-arm64.zip";
hash = "${hashAarch64Darwin}";
};
x86_64-darwin = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-v\${version}-darwin-x64.zip";
hash = "${hashAmd64Darwin}";
};
};
archive =
if builtins.hasAttr stdenv.system allArchives then
allArchives.\${stdenv.system}
else
throw "Unsupported platform.";
in
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) (
archive
// {
inherit pname version;
}
)
EOF

View File

@@ -0,0 +1,40 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "breads-ad";
version = "1.2.4-unstable-2024-05-27";
pyproject = true;
src = fetchFromGitHub {
owner = "oppsec";
repo = "breads";
rev = "bdfc8b5f0357a34847767505ddc98734ca3b491f";
hash = "sha256-U1q15D59N55qBf4NVOpe5RpQjlE1ye2TNNIZf2IZV3U=";
};
pythonRelaxDeps = [ "ldap3" ];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
impacket
ldap3
rich
];
# Project has no tests
doCheck = false;
meta = {
description = "Tool to evaluate Active Directory Security";
homepage = "https://github.com/oppsec/breads";
changelog = "https://github.com/oppsec/breads/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "breads-ad";
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
{
fetchFromGitHub,
glib,
gtk3,
openssl,
pkg-config,
python3,
rustPlatform,
lib,
wrapGAppsHook3,
}:
rustPlatform.buildRustPackage rec {
pname = "break-time";
version = "0.1.2";
src = fetchFromGitHub {
owner = "cdepillabout";
repo = "break-time";
rev = "v${version}";
sha256 = "sha256-q79JXaBwd/oKtJPvK2+72pY2YvaR3of2CMC8cF6wwQ8=";
};
cargoPatches = [
# update Cargo.lock to work with openssl 3
./openssl3-support.patch
];
cargoHash = "sha256-HthrPtIWvYLAQDpW12r250OWP7CF4SORlqFbxIq/Dzo=";
nativeBuildInputs = [
pkg-config
python3 # needed for Rust xcb package
wrapGAppsHook3
];
buildInputs = [
glib
gtk3
openssl
];
meta = with lib; {
description = "Break timer that forces you to take a break";
mainProgram = "break-time";
homepage = "https://github.com/cdepillabout/break-time";
license = with licenses; [ mit ];
maintainers = with maintainers; [ cdepillabout ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchgit,
zlib,
}:
let
lss = fetchgit {
url = "https://chromium.googlesource.com/linux-syscall-support";
rev = "v2022.10.12";
hash = "sha256-rF10v5oH4u9i9vnmFCVVl2Ew3h+QTiOsW64HeB0nRQU=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "breakpad";
version = "2024.02.16";
src = fetchgit {
url = "https://chromium.googlesource.com/breakpad/breakpad";
rev = "v${finalAttrs.version}";
hash = "sha256-yk+TSzjmAr9QMTYduKVe/Aizph/NNmSS385pvGJckiQ=";
};
buildInputs = [ zlib ];
postUnpack = ''
ln -s ${lss} $sourceRoot/src/third_party/lss
'';
meta = with lib; {
description = "Open-source multi-platform crash reporting system";
homepage = "https://chromium.googlesource.com/breakpad";
license = licenses.bsd3;
maintainers = with maintainers; [ berberman ];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,85 @@
#! /usr/bin/env bash
set -eu -o pipefail
# A shell implementation for pgrep as we don't want to depend on procps
pgrep(){
PATTERN="$1"
for pid_dir in /proc/[0-9]*; do
pid="${pid_dir##*/}"
# Attempt to open /proc/<PID>/cmdline for reading on a new file descriptor
# If we can't read it (no permission or doesn't exist), skip
exec {fd}< "$pid_dir/cmdline" 2>/dev/null || continue
cmdline=""
# Read each null-delimited token from /proc/<PID>/cmdline
# and join them with a space for easier pattern matching
while IFS= read -r -d $'\0' arg <&$fd; do
if [[ -z "$cmdline" ]]; then
cmdline="$arg"
else
cmdline="$cmdline $arg"
fi
done
# Close the file descriptor
exec {fd}>&-
# If cmdline is non-empty and matches the pattern, print the PID
if [[ -n "$cmdline" && "$cmdline" =~ $PATTERN ]]; then
echo "$pid"
fi
done
}
# helper to extract variables from the build env
getVar(){
while IFS= read -r -d $'\0' line; do
case "$line" in
*"$1="* )
echo "$line"
;;
esac
done < /proc/$pid/environ \
| cut -d "=" -f 2
}
id="$1"
pids="$(pgrep "sleep $id" || :)"
if [ -z "$pids" ]; then
echo "Error: No process found for 'sleep $id'. The build must still be running in order to attach. Also make sure it's not on a remote builder." >&2
exit 1s
elif [ "$(echo "$pids" | wc -l)" -ne 1 ]; then
echo "Error: Multiple processes found matching 'sleep $id'" >&2
exit 1
fi
pid="$(echo "$pids" | head -n1)"
# get the build top level directory inside the sandbox (eg. /build)
buildDir=$(getVar NIX_BUILD_TOP)
# bash is needed to load the env vars, as we do not know the syntax of the debug shell.
# bashInteractive is used instead of bash, as we depend on it anyways, due to it being
# the default debug shell
bashInteractive="$(getVar bashInteractive)"
# the debug shell will be started as interactive shell after loading the env vars
debugShell="$(getVar debugShell)"
# to drop the user into the working directory at the point of failure
pwd="$(readlink /proc/$pid/cwd)"
# enter the namespace of the failed build
# bash needs to be executed with --init-file /build/env-vars to include the bash native
# variables like ones declared via `declare -a`.
# If another shell is chosen via `debugShell`, it will only have simple env vars avaialable.
exec nsenter --mount --ipc --uts --pid --net --target "$pid" "$bashInteractive" -c "
set -eu -o pipefail
source \"$buildDir/env-vars\"
cd \"$pwd\"
if [ -n \"$debugShell\" ]; then
exec \"$debugShell\"
else
exec \"$bashInteractive\" --init-file \"$buildDir/env-vars\"
fi
"

View File

@@ -0,0 +1,18 @@
breakpointHook() {
local red='\033[0;31m'
local cyan='\033[0;36m'
local green='\033[0;32m'
local no_color='\033[0m'
# provide the user with an interactive shell for better experience
export bashInteractive="@bashInteractive@"
dumpVars
local id
id="$(shuf -i 999999-9999999 -n1)"
echo -e "${red}build for ${cyan}${name:-unknown}${red} failed in ${curPhase:-unknown} with exit code ${exitCode:-unknown}${no_color}"
echo -e "${green}To attach, run the following command:${no_color}"
echo -e "${green} sudo @attach@ $id${no_color}"
sleep "$id"
}
failureHooks+=(breakpointHook)

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
buildPackages,
bashInteractive,
makeSetupHook,
}:
let
attach = buildPackages.writeShellScriptBin "attach" ''
export PATH="''${PATH:+''${PATH}:}${
lib.makeBinPath [
buildPackages.bash
buildPackages.coreutils
buildPackages.util-linuxMinimal # needed for nsenter
]
}"
exec bash ${./attach.sh} "$@"
'';
in
makeSetupHook {
name = "breakpoint-hook";
meta.broken = !stdenv.buildPlatform.isLinux;
substitutions = {
attach = "${attach}/bin/attach";
# The default interactive shell in case $debugShell is not set in the derivation.
# Can be overridden to zsh or fish, etc.
# This shell is also used to load the env variables before the $debugShell is started.
bashInteractive = lib.getExe bashInteractive;
};
} ./breakpoint-hook.sh

View File

@@ -0,0 +1,9 @@
breakpointHook() {
local red='\033[0;31m'
local no_color='\033[0m'
echo -e "${red}build failed in ${curPhase} with exit code ${exitCode}${no_color}"
printf "To attach install cntr and run the following command as root:\n\n"
sh -c "echo ' cntr attach -t command cntr-${out}'; while true; do sleep 99999999; done"
}
failureHooks+=(breakpointHook)

View File

@@ -0,0 +1,6 @@
{ stdenv, makeSetupHook }:
makeSetupHook {
name = "breakpoint-hook";
meta.broken = !stdenv.buildPlatform.isLinux;
} ./breakpoint-hook.sh

View File

@@ -0,0 +1,55 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
inkscape,
xcursorgen,
accentColor ? null,
baseColor ? null,
borderColor ? null,
logoColor ? null,
}:
stdenvNoCC.mkDerivation {
pname = "breeze-hacked-cursor-theme";
version = "0-unstable-2024-01-28";
src = fetchFromGitHub {
owner = "clayrisser";
repo = "breeze-hacked-cursor-theme";
rev = "79dcc8925136ebe12612c6f124036c1aa816ebbe";
hash = "sha256-gm50qgHdbjDYMz/ksbDD8tMqY9AqJ23DKl4rPFNEDX8=";
};
postPatch = ''
patchShebangs build.sh recolor-cursor.sh
substituteInPlace Makefile \
--replace "~/.icons" "$out/share/icons"
./recolor-cursor.sh \
''
+ lib.optionalString (accentColor != null) ''
--accent-color "${accentColor}" \
''
+ lib.optionalString (baseColor != null) ''
--base-color "${baseColor}" \
''
+ lib.optionalString (borderColor != null) ''
--border-color "${borderColor}" \
''
+ lib.optionalString (logoColor != null) ''
--logo-color "${logoColor}"
'';
nativeBuildInputs = [
inkscape
xcursorgen
];
meta = with lib; {
homepage = "https://github.com/clayrisser/breeze-hacked-cursor-theme";
description = "Breeze Hacked cursor theme";
license = licenses.gpl2Only;
maintainers = with maintainers; [ anomalocaris ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,106 @@
{
lib,
stdenv,
fetchurl,
asar,
dpkg,
electron_36,
makeWrapper,
nixosTests,
undmg,
}:
let
inherit (stdenv.hostPlatform) system;
electron = electron_36;
sources = import ./sources.nix;
systemArgs =
rec {
x86_64-linux = {
src = fetchurl sources.x86_64-linux;
nativeBuildInputs = [
asar
dpkg
makeWrapper
];
installPhase = ''
mkdir -p $out/bin
mv usr/share $out/share
mkdir -p $out/share/breitbandmessung/resources
asar e opt/Breitbandmessung/resources/app.asar $out/share/breitbandmessung/resources
# At first start, the program checks for supported operating systems by using the `bizzby-lsb-release`
# module and only runs when it finds Debian/Ubuntu. So we present us as Debian and make it happy.
cat <<EOF > $out/share/breitbandmessung/resources/node_modules/bizzby-lsb-release/lib/lsb-release.js
module.exports = function release() {
return {
distributorID: "Debian",
description: "Debian GNU/Linux 10 (buster)",
release: "10",
codename: "buster"
}
}
EOF
makeWrapper ${electron}/bin/electron $out/bin/breitbandmessung \
--add-flags $out/share/breitbandmessung/resources/build/electron.js
# Fix the desktop link
substituteInPlace $out/share/applications/breitbandmessung.desktop \
--replace /opt/Breitbandmessung $out/bin
'';
};
x86_64-darwin = {
src = fetchurl sources.x86_64-darwin;
nativeBuildInputs = [ undmg ];
sourceRoot = "Breitbandmessung.app";
dontFixup = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/Applications/Breitbandmessung.app
cp -R . $out/Applications/Breitbandmessung.app
runHook postInstall
'';
};
aarch64-darwin = x86_64-darwin;
}
.${system} or {
src = throw "Unsupported system: ${system}";
};
in
stdenv.mkDerivation (
{
pname = "breitbandmessung";
inherit (sources) version;
passthru.tests = { inherit (nixosTests) breitbandmessung; };
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Broadband internet speed test app from the german Bundesnetzagentur";
homepage = "https://www.breitbandmessung.de";
license = licenses.unfree;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ b4dm4n ];
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}
// systemArgs
)

View File

@@ -0,0 +1,11 @@
{
version = "3.10.0";
x86_64-linux = {
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.10.0-linux.deb";
sha256 = "sha256-Lh1bVV7hp1XvQoeToxkOtT5Tdq7ayUDzR6D/VgDSIWQ=";
};
x86_64-darwin = {
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.10.0-mac.dmg";
sha256 = "sha256-sdBOcjc4q3LUKwCz+gHisMtg4aH1I21R6/5T5IZ/ah8=";
};
}

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix ripgrep
set -xeu -o pipefail
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
current="$(nix eval -f "$PACKAGE_DIR/sources.nix" --raw version || :)"
latest="$(curl -sS https://breitbandmessung.de/desktop-app | \
rg '.*Aktuelle Version der Desktop-App lautet:\s*([.0-9]+).*' -r '$1')"
if [[ $current != $latest ]]; then
linux_hash="$(nix store prefetch-file --json https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-linux.deb | jq -r .hash)"
darwin_hash="$(nix store prefetch-file --json https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-mac.dmg | jq -r .hash)"
cat <<EOF >"$PACKAGE_DIR/sources.nix"
{
version = "${latest}";
x86_64-linux = {
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-linux.deb";
sha256 = "${linux_hash}";
};
x86_64-darwin = {
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-mac.dmg";
sha256 = "${darwin_hash}";
};
}
EOF
fi

View File

@@ -0,0 +1,41 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "brev-cli";
version = "0.6.314";
src = fetchFromGitHub {
owner = "brevdev";
repo = "brev-cli";
rev = "v${version}";
sha256 = "sha256-/EzRKmpfQndZFL3c82u0w0V8EH/TFptU3zkHPvsIM6s=";
};
vendorHash = "sha256-CzGuEbq4I1ygYQsoyyXC6gDBMLg21dKQTKkrbwpAR2U=";
env.CGO_ENABLED = 0;
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
"-X github.com/brevdev/brev-cli/pkg/cmd/version.Version=${src.rev}"
];
postInstall = ''
mv $out/bin/brev-cli $out/bin/brev
'';
meta = {
description = "Connect your laptop to cloud computers";
mainProgram = "brev";
homepage = "https://github.com/brevdev/brev-cli";
changelog = "https://github.com/brevdev/brev-cli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dit7ya ];
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
meson,
ninja,
boost,
pandoc,
pkg-config,
xercesc,
xalanc,
qt6Packages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "brewtarget";
version = "4.2.1";
src = fetchFromGitHub {
owner = "Brewtarget";
repo = "brewtarget";
tag = "v${finalAttrs.version}";
hash = "sha256-/BEVnAtuwDnJXra9EAMD3LhA/93nFJ5ObCSgSy3CJnk=";
fetchSubmodules = true;
};
postPatch = ''
# 3 sed statements from below derived from AUR
# Disable boost-stacktrace_backtrace, requires an optional boost lib that's only built in Debianland
sed -i "/boostModules += 'stacktrace_backtrace'/ {N;N;d}" meson.build
# Make libbacktrace not required, we're not running the bt script
sed -i "/compiler\.find_library('backtrace'/ {n;s/true/false/}" meson.build
# Disable static linking
sed -i 's/static : true/static : false/g' meson.build
'';
nativeBuildInputs = [
meson
cmake
ninja
pkg-config
qt6Packages.wrapQtAppsHook
pandoc
];
buildInputs = [
boost
qt6Packages.qtbase
qt6Packages.qttools
qt6Packages.qtmultimedia
qt6Packages.qtsvg
xercesc
xalanc
];
meta = {
description = "Open source beer recipe creation tool";
mainProgram = "brewtarget";
homepage = "http://www.brewtarget.org/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
avnik
mmahut
];
};
})

View File

@@ -0,0 +1,142 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
cups,
perl,
coreutils,
gnused,
gnugrep,
brgenml1lpr,
debugLvl ? "0",
}:
/*
[Setup instructions](http://support.brother.com/g/s/id/linux/en/instruction_prn1a.html).
URI example
~ `lpd://BRW0080927AFBCE/binary_p1`
Logging
-------
`/tmp/br_cupswrapper_ml1.log` when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1`.
Note that when `DEBUG > 1` the wrapper stops performing its function. Better
keep `DEBUG == 1` unless this is desirable.
Now activable through this package's `debugLvl` parameter whose value is to be
used to establish `DEBUG`.
Issues
------
1. > Error: /tmp/brBrGenML1rc_15642 :cannot open file !!
Fixed.
2. > touch: cannot touch '/tmp/BrGenML1_latest_print_info': Permission denied
Fixed.
3. > perl: warning: Falling back to the standard locale ("C").
are supported and installed on your system.
LANG = "en_US.UTF-8"
LC_ALL = (unset),
LANGUAGE = (unset),
perl: warning: Please check that your locale settings:
perl: warning: Setting locale failed.
TODO: Address.
4. Since nixos 16.03 release, in `brother_lpdwrapper_BrGenML1`:
> sh: grep: command not found
sh: chmod: command not found
sh: cp: command not found
Error: /tmp/brBrGenML1rc_1850 :cannot open file !!
sh: sed: command not found
Fixed by use of a wrapper that brings `coreutils`, `gnused`, `gnugrep`
in `PATH`.
*/
stdenv.mkDerivation rec {
pname = "brgenml1cupswrapper";
version = "3.1.0-1";
src = fetchurl {
url = "https://download.brother.com/welcome/dlf101125/brgenml1cupswrapper-${version}.i386.deb";
sha256 = "0kd2a2waqr10kfv1s8is3nd5dlphw4d1343srdsbrlbbndja3s6r";
};
unpackPhase = ''
ar x $src
tar xfvz data.tar.gz
'';
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
cups
perl
coreutils
gnused
gnugrep
brgenml1lpr
];
dontBuild = true;
patchPhase = ''
WRAPPER=opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1
PAPER_CFG=opt/brother/Printers/BrGenML1/cupswrapper/paperconfigml1
substituteInPlace $WRAPPER \
--replace "basedir =~" "basedir = \"${brgenml1lpr}/opt/brother/Printers/BrGenML1\"; #" \
--replace "PRINTER =~" "PRINTER = \"BrGenML1\"; #" \
--replace "\$DEBUG=0;" "\$DEBUG=${debugLvl};"
# Fixing issue #1 and #2.
substituteInPlace $WRAPPER \
--replace "\`cp " "\`cp -p " \
--replace "\$TEMPRC\`" "\$TEMPRC; chmod a+rw \$TEMPRC\`" \
--replace "\`mv " "\`cp -p "
# This config script make this assumption that the *.ppd are found in a global location `/etc/cups/ppd`.
substituteInPlace $PAPER_CFG \
--replace "/etc/cups/ppd" "$out/share/cups/model"
'';
installPhase = ''
CUPSFILTER_DIR=$out/lib/cups/filter
CUPSPPD_DIR=$out/share/cups/model
CUPSWRAPPER_DIR=opt/brother/Printers/BrGenML1/cupswrapper
mkdir -p $out/$CUPSWRAPPER_DIR
cp -rp $CUPSWRAPPER_DIR/* $out/$CUPSWRAPPER_DIR
mkdir -p $CUPSFILTER_DIR
# Fixing issue #4.
makeWrapper \
$out/$CUPSWRAPPER_DIR/brother_lpdwrapper_BrGenML1 \
$CUPSFILTER_DIR/brother_lpdwrapper_BrGenML1 \
--prefix PATH : ${coreutils}/bin \
--prefix PATH : ${gnused}/bin \
--prefix PATH : ${gnugrep}/bin
mkdir -p $CUPSPPD_DIR
ln -s $out/$CUPSWRAPPER_DIR/brother-BrGenML1-cups-en.ppd $CUPSPPD_DIR
'';
dontPatchELF = true;
dontStrip = true;
meta = {
description = "Brother BrGenML1 CUPS wrapper driver";
homepage = "http://www.brother.com";
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ jraygauthier ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
boost,
m4ri,
gd,
}:
stdenv.mkDerivation rec {
version = "1.2.15";
pname = "brial";
src = fetchFromGitHub {
owner = "BRiAl";
repo = "BRiAl";
tag = version;
sha256 = "sha256-I8p2jdc2/oq9piy1QvNl+N0+MHDE5Xv1kawkRTjrWSU=";
};
# FIXME package boost-test and enable checks
doCheck = false;
configureFlags = [
"--with-boost-unit-test-framework=no"
];
buildInputs = [
boost
m4ri
gd
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
meta = with lib; {
homepage = "https://github.com/BRiAl/BRiAl";
description = "Legacy version of PolyBoRi maintained by sagemath developers";
license = licenses.gpl2Plus;
teams = [ teams.sage ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchurl,
openjdk,
libnotify,
makeWrapper,
tor,
p7zip,
bash,
writeScript,
libGL,
}:
let
briar-tor = writeScript "briar-tor" ''
#! ${bash}/bin/bash
exec ${tor}/bin/tor "$@"
'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "briar-desktop";
version = "0.6.4-beta";
src = fetchurl {
url = "https://desktop.briarproject.org/jars/linux/${finalAttrs.version}/briar-desktop-linux-${finalAttrs.version}.jar";
hash = "sha256-S7O625SWbgi4iby76Qe377NGiw4r9+VqgQh8kclKwMo=";
};
dontUnpack = true;
nativeBuildInputs = [
makeWrapper
p7zip
];
installPhase = ''
mkdir -p $out/{bin,lib}
cp ${finalAttrs.src} $out/lib/briar-desktop.jar
makeWrapper ${openjdk}/bin/java $out/bin/briar-desktop \
--add-flags "-jar $out/lib/briar-desktop.jar" \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
libnotify
libGL
]
}"
'';
fixupPhase = ''
# Replace the embedded Tor binary (which is in a Tar archive)
# with one from Nixpkgs.
cp ${briar-tor} ./tor
for arch in {aarch64,armhf,x86_64}; do
7z a tor_linux-$arch.zip tor
7z a $out/lib/briar-desktop.jar tor_linux-$arch.zip
done
'';
# TODO: Add a custom update script
meta = {
description = "Decentralized and secure messenger";
mainProgram = "briar-desktop";
homepage = "https://code.briarproject.org/briar/briar-desktop";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [
onny
supinie
];
teams = with lib.teams; [ ngi ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitHub,
libusb1,
pkg-config,
pmutils,
udev,
}:
let
version = "2.1.1";
daemonlib = fetchFromGitHub {
owner = "Tinkerforge";
repo = "daemonlib";
rev = "brickd-${version}";
sha256 = "sha256-0HhuC4r1S4NJa2FSJa7+fNCfcoRTBckikYbGSE+2FbE=";
};
in
stdenv.mkDerivation {
pname = "brickd";
inherit version;
src = fetchFromGitHub {
owner = "Tinkerforge";
repo = "brickd";
rev = "v${version}";
sha256 = "sha256-6w2Ew+dLMmdRf9CF3TdKHa0d5ZgmX5lKIR+5t3QAWFQ=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libusb1
pmutils
udev
];
# shell thing didn't work so i replaced it using nix
prePatch = ''
substituteInPlace src/brickd/Makefile --replace 'PKG_CONFIG := $(shell which pkg-config 2> /dev/null)' "PKG_CONFIG := $pkgconfig/bin/pkg_config";
'';
buildPhase = ''
# build the brickd binary
mkdir src/daemonlib
cp -r ${daemonlib}/* src/daemonlib
substituteInPlace src/daemonlib/utils.{c,h} \
--replace "_GNU_SOURCE" "__GLIBC__"
cd src/brickd
make
# build and execute the unit tests
cd ../tests
make
for i in array_test base58_test node_test putenv_test queue_test sha1_test; do
echo "running unit test $i:"
./$i
done
'';
installPhase = ''
cd ../brickd
mkdir -p $out/bin
cp brickd $out/bin/brickd
'';
meta = {
homepage = "https://www.tinkerforge.com/";
description = "Daemon (or service on Windows) that acts as a bridge between the Bricks/Bricklets and the API bindings for the different programming languages";
maintainers = [ lib.maintainers.qknight ];
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
mainProgram = "brickd";
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
qt6,
libsForQt5,
fetchFromGitHub,
gst_all_1,
cmake,
libglvnd,
onetbb,
ninja,
pkg-config,
}:
let
inherit (libsForQt5) qcoro;
in
stdenv.mkDerivation (finalAttrs: {
pname = "brickstore";
version = "2024.12.3";
src = fetchFromGitHub {
owner = "rgriebl";
repo = "brickstore";
tag = "v${finalAttrs.version}";
hash = "sha256-4sxPplZ1t8sSfwTCeeBtfU4U0gcE9FROt6dKvkfyO6Q=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
libglvnd
ninja
pkg-config
qcoro
qt6.qtdoc
qt6.qtdeclarative
qt6.qtimageformats
qt6.qtmultimedia
qt6.qtquick3d
qt6.qtquicktimeline
qt6.qtshadertools
qt6.qttools
qt6.qtwayland
qt6.wrapQtAppsHook
onetbb
];
patches = [
./qcoro-cmake.patch # Don't have CMake fetch qcoro from github, get it from nixpkgs
./qjsonvalue-include.patch # Add a required '#include <QtCore/QJsonValue>'
];
# Since we get qcoro from nixpkgs instead, change the CMake file to reflect the right directory
preConfigure = ''
substituteInPlace cmake/BuildQCoro.cmake \
--replace-fail \
'add_subdirectory(''${qcoro_SOURCE_DIR} ''${qcoro_BINARY_DIR} EXCLUDE_FROM_ALL)' \
'add_subdirectory(${qcoro.src} ${qcoro}bin/qcoro)'
'';
qtWrapperArgs = [
''
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${
lib.makeLibraryPath [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
gst_all_1.gst-libav
]
}
''
];
meta = {
changelog = "https://github.com/rgriebl/brickstore/blob/main/CHANGELOG.md";
description = "BrickLink offline management tool";
homepage = "https://www.brickstore.dev/";
license = lib.licenses.gpl3Plus;
longDescription = ''
BrickStore is a BrickLink offline management tool.
It is multi-platform (Windows, macOS and Linux as well as iOS and Android),
multilingual (currently English, German, Spanish, Swedish and French), fast and stable.
'';
maintainers = with lib.maintainers; [ legojames ];
mainProgram = "brickstore";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,20 @@
diff --git a/cmake/BuildQCoro.cmake b/cmake/BuildQCoro.cmake
index 941e813..41c88c6 100644
--- a/cmake/BuildQCoro.cmake
+++ b/cmake/BuildQCoro.cmake
@@ -14,14 +14,6 @@ if (BACKEND_ONLY)
set(QCORO_WITH_QML OFF)
endif()
-FetchContent_Declare(
- qcoro
- GIT_REPOSITORY https://github.com/danvratil/qcoro.git
- GIT_TAG v${QCORO_VERSION}
- SOURCE_SUBDIR "NeedManualAddSubDir" # make it possible to add_subdirectory below
-)
-
-FetchContent_MakeAvailable(qcoro)
set(mll ${CMAKE_MESSAGE_LOG_LEVEL})
if (NOT VERBOSE_FETCH)

View File

@@ -0,0 +1,12 @@
diff --git a/src/bricklink/order.cpp b/src/bricklink/order.cpp
index 14426e5b..59856f0c 100755
--- a/src/bricklink/order.cpp
+++ b/src/bricklink/order.cpp
@@ -16,6 +16,7 @@
#include <QtSql/QSqlError>
#include <QtSql/QSqlQueryModel>
#include <QtCore/QLoggingCategory>
+#include <QtCore/QJsonValue>
#include "bricklink/core.h"
#include "bricklink/io.h"

View File

@@ -0,0 +1,21 @@
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
+AC_CHECK_TOOL([AR], [ar])
dnl Checks for header files.
AC_HEADER_STDC
--- a/libbridge/Makefile.in
+++ b/libbridge/Makefile.in
@@ -1,7 +1,7 @@
KERNEL_HEADERS=-I@KERNEL_HEADERS@
-AR=ar
+AR=@AR@
RANLIB=@RANLIB@
CC=@CC@

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
fetchpatch,
}:
stdenv.mkDerivation rec {
pname = "bridge-utils";
version = "1.7.1";
src = fetchurl {
url = "https://kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-${version}.tar.xz";
sha256 = "sha256-ph2L5PGhQFxgyO841UTwwYwFszubB+W0sxAzU2Fl5g4=";
};
patches = [
./autoconf-ar.patch
(fetchpatch {
name = "musl-includes.patch";
url = "https://git.alpinelinux.org/aports/plain/main/bridge-utils/fix-PATH_MAX-on-ppc64le.patch?id=12c9046eee3a0a35665dc4e280c1f5ae2af5845d";
sha256 = "sha256-uY1tgJhcm1DFctg9scmC8e+mgowgz4f/oF0+k+x+jqw=";
})
];
nativeBuildInputs = [ autoreconfHook ];
meta = {
description = "Userspace tool to configure linux bridges (deprecated in favour or iproute2)";
mainProgram = "brctl";
homepage = "https://wiki.linuxfoundation.org/networking/bridge";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "brig";
version = "0.4.1";
src = fetchFromGitHub {
owner = "sahib";
repo = "brig";
rev = "v${version}";
sha256 = "0gi39jmnzqrgj146yw8lcmgmvzx7ii1dgw4iqig7kx8c0jiqi600";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
]
++ lib.mapAttrsToList (n: v: "-X github.com/sahib/brig/version.${n}=${v}") {
Major = lib.versions.major version;
Minor = lib.versions.minor version;
Patch = lib.versions.patch version;
ReleaseType = "";
BuildTime = "1970-01-01T00:00:00+0000";
GitRev = src.rev;
};
postInstall = ''
installShellCompletion --cmd brig \
--bash $src/autocomplete/bash_autocomplete \
--zsh $src/autocomplete/zsh_autocomplete
'';
# There are no tests for the brig executable.
doCheck = false;
meta = with lib; {
description = "File synchronization on top of IPFS with a git-like interface and a FUSE filesystem";
longDescription = ''
brig is a distributed and secure file synchronization tool with a version
control system. It is based on IPFS, written in Go and will feel familiar
to git users. Think of it as a swiss army knife for file synchronization
or as a peer to peer alternative to Dropbox.
'';
homepage = "https://brig.readthedocs.io";
changelog = "https://github.com/sahib/brig/releases/tag/${src.rev}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ offline ];
mainProgram = "brig";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
systemd,
coreutils,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "brightnessctl";
version = "0.5.1";
src = fetchFromGitHub {
owner = "Hummer12007";
repo = "brightnessctl";
tag = version;
sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail "pkg-config" "$PKG_CONFIG"
substituteInPlace 90-brightnessctl.rules \
--replace-fail /bin/ ${coreutils}/bin/
'';
makeFlags = [
"PREFIX="
"DESTDIR=$(out)"
"ENABLE_SYSTEMD=1"
];
installTargets = [
"install"
"install_udev_rules"
];
nativeBuildInputs = [
pkg-config
udevCheckHook
];
buildInputs = [ systemd ];
doInstallCheck = true;
meta = with lib; {
homepage = "https://github.com/Hummer12007/brightnessctl";
description = "This program allows you read and control device brightness";
license = licenses.mit;
maintainers = with maintainers; [ megheaiulian ];
platforms = platforms.linux;
mainProgram = "brightnessctl";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "brill";
version = "4.000.073";
src = fetchzip {
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttf -t $out/share/fonts/truetype
install -Dm644 *agreement.pdf -t $out/share/licenses/brill
install -Dm644 *use.pdf -t $out/share/doc/brill
runHook postInstall
'';
meta = with lib; {
description = "In-house serif typeface for the publishing house Brill, designed by John Hudson; free for non-commercial use";
longDescription = ''
Brill has a neo-classical design geared towards optimum legibility.
According to designer John Hudson (Tiro Typeworks):
the mostly vertical contrast axis and expansion stroke model of the Brill types were chosen because they favour the mirrored letters of the International Phonetic Association alphabet. There is an inherent stability in this style that makes it more easily adaptable to a wide variety of shapes than, for instance, a renaissance style type with an oblique axis and broad-nib modelling.
Technically, the Brill fonts have to be able to legibly display any combination of the supported characters that might be encountered in text, including sequences of combining diacritic marks above and below letters, and to be able to do so in typographically sophisticated ways involving smallcaps etc. The OpenType Layout programming in the fonts includes smart contextual rules affecting the shape, spacing and mark positioning of characters. The idea is that users will be able to throw pretty much any text at these fonts and get back a legible and aesthetically pleasing display.
'';
homepage = "https://brill.com/page/BrillFont/brill-typeface";
downloadPage = "https://brill.com/page/419382";
license = licenses.unfree;
platforms = platforms.all;
maintainers = with maintainers; [ trespaul ];
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitLab,
go-md2man,
coreutils,
replaceVars,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "brillo";
version = "1.4.13";
src = fetchFromGitLab {
owner = "cameronnemo";
repo = "brillo";
rev = "v${version}";
hash = "sha256-+BUyM3FFnsk87NFaD9FBwdLqf6wsNhX+FDB7nqhgAmM=";
};
patches = [
(replaceVars ./udev-rule.patch {
inherit coreutils;
# patch context
group = null;
})
];
nativeBuildInputs = [
go-md2man
udevCheckHook
];
makeFlags = [
"PREFIX=$(out)"
"AADIR=$(out)/etc/apparmor.d"
];
doInstallCheck = true;
installTargets = [ "install-dist" ];
meta = with lib; {
description = "Backlight and Keyboard LED control tool";
homepage = "https://gitlab.com/cameronnemo/brillo";
mainProgram = "brillo";
license = [
licenses.gpl3Only
licenses.bsd0
];
platforms = platforms.linux;
maintainers = [ maintainers.alexarice ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/contrib/udev.in b/contrib/udev.in
index 0625952..a6c940e 100644
--- a/contrib/udev.in
+++ b/contrib/udev.in
@@ -1,4 +1,4 @@
-ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp @group@ /sys/class/backlight/%k/brightness"
-ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
-ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chgrp @group@ /sys/class/leds/%k/brightness"
-ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness"
+ACTION=="add", SUBSYSTEM=="backlight", RUN+="@coreutils@/bin/chgrp @group@ /sys/class/backlight/%k/brightness"
+ACTION=="add", SUBSYSTEM=="backlight", RUN+="@coreutils@/bin/chmod g+w /sys/class/backlight/%k/brightness"
+ACTION=="add", SUBSYSTEM=="leds", RUN+="@coreutils@/bin/chgrp @group@ /sys/class/leds/%k/brightness"
+ACTION=="add", SUBSYSTEM=="leds", RUN+="@coreutils@/bin/chmod g+w /sys/class/leds/%k/brightness"

View File

@@ -0,0 +1,172 @@
fetchFromGitHub:
# generated using https://gist.github.com/sifmelcara/895c71f99500b9d56d68e9a866b58821
''
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-array";
rev = "d10f2f8b2aec7c7e736ace01e8a399e5ae5e7c3a";
sha256 = "sha256-4t6+gh2V57SueDp9Tn6vTuxQCZNGzjLdJEhzIEqRjdI=";
}
} array
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-bopomofo";
rev = "7046ffe42b46915947117f80d901fb9a6e19c1a7";
sha256 = "09w8jl2dlgp72k49x0l2jiaqb359v576kai4xww6cljgr24ng8pl";
}
} bopomofo
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-cangjie";
rev = "64242be99c1e6793c9f40fef296a81d07a84e976";
sha256 = "0v5sk8zrm5p5gg8lszqm0imj9jswjlnfq87nw6m9pg5h5al230ja";
}
} cangjie
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-combo-pinyin";
rev = "97a7dc4670e0f90ad28e7d67c1543f4f0adc531d";
sha256 = "0y8iyvq7z6xj3lk2ppk4ggz297wn1r2xxbv53f2710jc7gyzf04q";
}
} combo-pinyin
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-double-pinyin";
rev = "1b75af4239897fd1e4c99d625b62093e66baff14";
sha256 = "0p54qx5a6rr55hl997kdcfxjczd9lcddrc5xsy7nhlfyc6108s2v";
}
} double-pinyin
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-emoji";
rev = "7e527056fe055237fee59463e0d445f3909aaf0c";
sha256 = "04d35n254viw29yyjf3ml7xljmi63sqgg870swlbi5bikcx7n9jf";
}
} emoji
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-essay";
rev = "595e35756d16d57d09405e243302b65b4384b5b4";
sha256 = "10kqhvrz8x17b2pf6x2x2znz5y6cj05c4rgwi1f0xhxiyrgjw9gm";
}
} essay
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-ipa";
rev = "9e02f8a02e9febb7b2df25f6906881a1df934811";
sha256 = "1g4v4j1gnv1qspfz88liwj1aa4gaa3aax0x2cif4vxicsm7w372m";
}
} ipa
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-jyutping";
rev = "3cc76e6e15cc05f1f94b89e750c21f87ce8fc0e4";
sha256 = "1yggz0yb84z8810s2gmsxkm9lh57fdzddx5v2rb5mqcwnimsd6ap";
}
} jyutping
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-luna-pinyin";
rev = "da00c3a6f932f094666e98a09f6ce9c7d74c334c";
sha256 = "0q3g1hj9bay5865h3pz7gv46d7wfka1jdxnddxcbp4zn7gjpsd48";
}
} luna-pinyin
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-middle-chinese";
rev = "6f9731bac8f289f77d35f1090159f1937e38c1f7";
sha256 = "0xd9iwk4j5043gfmp7rb57hbarfm6sxr32wiasi6p3c5g355zn89";
}
} middle-chinese
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-pinyin-simp";
rev = "38c08403c22845f7e2965c1d7a1514b41755d7dc";
sha256 = "1c0cqljx3d93w27y2flxyqcfd3rd9fvixbw6mxgfjzdb3s42bn8h";
}
} pinyin-simp
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-prelude";
rev = "120c2aa73b1b5e1bce904901bf13f506295004a5";
sha256 = "1aah9z58gkqrc18zadsq598ybj8ra22bgka3gma2jmi3rls2znq4";
}
} prelude
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-quick";
rev = "638abf270e121bc2bfc6029a14ee85a3f4c2188b";
sha256 = "0l1pma0yxrypnb5cq7jiczy0wa42kdqsc1brqkkccdnp08pa1p1m";
}
} quick
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-scj";
rev = "6b74ce14be0464bf076d7adc40aea4b120f233ec";
sha256 = "0lr92knr41mlqd1s0g2lh2h2qr8xka1s46x7iv4d6ghjf0id4gz6";
}
} scj
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-soutzoe";
rev = "3ab93d1b9ca9ca7cf17ff32bb4418b7a095afc3c";
sha256 = "1glbvgzx4psasq23511k8ymd7mf1pqvm3z18nzszhs00iif66s3m";
}
} soutzoe
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-stenotype";
rev = "766f22565f83f5c63c0ea195c936779ec6ae824d";
sha256 = "0jsvfq7xim99zs5imyk7rpknlaimk6nlxy38fmfxa1r843781mfd";
}
} stenotype
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-stroke";
rev = "e048967a4c1b956575828f1a20e565efed4b1137";
sha256 = "10asdz5bj12pnji7afzls6jd9dn2v90l2dgdjf0jfp2kfzd6pxnl";
}
} stroke
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-terra-pinyin";
rev = "e303507e728def38739f5761c50722eae1f06dd5";
sha256 = "1krbmx2iq3zw4q1x4aa9c72b9xgrnjrhyxa4h5hnq5l29p9qms4d";
}
} terra-pinyin
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-wubi";
rev = "97b7d9f93378e98fd11167bd80d54c40e67076aa";
sha256 = "1cdpbqqkqjbizja0w3f7a826a5bxb39nlf9qf2130x9havmkc89z";
}
} wubi
ln -sv ${
fetchFromGitHub {
owner = "rime";
repo = "rime-wugniu";
rev = "de40b29f8218cc852bf82b315c7070f1d50bda02";
sha256 = "1m7miwsqpy49cgqd1bl7z5lkkirj3lc2bdwd1zqfg5zbgfwn0rp8";
}
} wugniu
''

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchFromGitHub,
librime,
}:
stdenv.mkDerivation {
pname = "brise";
version = "unstable-2017-09-16";
src = fetchFromGitHub {
owner = "rime";
repo = "brise";
rev = "1cfb0fe1d3a4190ce5d034f141941156dd271e80";
sha256 = "1l13j3cfwida0ycl874fizz2jwjvlxid589a1iciqa9y25k21ql7";
};
buildInputs = [ librime ];
postPatch = ''
patchShebangs scripts/*
'';
# we need to use fetchFromGitHub to fetch sub-packages before we 'make',
# since nix won't allow networking during 'make'
preBuild = import ./fetchPackages.nix fetchFromGitHub;
makeFlags = [
"BRISE_BUILD_BINARIES=yes"
"PREFIX=$(out)"
];
enableParallelBuilding = true;
meta = with lib; {
description = "Rime Schema Repository";
longDescription = ''
This software is a collection of data packages used by Rime
to support various Chinese input methods, including those based on
modern dialects or historical diasystems of the Chinese language.
'';
homepage = "https://rime.im";
# Note that individual packages in this collection
# may be released under different licenses
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.sifmelcara ];
};
}

View File

@@ -0,0 +1,36 @@
# The releases of this project are apparently precompiled to .jar files.
{
lib,
stdenv,
fetchurl,
jre,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "briss";
version = "0.9";
src = fetchurl {
url = "mirror://sourceforge/briss/briss-${version}.tar.gz";
sha256 = "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p "$out/bin";
mkdir -p "$out/share";
install -D -m444 -t "$out/share" *.jar
makeWrapper "${jre}/bin/java" "$out/bin/briss" --add-flags "-Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\""
'';
meta = {
homepage = "https://sourceforge.net/projects/briss/";
description = "Java application for cropping PDF files";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.gpl3;
platforms = lib.platforms.unix;
mainProgram = "briss";
};
}

View File

@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchurl,
alsa-lib,
libjack2,
pkg-config,
libX11,
libXext,
xorgproto,
libpulseaudio,
copyDesktopItems,
makeDesktopItem,
}:
stdenv.mkDerivation rec {
pname = "bristol";
version = "0.60.11";
src = fetchurl {
url = "mirror://sourceforge/bristol/${pname}-${version}.tar.gz";
hash = "sha256-fR8LvQ19MD/HfGuVSbYXCNeoO03AB4GAEbH1XR+pIro=";
};
nativeBuildInputs = [
pkg-config
copyDesktopItems
];
buildInputs = [
alsa-lib
libjack2
libpulseaudio
libX11
libXext
xorgproto
];
postPatch = ''
sed -i '41,43d' libbristolaudio/audioEngineJack.c # disable alsa/iatomic
sed -i '35i void doPitchWheel(Baudio *baudio);' bristol/bristolmemorymoog.c
'';
configureFlags = [
"--enable-jack-default-audio"
"--enable-jack-default-midi"
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of
# `event'; brightonMixerMenu.o:/build/bristol-0.60.11/brighton/brightonMixerMenu.c:1182: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon -Wno-implicit-int";
preInstall = ''
sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol
sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol
'';
postInstall = ''
mkdir -p $out/share/icons/hicolor/scalable/apps/
ln -s $out/share/bristol/bitmaps/bicon.svg $out/share/icons/hicolor/scalable/apps/
'';
desktopItems = [
(makeDesktopItem {
name = "Bristol";
exec = "bristol";
icon = "bicon";
desktopName = "Bristol";
comment = "Graphical user interface for the Bristol synthesizer emulator";
categories = [ "AudioVideo" ];
})
];
meta = {
description = "Range of synthesiser, electric piano and organ emulations";
homepage = "https://bristol.sourceforge.net";
license = lib.licenses.gpl3;
platforms = [
"x86_64-linux"
"i686-linux"
];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
zlib,
cups,
}:
stdenv.mkDerivation rec {
pname = "brlaser";
version = "6.2.7";
src = fetchFromGitHub {
owner = "Owl-Maintain";
repo = "brlaser";
tag = "v${version}";
hash = "sha256-a+TjLmjqBz0b7v6kW1uxh4BGzrYOQ8aMdVo4orZeMT4=";
};
nativeBuildInputs = [
cmake
cups
];
buildInputs = [
zlib
cups
];
cmakeFlags = [
# NOTE: this can be removed once version 6.2.8 is released
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
"-DCUPS_SERVER_BIN=lib/cups"
"-DCUPS_DATA_DIR=share/cups"
];
meta = {
description = "CUPS driver for Brother laser printers";
longDescription = ''
Although most Brother printers support a standard printer language such as PCL or PostScript, not all do. If you have a monochrome Brother laser printer (or multi-function device) and the other open source drivers don't work, this one might help.
This driver is known to work with many printers in the DCP, HL and MFC series, along with a few others.
See the homepage for a full list.
'';
homepage = "https://github.com/Owl-Maintain/brlaser";
changelog = "https://github.com/Owl-Maintain/brlaser/releases/tag/v${version}";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ onny ];
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
fontconfig,
libX11,
libXi,
freetype,
libgbm,
}:
stdenv.mkDerivation rec {
pname = "brlcad";
version = "7.38.2";
src = fetchFromGitHub {
owner = "BRL-CAD";
repo = "brlcad";
rev = "refs/tags/rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
hash = "sha256-23UTeH4gY2x/QGYZ64glAkf6LmsXBAppIOHgoUdxgpo=";
};
patches = [
# This commit was bringing an impurity in the rpath resulting in:
# RPATH of binary /nix/store/rq2hjvfgq2nvh5zxch51ij34rqqdpark-brlcad-7.38.0/bin/tclsh contains a forbidden reference to /build/
(fetchpatch {
url = "https://github.com/BRL-CAD/brlcad/commit/fbdbf042b2db4c7d46839a17bbf4985cdb81f0ae.patch";
revert = true;
hash = "sha256-Wfihd7TLkE8aOpLdDtYmhhd7nZijiVGh1nbUjWr/BjQ=";
})
];
nativeBuildInputs = [
cmake
];
buildInputs = [
fontconfig
libX11
libXi
freetype
libgbm
];
cmakeFlags = [
"-DBRLCAD_ENABLE_STRICT=OFF"
];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
meta = with lib; {
homepage = "https://brlcad.org";
description = "BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system";
changelog = "https://github.com/BRL-CAD/brlcad/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
license = with licenses; [
lgpl21
bsd2
];
maintainers = with maintainers; [ GaetanLepage ];
platforms = platforms.linux;
# error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined.
broken = stdenv.system == "aarch64-linux";
};
}

View File

@@ -0,0 +1,144 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
python3,
bluez,
tcl,
acl,
kmod,
coreutils,
shadow,
util-linux,
alsaSupport ? stdenv.hostPlatform.isLinux,
alsa-lib,
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
ncurses,
udevCheckHook,
buildPackages,
}:
stdenv.mkDerivation rec {
pname = "brltty";
version = "6.8";
src = fetchurl {
url = "https://brltty.app/archive/brltty-${version}.tar.gz";
sha256 = "sha256-MoDYjHU6aJY9e5cgjm9InOEDGCs+jvlEurMWg9wo4RY=";
};
nativeBuildInputs = [
pkg-config
python3.pkgs.cython
python3.pkgs.setuptools
tcl # One of build scripts require tclsh
udevCheckHook
];
buildInputs = [
bluez
ncurses.dev
tcl # For TCL bindings
]
++ lib.optional alsaSupport alsa-lib
++ lib.optional systemdSupport systemd;
doInstallCheck = true;
meta = {
description = "Access software for a blind person using a braille display";
longDescription = ''
BRLTTY is a background process (daemon) which provides access to the Linux/Unix
console (when in text mode) for a blind person using a refreshable braille display.
It drives the braille display, and provides complete screen review functionality.
Some speech capability has also been incorporated.
'';
homepage = "https://brltty.app";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.bramd ];
platforms = lib.platforms.all;
};
makeFlags = [
"PYTHON_PREFIX=$(out)"
"SYSTEMD_UNITS_DIRECTORY=$(out)/lib/systemd/system"
"SYSTEMD_USERS_DIRECTORY=$(out)/lib/sysusers.d"
"SYSTEMD_FILES_DIRECTORY=$(out)/lib/tmpfiles.d"
"UDEV_PARENT_LOCATION=$(out)/lib"
"INSTALL_COMMANDS_DIRECTORY=$(out)/libexec/brltty"
"UDEV_RULES_TYPE=all"
"POLKIT_POLICY_DIR=$(out)/share/polkit-1/actions"
"POLKIT_RULE_DIR=$(out)/share/polkit-1/rules.d"
"TCL_DIR=$(out)/lib"
];
configureFlags = [
"--with-writable-directory=/run/brltty"
"--with-updatable-directory=/var/lib/brltty"
"--with-api-socket-path=/var/lib/BrlAPI"
];
installFlags = [
"install-systemd"
"install-udev"
"install-polkit"
];
env = lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
# Build platform compilers for mk4build and second pass of ./configure
CC_FOR_BUILD = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc";
};
preConfigure = ''
substituteInPlace configure --replace-fail "/sbin/ldconfig -n" "true"
# Some script needs a working tclsh shebang
patchShebangs .
# Skip impure operations
substituteInPlace Programs/Makefile.in \
--replace-fail install-apisoc-directory "" \
--replace-fail install-api-key ""
''
+ lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
# ./configure call itself second time for build platform, if it fail -- it fails silently, make it visible
# (this is not mandatory changing, but make further maintaining easier)
substituteInPlace mk4build \
--replace-fail "--quiet" ""
# Respect targetPrefix when invoking ar
substituteInPlace Programs/Makefile.in \
--replace-fail "ar " "$AR "
'';
postInstall = ''
# Rewrite absolute paths
substituteInPlace $out/bin/brltty-mkuser \
--replace '/sbin/nologin' '${shadow}/bin/nologin'
(
cd $out/lib
substituteInPlace systemd/system/brltty@.service \
--replace '/sbin/modprobe' '${kmod}/bin/modprobe'
# Ensure the systemd-wrapper script uses the correct path to the brltty binary
sed "/^Environment=\"BRLTTY_EXECUTABLE_ARGUMENTS.*/a Environment=\"BRLTTY_EXECUTABLE_PATH=$out/bin/brltty\"" -i systemd/system/brltty@.service
substituteInPlace systemd/system/brltty-device@.service \
--replace '/usr/bin/true' '${coreutils}/bin/true'
substituteInPlace udev/rules.d/90-brltty-uinput.rules \
--replace '/usr/bin/setfacl' '${acl}/bin/setfacl'
substituteInPlace udev/rules.d/90-brltty-hid.rules \
--replace '/usr/bin/setfacl' '${acl}/bin/setfacl'
substituteInPlace tmpfiles.d/brltty.conf \
--replace "$out/etc" '/etc'
# Remove unused commands from udev rules
sed '/initctl/d' -i udev/rules.d/90-brltty-usb-generic.rules
sed '/initctl/d' -i udev/rules.d/90-brltty-usb-customized.rules
# Remove pulse-access group from systemd unit and sysusers
substituteInPlace systemd/system/brltty@.service \
--replace 'SupplementaryGroups=pulse-access' '# SupplementaryGroups=pulse-access'
substituteInPlace sysusers.d/brltty.conf \
--replace 'm brltty pulse-access' '# m brltty pulse-access'
)
substituteInPlace $out/libexec/brltty/systemd-wrapper \
--replace 'logger' "${util-linux}/bin/logger" \
--replace 'udevadm' "${systemd}/bin/udevadm"
'';
}

View File

@@ -0,0 +1,132 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
ant,
jdk8,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
strip-nondeterminism,
stripJavaArchivesHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "brmodelo";
version = "3.31";
src = fetchFromGitHub {
owner = "chcandido";
repo = "brmodelo";
rev = finalAttrs.version;
hash = "sha256-YJcGfrcB+Qw35bMnqVs/tBzMGVj2DmfhRZ0YsSGGGSc=";
};
nativeBuildInputs = [
ant
jdk8
makeWrapper
copyDesktopItems
strip-nondeterminism
stripJavaArchivesHook
];
patches = [
# Fixes for building with Ant.
# https://github.com/chcandido/brModelo/pull/22
(fetchpatch {
name = "fix-self-closing-element-not-allowed.patch";
url = "https://github.com/yuuyins/brModelo/commit/0d712b74fd5d29d67be07480ed196da28a77893b.patch";
hash = "sha256-yy03arE6xetotzyvpToi9o9crg3KnMRn1J70jDUvSXE=";
})
(fetchpatch {
name = "fix-tag-closing.patch";
url = "https://github.com/yuuyins/brModelo/commit/e8530ff75f024cf6effe0408ed69985405e9709c.patch";
hash = "sha256-MNuh/ORbaAkB5qDSlA/nPrXN+tqzz4oOglVyEtSangI=";
})
(fetchpatch {
name = "fix-bad-use-greater-than.patch";
url = "https://github.com/yuuyins/brModelo/commit/498a6ef8129daff5a472b318f93c8f7f2897fc7f.patch";
hash = "sha256-MmAwYUmx38DGRsiSxCWCObtpqxk0ykUQiDSC76bCpFc=";
})
(fetchpatch {
name = "fix-param-errors.patch";
url = "https://github.com/yuuyins/brModelo/commit/8a508aaba0bcffe13a3f95cff495230beea36bc4.patch";
hash = "sha256-qME9gZChSMzu1vs9HaosD+snb+jlOrQLY97meNoA8oU=";
})
# Add SVG icons.
# https://github.com/chcandido/brModelo/pull/23
(fetchpatch {
name = "add-brmodelo-logo-icons-svg.patch";
url = "https://github.com/yuuyins/brModelo/commit/f260b82b664fad3325bbf3ebd7a15488d496946b.patch";
hash = "sha256-UhgcWxsHkNFS1GgaRnmlZohjDR8JwHof2cIb3SBetYs=";
})
];
buildPhase = ''
runHook postBuild
ant
runHook preBuild
'';
desktopItems = [
(makeDesktopItem {
name = "brmodelo";
desktopName = "brModelo";
genericName = "Entity-relationship diagramming tool";
exec = "brmodelo";
icon = "brmodelo";
comment = finalAttrs.meta.description;
categories = [
"Development"
"Education"
"Database"
"2DGraphics"
"ComputerScience"
"DataVisualization"
"Engineering"
"Java"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/doc/brmodelo
cp -rv ./dist/javadoc $out/share/doc/brmodelo/
install -Dm755 ./dist/brModelo.jar -t $out/share/java/
# NOTE: The standard Java GUI toolkit has a
# hard-coded list of "non-reparenting" window managers,
# which cause issues while running brModelo
# in WMs that are not in that list (e.g. XMonad).
# Solution/Workaround: set the environment variable
# _JAVA_AWT_WM_NONREPARENTING=1.
makeWrapper ${jdk8}/bin/java $out/bin/brmodelo \
--prefix _JAVA_AWT_WM_NONREPARENTING : 1 \
--prefix _JAVA_OPTIONS " " "-Dawt.useSystemAAFontSettings=gasp" \
--add-flags "-jar $out/share/java/brModelo.jar"
for size in 16 24 32 48 64 128 256; do
install -Dm644 ./src/imagens/icone_"$size"x"$size".svg \
$out/share/icons/hicolor/"$size"x"$size"/apps/brmodelo.svg
done
runHook postInstall
'';
preFixup = ''
find $out/share/doc/brmodelo/javadoc -name "*.html" -exec strip-nondeterminism --type javadoc {} +
'';
meta = with lib; {
description = "Entity-relationship diagram tool for making conceptual and logical database models";
homepage = "https://github.com/chcandido/brModelo";
license = licenses.gpl3;
mainProgram = "brmodelo";
maintainers = [ ];
};
})

View File

@@ -0,0 +1,13 @@
diff --git a/main.go b/main.go
index 1814da0..2befc13 100644
--- a/main.go
+++ b/main.go
@@ -175,6 +175,8 @@ func main() {
if os.Getenv("APP_ENV") == "development" {
log.Println("Loading `" + envFileDev + "`")
return godotenv.Load(envFileDev)
+ } else if os.Getenv("APP_ENV") == "nixos" {
+ return nil
} else {
if _, err := os.Stat("./web/build"); os.IsNotExist(err) {
return noBuildDirectoryErr

View File

@@ -0,0 +1,69 @@
{
lib,
nixosTests,
fetchFromGitHub,
buildNpmPackage,
buildGoModule,
}:
let
name = "broadcast-box";
version = "0-unstable-2025-06-04";
src = fetchFromGitHub {
repo = "broadcast-box";
owner = "Glimesh";
rev = "a091f147f750759084a2c9d25a12e815e2feebf8";
hash = "sha256-Evhye+DYtFM/VjxqmhH5kU32khvEFUxTUgH9DXytIbo=";
};
frontend = buildNpmPackage {
inherit version;
pname = "${name}-web";
src = "${src}/web";
npmDepsHash = "sha256-e1cCezmF20Q6JEXwPb1asRSXuC/GGaR+ImvrTabLl5c=";
preBuild = ''
# The VITE_API_PATH environment variable is needed
cp "${src}/.env.production" ../
'';
installPhase = ''
mkdir -p $out
cp -r build $out
'';
};
in
buildGoModule {
inherit version src frontend;
pname = name;
vendorHash = "sha256-Jpee7UmG9AB9SOoTv2fPP2l5BmkDPPdciGFu9Naq9h8=";
proxyVendor = true; # fixes darwin/linux hash mismatch
patches = [ ./allow-no-env.patch ];
postPatch = ''
substituteInPlace main.go \
--replace-fail './web/build' '${placeholder "out"}/share'
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r $frontend/build/* $out/share
install -Dm755 $GOPATH/bin/broadcast-box -t $out/bin
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) broadcast-box;
};
meta = {
description = "WebRTC broadcast server";
homepage = "https://github.com/Glimesh/broadcast-box";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ JManch ];
platforms = lib.platforms.unix;
mainProgram = "broadcast-box";
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenvNoCC,
fetchurl,
cabextract,
bt-fw-converter,
}:
stdenvNoCC.mkDerivation rec {
pname = "broadcom-bt-firmware";
version = "12.0.1.1012";
src = fetchurl {
url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/04/852bb503-de7b-4810-a7dd-cbab62742f09_7cf83a4c194116648d17707ae37d564f9c70bec2.cab";
sha256 = "1b1qjwxjk4y91l3iz157kms8601n0mmiik32cs6w9b1q4sl4pxx9";
};
nativeBuildInputs = [
cabextract
bt-fw-converter
];
unpackCmd = ''
mkdir -p ${pname}-${version}
cabextract $src --directory ${pname}-${version}
'';
installPhase = ''
mkdir -p $out/lib/firmware/brcm
bt-fw-converter -f bcbtums.inf -o $out/lib/firmware/brcm
for filename in $out/lib/firmware/brcm/*.hcd
do
linkname=$(basename $filename | awk 'match($0,/^(BCM)[0-9A-Z]+(-[0-9a-z]{4}-[0-9a-z]{4}\.hcd)$/,c) { print c[1]c[2] }')
if ! [ -z $linkname ]
then
ln -s --relative -T $filename $out/lib/firmware/brcm/$linkname
fi
done
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "042frb2dmrqfj8q83h5p769q6hg2b3i8fgnyvs9r9a71z7pbsagq";
meta = with lib; {
description = "Firmware for Broadcom WIDCOMM® Bluetooth devices";
homepage = "https://www.catalog.update.microsoft.com/Search.aspx?q=Broadcom+bluetooth";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ zraexy ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "broadlink-cli";
version = "0.19.0";
# the tools are available as part of the source distribution from GH but
# not pypi, so we have to fetch them here.
src = fetchFromGitHub {
owner = "mjg59";
repo = "python-broadlink";
tag = version;
sha256 = "sha256-fqhi4K8Ceh8Rs0ExteCfAuVfEamFjMCjCFm6DRAJDmI=";
};
format = "other";
propagatedBuildInputs = with python3Packages; [
broadlink
];
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin cli/broadlink_{cli,discovery}
install -Dm444 -t $out/share/doc/broadlink cli/README.md
runHook postInstall
'';
meta = with lib; {
description = "Tools for interfacing with Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs";
maintainers = with maintainers; [ peterhoeg ];
inherit (python3Packages.broadlink.meta) homepage license;
};
}

View File

@@ -0,0 +1,95 @@
{
lib,
stdenv,
fetchFromGitHub,
makeDesktopItem,
copyDesktopItems,
ncurses,
SDL2,
SDL2_image,
terminal ? false,
graphics ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "brogue-ce";
version = "1.14.1";
src = fetchFromGitHub {
owner = "tmewett";
repo = "BrogueCE";
rev = "v${finalAttrs.version}";
hash = "sha256-habmfq1jZa70eggLOgsPT6j1OGmmQ6qmWcCwRN2G4Fo=";
};
postPatch = ''
substituteInPlace linux/brogue-multiuser.sh \
--replace broguedir= "broguedir=$out/opt/brogue-ce #"
'';
nativeBuildInputs = [
copyDesktopItems
];
buildInputs =
(lib.optionals graphics [
SDL2
SDL2_image
])
++ (lib.optionals terminal [
ncurses
]);
makeFlags = [
"DATADIR=$(out)/opt/brogue-ce"
"TERMINAL=${if terminal then "YES" else "NO"}"
"GRAPHICS=${if graphics then "YES" else "NO"}"
"MAC_APP=${if stdenv.isDarwin then "YES" else "NO"}"
];
postBuild = lib.optionalString (stdenv.isDarwin && graphics) ''
make Brogue.app $makeFlags
'';
desktopItems = [
(makeDesktopItem {
name = "brogue-ce";
desktopName = "Brogue CE";
genericName = "Roguelike";
comment = "Brave the Dungeons of Doom!";
icon = "brogue-ce";
exec = "brogue-ce";
categories = [
"Game"
"AdventureGame"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/opt
cp -r bin $out/opt/brogue-ce
install -Dm755 linux/brogue-multiuser.sh $out/bin/brogue-ce
install -Dm 644 bin/assets/icon.png $out/share/icons/hicolor/256x256/apps/brogue-ce.png
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.isDarwin && graphics) ''
mkdir -p $out/Applications
mv Brogue.app "$out/Applications/Brogue CE.app"
'';
meta = with lib; {
description = "Community-lead fork of the minimalist roguelike game Brogue";
mainProgram = "brogue-ce";
homepage = "https://github.com/tmewett/BrogueCE";
license = licenses.agpl3Plus;
maintainers = with maintainers; [
fgaz
];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,33 @@
{
stdenvNoCC,
lib,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "bront_fonts";
version = "0-unstable-2015-06-28";
src = fetchFromGitHub {
owner = "chrismwendt";
repo = "bront";
rev = "aef23d9a11416655a8351230edb3c2377061c077";
sha256 = "1sx2gv19pgdyccb38sx3qnwszksmva7pqa1c8m35s6cipgjhhgb4";
};
installPhase = ''
install -m444 -Dt $out/share/fonts/truetype *Bront.ttf
'';
meta = with lib; {
description = "Bront Fonts";
longDescription = "Ubuntu Mono Bront and DejaVu Sans Mono Bront fonts.";
homepage = "https://github.com/chrismwendt/bront";
license = with licenses; [
bitstreamVera
ufl
];
platforms = platforms.all;
maintainers = [ maintainers.grburst ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "brook";
version = "20240606";
src = fetchFromGitHub {
owner = "txthinking";
repo = "brook";
rev = "v${version}";
sha256 = "sha256-rfCqYI0T/nbK+rlPGl5orLo3qHKITesdFNtXc/ECATA=";
};
vendorHash = "sha256-dYiifLUOq6RKAVSXuoGlok9Jp8jHmbXN/EjQeQpoqWw=";
meta = with lib; {
homepage = "https://github.com/txthinking/brook";
description = "Cross-platform Proxy/VPN software";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ xrelkd ];
mainProgram = "brook";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "broom";
version = "0.3.0";
src = fetchFromGitHub {
owner = "a-camarillo";
repo = "broom";
rev = "v${version}";
hash = "sha256-a2hUgYpiKm/dZWLRuCZKuGStmZ/7jDtLRAjd/B57Vxw=";
};
vendorHash = "sha256-zNklqGjMt89b+JOZfKjTO6c75SXO10e7YtQOqqQZpnA=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Interactive CLI tool for managing local git branches";
homepage = "https://github.com/a-camarillo/broom";
license = licenses.mit;
maintainers = with maintainers; [ a-camarillo ];
mainProgram = "broom";
};
}

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
makeBinaryWrapper,
pkg-config,
libgit2,
zlib,
buildPackages,
versionCheckHook,
withClipboard ? true,
withTrash ? !stdenv.hostPlatform.isDarwin,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "broot";
version = "1.49.1";
src = fetchFromGitHub {
owner = "Canop";
repo = "broot";
tag = "v${finalAttrs.version}";
hash = "sha256-zDy494qIoo4r+oCnrMvYSetmqsWCWfS5PAVlp8sU8Zk=";
};
cargoHash = "sha256-zHvfZAsEoCtdxtFP7yqrC9t49UIMji2qTm+I1bhu63A=";
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
pkg-config
];
buildInputs = [
libgit2
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
zlib
];
buildFeatures = lib.optionals withTrash [ "trash" ] ++ lib.optionals withClipboard [ "clipboard" ];
env.RUSTONIG_SYSTEM_LIBONIG = true;
postPatch = ''
# Fill the version stub in the man page. We can't fill the date
# stub reproducibly.
substitute man/page man/broot.1 \
--replace-fail "#version" "${finalAttrs.version}"
'';
postInstall =
lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
# Install shell function for bash.
${stdenv.hostPlatform.emulator buildPackages} $out/bin/broot --print-shell-function bash > br.bash
install -Dm0444 -t $out/etc/profile.d br.bash
# Install shell function for zsh.
${stdenv.hostPlatform.emulator buildPackages} $out/bin/broot --print-shell-function zsh > br.zsh
install -Dm0444 br.zsh $out/share/zsh/site-functions/br
# Install shell function for fish
${stdenv.hostPlatform.emulator buildPackages} $out/bin/broot --print-shell-function fish > br.fish
install -Dm0444 -t $out/share/fish/vendor_functions.d br.fish
''
+ ''
# install shell completion files
OUT_DIR=$releaseDir/build/broot-*/out
installShellCompletion --bash $OUT_DIR/{br,broot}.bash
installShellCompletion --fish $OUT_DIR/{br,broot}.fish
installShellCompletion --zsh $OUT_DIR/{_br,_broot}
installManPage man/broot.1
# Do not nag users about installing shell integration, since
# it is impure.
wrapProgram $out/bin/broot \
--set BR_INSTALL no
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = with lib; {
description = "Interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
homepage = "https://dystroy.org/broot/";
changelog = "https://github.com/Canop/broot/releases/tag/v${finalAttrs.version}";
maintainers = with maintainers; [ dywedir ];
license = with licenses; [ mit ];
mainProgram = "broot";
};
})

View File

@@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
fetchpatch,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "brotab";
version = "1.4.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "balta2ar";
repo = "brotab";
tag = version;
hash = "sha256-HKKjiW++FwjdorqquSCIdi1InE6KbMbFKZFYHBxzg8Q=";
};
patches = [
# https://github.com/balta2ar/brotab/pull/102
(fetchpatch {
name = "remove-unnecessary-pip-import.patch";
url = "https://github.com/balta2ar/brotab/commit/825cd48f255c911aabbfb495f6b8fc73f27d3fe5.patch";
hash = "sha256-IN28AOLPKPUc3KkxIGFMpZNNXA1+O12NxS+Hl4KMXbg=";
})
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
flask
psutil
requests
setuptools
];
postPatch = ''
substituteInPlace requirements/base.txt \
--replace-fail "Flask==2.0.2" "Flask>=2.0.2" \
--replace-fail "psutil==5.8.0" "psutil>=5.8.0" \
--replace-fail "requests==2.24.0" "requests>=2.24.0"
'';
__darwinAllowLocalNetworking = true;
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
meta = with lib; {
homepage = "https://github.com/balta2ar/brotab";
description = "Control your browser's tabs from the command line";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
};
}

View File

@@ -0,0 +1,83 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
staticOnly ? stdenv.hostPlatform.isStatic,
testers,
}:
# ?TODO: there's also python lib in there
stdenv.mkDerivation (finalAttrs: {
pname = "brotli";
version = "1.1.0";
src = fetchFromGitHub {
owner = "google";
repo = "brotli";
rev = "v${finalAttrs.version}";
hash = "sha256-MvceRcle2dSkkucC2PlsCizsIf8iv95d8Xjqew266wc=";
};
patches = [
# revert runpath change, breaks curl on darwin:
# https://github.com/NixOS/nixpkgs/pull/254532#issuecomment-1722337476
(fetchpatch {
name = "revert-runpath.patch";
url = "https://github.com/google/brotli/commit/f842c1bcf9264431cd3b15429a72b7dafbe80509.patch";
hash = "sha256-W3LY3EjoHP74YsKOOcYQrzo+f0HbooOvEbnOibtN6TM=";
revert = true;
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
outputs = [
"out"
"dev"
"lib"
];
doCheck = true;
checkTarget = "test";
# Don't bother with "man" output for now,
# it currently only makes the manpages hard to use.
postInstall = ''
mkdir -p $out/share/man/man{1,3}
cp ../docs/*.1 $out/share/man/man1/
cp ../docs/*.3 $out/share/man/man3/
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "https://github.com/google/brotli";
description = "General-purpose lossless compression library with CLI";
longDescription = ''
Brotli is a generic-purpose lossless compression algorithm that
compresses data using a combination of a modern variant of the LZ77
algorithm, Huffman coding and 2nd order context modeling, with a
compression ratio comparable to the best currently available
general-purpose compression methods. It is similar in speed with
deflate but offers more dense compression.
The specification of the Brotli Compressed Data Format is defined
in the following Internet-Draft:
https://datatracker.ietf.org/doc/html/rfc7932
'';
license = licenses.mit;
maintainers = with maintainers; [ freezeboy ];
pkgConfigModules = [
"libbrotlidec"
"libbrotlienc"
];
platforms = platforms.all;
mainProgram = "brotli";
};
})

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
gnupg,
makeWrapper,
autoPatchelfHook,
testers,
browserpass,
}:
buildGoModule rec {
pname = "browserpass";
version = "3.1.0";
src = fetchFromGitHub {
owner = "browserpass";
repo = "browserpass-native";
tag = version;
sha256 = "sha256-UZzOPRRiCUIG7uSSp9AEPMDN/+4cgyK47RhrI8oUx8U=";
};
nativeBuildInputs = [
makeWrapper
]
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
vendorHash = "sha256-CjuH4ANP2bJDeA+o+1j+obbtk5/NVLet/OFS3Rms4r0=";
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
postPatch = ''
# Because this Makefile will be installed to be used by the user, patch
# variables to be valid by default
substituteInPlace Makefile \
--replace "PREFIX ?= /usr" ""
sed -i -e 's/SED =.*/SED = sed/' Makefile
sed -i -e 's/INSTALL =.*/INSTALL = install/' Makefile
'';
DESTDIR = placeholder "out";
postConfigure = ''
make configure
'';
buildPhase = ''
make browserpass
'';
checkTarget = "test";
installPhase = ''
make install
wrapProgram $out/bin/browserpass \
--suffix PATH : ${lib.makeBinPath [ gnupg ]}
# This path is used by our firefox wrapper for finding native messaging hosts
mkdir -p $out/lib/mozilla/native-messaging-hosts
# Copy ff manifests rather than linking to allow link-farming to work recursively in dependants
cp $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts/
'';
passthru.tests.version = testers.testVersion {
package = browserpass;
command = "browserpass --version";
};
meta = with lib; {
description = "Browserpass native client app";
mainProgram = "browserpass";
homepage = "https://github.com/browserpass/browserpass-native";
license = licenses.isc;
maintainers = with maintainers; [ rvolosatovs ];
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
wrapGAppsHook3,
atk,
cairo,
gdk-pixbuf,
glib,
gtk3,
pango,
}:
rustPlatform.buildRustPackage rec {
pname = "browsers";
version = "0.7.0";
src = fetchFromGitHub {
owner = "Browsers-software";
repo = "browsers";
tag = version;
hash = "sha256-s03BEscaYdSitLtlqbX/tgGSLRHuXc9Ht+3RMCUIdY8=";
};
cargoHash = "sha256-tz4ju0NwgG5yb1VndYqyf+g631izPl904KYDUvawO28=";
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
];
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk3
pango
];
postInstall = ''
install -m 444 \
-D extra/linux/dist/software.Browsers.template.desktop \
-t $out/share/applications
mv $out/share/applications/software.Browsers.template.desktop $out/share/applications/software.Browsers.desktop
substituteInPlace \
$out/share/applications/software.Browsers.desktop \
--replace-fail 'Exec=ExecCommand' 'Exec=${pname} %u'
cp -r resources $out
for size in 16 32 128 256 512; do
install -m 444 \
-D resources/icons/"$size"x"$size"/software.Browsers.png \
-t $out/share/icons/hicolor/"$size"x"$size"/apps
done
'';
meta = {
description = "Open the right browser at the right time";
homepage = "https://browsers.software";
changelog = "https://github.com/Browsers-software/browsers/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ravenz46 ];
mainProgram = "browsers";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
buildGoModule,
fetchurl,
fetchFromGitHub,
}:
let
version = "1.8.3";
# TODO: must build the extension instead of downloading it. But since it's
# literally an asset that is indifferent regardless of the platform, this
# might be just enough.
webext = fetchurl {
url = "https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-${version}.xpi";
hash = "sha256-wLctfGHDCgy3nMG/nc882qNjHOAp8VeOZcEWJD7QThY=";
};
in
buildGoModule rec {
inherit version;
pname = "browsh";
sourceRoot = "${src.name}/interfacer";
src = fetchFromGitHub {
owner = "browsh-org";
repo = "browsh";
rev = "v${version}";
hash = "sha256-Abna1bAaqOT44zZJsObLMR5fTW2xlWBg1M0JYH0Yc6g=";
};
vendorHash = "sha256-481dC7UrNMnb1QswvK2FqUiioTZ9xJP4dSd3rvRkqro=";
preBuild = ''
cp "${webext}" src/browsh/browsh.xpi
'';
# Tests require network access
doCheck = false;
meta = with lib; {
description = "Fully-modern text-based browser, rendering to TTY and browsers";
mainProgram = "browsh";
homepage = "https://www.brow.sh/";
maintainers = with maintainers; [
kalbasit
siraben
];
license = lib.licenses.lgpl21;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,96 @@
{
lib,
python3,
fetchFromGitHub,
extras ? [ "all" ],
}:
python3.pkgs.buildPythonApplication rec {
pname = "browsr";
version = "1.21.0";
pyproject = true;
src = fetchFromGitHub {
owner = "juftin";
repo = "browsr";
tag = "v${version}";
hash = "sha256-76OzJOunZRVSGalQiyX+TSukD8rRIFHxA713NqOn3PY=";
};
nativeBuildInputs = with python3.pkgs; [
hatchling
];
propagatedBuildInputs =
with python3.pkgs;
[
art
click
pandas
pillow
pymupdf
pyperclip
rich
rich-click
rich-pixels
textual
textual-universal-directorytree
]
++ lib.attrVals extras optional-dependencies;
optional-dependencies = with python3.pkgs; {
all = [
pyarrow
textual-universal-directorytree.optional-dependencies.remote
];
parquet = [
pyarrow
];
remote = [
textual-universal-directorytree.optional-dependencies.remote
];
};
nativeCheckInputs = with python3.pkgs; [
pytest-textual-snapshot
pytestCheckHook
];
pythonRelaxDeps = [
"art"
"pandas"
"pymupdf"
"pyperclip"
"rich-click"
"rich-pixels"
"rich"
"textual"
];
pythonImportsCheck = [
"browsr"
];
pytestFlags = [
"--snapshot-update"
];
disabledTests = [
# Tests require internet access
"test_github_screenshot"
"test_github_screenshot_license"
"test_textual_app_context_path_github"
"test_mkdocs_screenshot"
# Different output
"test_textual_app_context_path"
];
meta = {
description = "File explorer in your terminal";
mainProgram = "browsr";
homepage = "https://juftin.com/browsr";
changelog = "https://github.com/juftin/browsr/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,113 @@
{
stdenv,
lib,
fetchurl,
callPackage,
patchelf,
makeWrapper,
libusb-compat-0_1,
}:
let
myPatchElf = file: ''
patchelf --set-interpreter \
${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \
${file}
'';
udevRules = callPackage ./udev_rules_type1.nix { };
in
stdenv.mkDerivation rec {
pname = "brscan4";
version = "0.4.10-1";
src =
{
"i686-linux" = fetchurl {
url = "http://download.brother.com/welcome/dlf006646/${pname}-${version}.i386.deb";
sha256 = "sha256-ymIAg+rfSYP5uzsAM1hUYZacJ0PXmKEoljNtb0pgGMw=";
};
"x86_64-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf006645/${pname}-${version}.amd64.deb";
sha256 = "sha256-Gpr5456MCNpyam3g2qPo7S3aEZFMaUGR8bu7YmRY8xk=";
};
}
."${stdenv.hostPlatform.system}" or (throw "unsupported system ${stdenv.hostPlatform.system}");
unpackPhase = ''
ar x $src
tar xfvz data.tar.gz
'';
nativeBuildInputs = [
makeWrapper
patchelf
udevRules
];
buildInputs = [ libusb-compat-0_1 ];
dontBuild = true;
postPatch = ''
${myPatchElf "opt/brother/scanner/brscan4/brsaneconfig4"}
RPATH=${libusb-compat-0_1.out}/lib
for a in usr/lib64/sane/*.so*; do
if ! test -L $a; then
patchelf --set-rpath $RPATH $a
fi
done
'';
installPhase = ''
runHook preInstall
PATH_TO_BRSCAN4="opt/brother/scanner/brscan4"
mkdir -p $out/$PATH_TO_BRSCAN4
cp -rp $PATH_TO_BRSCAN4/* $out/$PATH_TO_BRSCAN4
mkdir -p $out/lib/sane
cp -rp usr/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/sane/* $out/lib/sane
# Symbolic links were absolute. Fix them so that they point to $out.
pushd "$out/lib/sane" > /dev/null
for a in *.so*; do
if test -L $a; then
fixedTargetFileName="$(basename $(readlink $a))"
unlink "$a"
ln -s -T "$fixedTargetFileName" "$a"
fi
done
popd > /dev/null
# Generate an LD_PRELOAD wrapper to redirect execvp(), open() and open64()
# calls to `/opt/brother/scanner/brscan4`.
preload=$out/libexec/brother/scanner/brscan4/libpreload.so
mkdir -p $(dirname $preload)
gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
makeWrapper \
"$out/$PATH_TO_BRSCAN4/brsaneconfig4" \
"$out/bin/brsaneconfig4" \
--set LD_PRELOAD $preload
mkdir -p $out/etc/sane.d
echo "brother4" > $out/etc/sane.d/dll.conf
mkdir -p $out/etc/udev/rules.d
cp -p ${udevRules}/etc/udev/rules.d/*.rules \
$out/etc/udev/rules.d
runHook postInstall
'';
dontStrip = true;
dontPatchELF = true;
meta = {
description = "Brother brscan4 sane backend driver";
homepage = "http://www.brother.com";
platforms = [
"i686-linux"
"x86_64-linux"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ jraygauthier ];
};
}

View File

@@ -0,0 +1,170 @@
/* Brgen4 search for configuration under `/etc/opt/brother/scanner/brscan4`. This
LD_PRELOAD library intercepts execvp(), open and open64 calls to redirect them to
the corresponding location in $out. Also support specifying an alternate
file name for `brsanenetdevice4.cfg` which otherwise is invariable
created at `/etc/opt/brother/scanner/brscan4`*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <string.h>
#include <dirent.h>
char origDir [] = "/etc/opt/brother/scanner/brscan4";
char realDir [] = OUT "/opt/brother/scanner/brscan4";
char devCfgFileNameEnvVar [] = "BRSANENETDEVICE4_CFG_FILENAME";
char devCfgFileName [] = "/etc/opt/brother/scanner/brscan4//brsanenetdevice4.cfg";
const char * rewrite(const char * path, char * buf)
{
if (strncmp(path, devCfgFileName, sizeof(devCfgFileName)) == 0) {
const char* newCfgFileName = getenv(devCfgFileNameEnvVar);
if (!newCfgFileName) return path;
if (snprintf(buf, PATH_MAX, "%s", newCfgFileName) >= PATH_MAX)
abort();
return buf;
}
if (strncmp(path, origDir, sizeof(origDir) - 1) != 0) return path;
if (snprintf(buf, PATH_MAX, "%s%s", realDir, path + sizeof(origDir) - 1) >= PATH_MAX)
abort();
return buf;
}
const char* findAndReplaceFirstOccurence(const char* inStr, const char* subStr,
const char* replaceStr,
char* buf, unsigned maxBuf)
{
const char* foundStr = strstr(inStr, subStr);
if (!foundStr)
return inStr;
const unsigned inStrLen = strlen(inStr);
const unsigned subStrLen = strlen(subStr);
const unsigned replaceStrLen = strlen(replaceStr);
const unsigned precedingStrLen = foundStr - inStr;
if (precedingStrLen + 1 > maxBuf)
return NULL;
const unsigned followingStrPos = precedingStrLen + subStrLen;
const unsigned followingStrLen = inStrLen - followingStrPos;
strncpy(buf, inStr, precedingStrLen);
unsigned outLength = precedingStrLen;
if (outLength + replaceStrLen + 1 > maxBuf)
return NULL;
strncpy(buf + outLength, replaceStr, replaceStrLen);
outLength += replaceStrLen;
if (outLength + followingStrLen + 1 > maxBuf)
return NULL;
strncpy(buf + outLength, inStr + followingStrPos, followingStrLen);
outLength += followingStrLen;
buf[outLength] = '\0';
return buf;
}
const char* rewriteSystemCall(const char* command, char* buf, unsigned maxBuf)
{
const char* foundStr = strstr(command, devCfgFileName);
if (!foundStr)
return command;
const char* replaceStr = getenv(devCfgFileNameEnvVar);
if (!replaceStr) return command;
const char* result =
findAndReplaceFirstOccurence(command, devCfgFileName, replaceStr, buf, maxBuf);
if (!result)
abort();
return result;
}
int execvp(const char * path, char * const argv[])
{
int (*_execvp) (const char *, char * const argv[]) = dlsym(RTLD_NEXT, "execvp");
char buf[PATH_MAX];
return _execvp(rewrite(path, buf), argv);
}
int open(const char *path, int flags, ...)
{
char buf[PATH_MAX];
int (*_open) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open");
mode_t mode = 0;
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
}
return _open(rewrite(path, buf), flags, mode);
}
int open64(const char *path, int flags, ...)
{
char buf[PATH_MAX];
int (*_open64) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open64");
mode_t mode = 0;
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
}
return _open64(rewrite(path, buf), flags, mode);
}
FILE* fopen(const char* path, const char* mode)
{
char buf[PATH_MAX];
FILE* (*_fopen) (const char*, const char*) = dlsym(RTLD_NEXT, "fopen");
return _fopen(rewrite(path, buf), mode);
}
FILE *fopen64(const char *path, const char *mode)
{
char buf[PATH_MAX];
FILE* (*_fopen64) (const char*, const char*) = dlsym(RTLD_NEXT, "fopen64");
return _fopen64(rewrite(path, buf), mode);
}
DIR* opendir(const char* path)
{
char buf[PATH_MAX];
DIR* (*_opendir) (const char*) = dlsym(RTLD_NEXT, "opendir");
return _opendir(rewrite(path, buf));
}
#define SYSTEM_CMD_MAX 512
int system(const char *command)
{
char buf[SYSTEM_CMD_MAX];
int (*_system) (const char*) = dlsym(RTLD_NEXT, "system");
const char* newCommand = rewriteSystemCall(command, buf, SYSTEM_CMD_MAX);
return _system(newCommand);
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
libsaneUDevRuleNumber ? "49",
}:
stdenv.mkDerivation rec {
pname = "brother-udev-rule-type1";
version = "1.0.0-1";
src = fetchurl {
url = "http://download.brother.com/welcome/dlf006654/brother-udev-rule-type1-${version}.all.deb";
sha256 = "0i0x5jw135pli4jl9mgnr5n2rrdvml57nw84yq2999r4frza53xi";
};
dontBuild = true;
unpackPhase = ''
ar x $src
tar xfvz data.tar.gz
'';
/*
Fix the following error:
~~~
invalid rule 49-brother-libsane-type1.rules
unknown key 'SYSFS{idVendor}'
~~~
Apparently the udev rules syntax has change and the SYSFS key has to
be changed to ATTR.
See:
- <http://ubuntuforums.org/showthread.php?t=1496878>
- <http://www.planet-libre.org/index.php?post_id=10937>
*/
patchPhase = ''
sed -i -e s/SYSFS/ATTR/g opt/brother/scanner/udev-rules/type1/*.rules
'';
installPhase = ''
mkdir -p $out/etc/udev/rules.d
cp opt/brother/scanner/udev-rules/type1/NN-brother-mfp-type1.rules \
$out/etc/udev/rules.d/${libsaneUDevRuleNumber}-brother-libsane-type1.rules
chmod 644 $out/etc/udev/rules.d/${libsaneUDevRuleNumber}-brother-libsane-type1.rules
'';
dontStrip = true;
dontPatchELF = true;
meta = {
description = "Brother type1 scanners udev rules";
homepage = "http://www.brother.com";
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ jraygauthier ];
};
}

View File

@@ -0,0 +1,147 @@
{
stdenv,
lib,
fetchurl,
patchelf,
makeWrapper,
libusb1,
avahi-compat,
glib,
libredirect,
nixosTests,
udevCheckHook,
}:
let
myPatchElf = file: ''
patchelf --set-interpreter \
${stdenv.cc.libc}/lib/ld-linux${lib.optionalString stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \
${file}
'';
system = stdenv.hostPlatform.system;
in
stdenv.mkDerivation rec {
pname = "brscan5";
version = "1.3.1-0";
src =
{
"i686-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104034/${pname}-${version}.i386.deb";
hash = "sha256-BgS64vwsKESJBDz9H2MDwcGiresROSNFP1b+7+zlE5c=";
};
"x86_64-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104033/${pname}-${version}.amd64.deb";
hash = "sha256-0UMbXMBlyiZI90WG5FWEP2mIZEBsxXd11dtgtyuSDnY=";
};
}
."${system}" or (throw "Unsupported system: ${system}");
unpackPhase = ''
ar x $src
tar xfv data.tar.xz
'';
nativeBuildInputs = [
makeWrapper
patchelf
udevCheckHook
];
buildInputs = [
libusb1
avahi-compat
stdenv.cc.cc
glib
];
dontBuild = true;
postPatch =
let
# Download .deb for both amd64 and i386, then unpack like unpackPhase
# to get the offset, run:
# strings -n 10 --radix=d opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 | grep "/opt/brother/scanner/brscan5/models"
patchOffsetBytes =
if system == "x86_64-linux" then
86592
else if system == "i686-linux" then
79236
else
throw "Unsupported system: ${system}";
in
''
${myPatchElf "opt/brother/scanner/brscan5/brsaneconfig5"}
${myPatchElf "opt/brother/scanner/brscan5/brscan_cnetconfig"}
${myPatchElf "opt/brother/scanner/brscan5/brscan_gnetconfig"}
for file in opt/brother/scanner/brscan5/*.so.* opt/brother/scanner/brscan5/brscan_[cg]netconfig; do
if ! test -L $file; then
patchelf --set-rpath ${lib.makeLibraryPath buildInputs} $file
fi
done
# driver is hardcoded to look in /opt/brother/scanner/brscan5/models for model metadata.
# patch it to look in /etc/opt/brother/scanner/models instead, so nixos environment.etc can make it available
printf '/etc/opt/brother/scanner/models\x00' | dd of=opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 bs=1 seek=${toString patchOffsetBytes} conv=notrunc
# remove deprecated SYSFS udev rule
sed -i -e '/^SYSFS/d' opt/brother/scanner/brscan5/udev-rules/*.rules
'';
installPhase = ''
runHook preInstall
PATH_TO_BRSCAN5="opt/brother/scanner/brscan5"
mkdir -p $out/$PATH_TO_BRSCAN5
cp -rp $PATH_TO_BRSCAN5/* $out/$PATH_TO_BRSCAN5
pushd $out/$PATH_TO_BRSCAN5
ln -s libLxBsDeviceAccs.so.1.0.0 libLxBsDeviceAccs.so.1
ln -s libLxBsNetDevAccs.so.1.0.0 libLxBsNetDevAccs.so.1
ln -s libLxBsScanCoreApi.so.3.2.0 libLxBsScanCoreApi.so.3
ln -s libLxBsUsbDevAccs.so.1.0.0 libLxBsUsbDevAccs.so.1
ln -s libsane-brother5.so.1.0.7 libsane-brother5.so.1
popd
mkdir -p $out/lib/sane
for file in $out/$PATH_TO_BRSCAN5/*.so.* ; do
ln -s $file $out/lib/sane/
done
makeWrapper \
"$out/$PATH_TO_BRSCAN5/brsaneconfig5" \
"$out/bin/brsaneconfig5" \
--suffix-each NIX_REDIRECT ":" "/etc/opt/brother/scanner/brscan5=$out/opt/brother/scanner/brscan5 /opt/brother/scanner/brscan5=$out/opt/brother/scanner/brscan5" \
--set LD_PRELOAD ${libredirect}/lib/libredirect.so
mkdir -p $out/etc/sane.d/dll.d
echo "brother5" > $out/etc/sane.d/dll.d/brother5.conf
mkdir -p $out/etc/udev/rules.d
install -m 0444 $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \
$out/etc/udev/rules.d/49-brother-mfp-brscan5-1.0.2-2.rules
ETCDIR=$out/etc/opt/brother/scanner/brscan5
mkdir -p $ETCDIR
cp -rp $PATH_TO_BRSCAN5/{models,brscan5.ini,brsanenetdevice.cfg} $ETCDIR/
runHook postInstall
'';
# We want to run the udevCheckHook
doInstallCheck = true;
dontPatchELF = true;
passthru.tests = { inherit (nixosTests) brscan5; };
meta = {
description = "Brother brscan5 sane backend driver";
homepage = "https://www.brother.com";
platforms = [
"i686-linux"
"x86_64-linux"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ mattchrist ];
};
}

View File

@@ -0,0 +1,75 @@
{
mkDerivation,
array,
base,
binary,
bitstring,
bytestring,
clock,
containers,
deepseq,
directory,
fetchzip,
filepath,
haskeline,
lib,
megaparsec,
mtl,
optparse-applicative,
process,
random,
time,
}:
mkDerivation {
pname = "bruijn";
version = "0.1.0.0";
src = fetchzip {
url = "https://github.com/marvinborner/bruijn/archive/31ba54046e33618905fc99e0b079bd3aa2594284.tar.gz";
sha256 = "11b3i32y36i29haym4agn1pgik20byldihgs2qsi5p7vy17z0a78";
};
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
array
base
binary
bitstring
bytestring
clock
containers
deepseq
directory
filepath
haskeline
megaparsec
mtl
optparse-applicative
process
random
time
];
executableHaskellDepends = [
array
base
binary
bitstring
bytestring
clock
containers
deepseq
directory
filepath
haskeline
megaparsec
mtl
optparse-applicative
process
random
time
];
homepage = "https://github.com/githubuser/bruijn#readme";
license = lib.licenses.mit;
mainProgram = "bruijn";
maintainers = [ lib.maintainers.defelo ];
}

View File

@@ -0,0 +1,25 @@
{
haskell,
haskellPackages,
lib,
}:
let
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
generated = haskellPackages.callPackage ./generated.nix { };
overrides = {
version = lib.fileContents ./version.txt;
passthru.updateScript = ./update.sh;
description = "Purely functional programming language based on lambda calculus and de Bruijn indices";
homepage = "https://bruijn.marvinborner.de/";
};
in
lib.pipe generated [
(overrideCabal overrides)
justStaticExecutables
]

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils cabal2nix curl jq
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
{ read -r rev; read -r committer_date; } \
< <(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL https://api.github.com/repos/marvinborner/bruijn/branches/main \
| jq -r '.commit | .sha, .commit.committer.date')
cabal2nix --maintainer defelo "https://github.com/marvinborner/bruijn/archive/${rev}.tar.gz" \
| nixfmt \
> generated.nix
echo "0-unstable-$(date -I --date="$committer_date")" > version.txt

View File

@@ -0,0 +1 @@
0-unstable-2025-09-28

View File

@@ -0,0 +1,109 @@
{
lib,
buildNpmPackage,
bruno,
pkg-config,
pango,
testers,
bruno-cli,
}:
let
pname = "bruno-cli";
in
buildNpmPackage {
inherit pname;
# since they only make releases and git tags for bruno,
# we lie about bruno-cli's version and say it's the same as bruno's
# to keep them in sync with easier maintenance
inherit (bruno) version src npmDepsHash;
npmWorkspace = "packages/bruno-cli";
npmFlags = [ "--legacy-peer-deps" ];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
pango
];
postConfigure = ''
# sh: line 1: /build/source/packages/bruno-converters/node_modules/.bin/rimraf: cannot execute: required file not found
patchShebangs packages/*/node_modules
'';
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
buildPhase = ''
runHook preBuild
npm run build --workspace=packages/bruno-common
npm run build --workspace=packages/bruno-graphql-docs
npm run build --workspace=packages/bruno-converters
npm run build --workspace=packages/bruno-query
npm run build --workspace=packages/bruno-filestore
npm run build --workspace=packages/bruno-requests
npm run sandbox:bundle-libraries --workspace=packages/bruno-js
runHook postBuild
'';
npmPackFlags = [ "--ignore-scripts" ];
postInstall = ''
cp -r packages $out/lib/node_modules/usebruno
echo "Removing unnecessary files"
pushd $out/lib/node_modules/usebruno
# packages used by the GUI app, unused by CLI
rm -r packages/bruno-{app,electron,tests,toml,schema,docs}
rm node_modules/bruno
rm node_modules/@usebruno/{app,tests,toml,schema}
# heavy dependencies that seem to be unused
rm -rf node_modules/{@tabler,pdfjs-dist,*redux*,prettier,@types*,*react*,*graphiql*}
rm -r node_modules/.bin
# unused file types
for pattern in '*.map' '*.map.js' '*.ts'; do
find . -type f -name "$pattern" -exec rm {} +
done
popd
echo "Removed unnecessary files"
'';
postFixup = ''
wrapProgram $out/bin/bru \
--prefix NODE_PATH : $out/lib/node_modules/usebruno/packages/bruno-cli/node_modules \
--prefix NODE_PATH : $out/lib/node_modules
'';
passthru.tests.help = testers.runCommand {
name = "${pname}-help-test";
nativeBuildInputs = [ bruno-cli ];
script = ''
bru --help && touch $out
'';
};
meta = {
description = "CLI of the open-source IDE For exploring and testing APIs";
homepage = "https://www.usebruno.com";
license = lib.licenses.mit;
mainProgram = "bru";
maintainers = with lib.maintainers; [
gepbird
kashw2
lucasew
mattpolzin
water-sucks
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,196 @@
{
lib,
stdenv,
fetchFromGitHub,
buildNpmPackage,
nix-update-script,
electron,
makeWrapper,
copyDesktopItems,
makeDesktopItem,
pkg-config,
pixman,
cairo,
pango,
npm-lockfile-fix,
jq,
moreutils,
}:
buildNpmPackage rec {
pname = "bruno";
version = "2.12.0";
src = fetchFromGitHub {
owner = "usebruno";
repo = "bruno";
tag = "v${version}";
hash = "sha256-5yYcclJBb5kKaDr9irkLQBa6Tg8yO1LWh89ntBiMQho=";
postFetch = ''
${lib.getExe npm-lockfile-fix} $out/package-lock.json
'';
};
npmDepsHash = "sha256-mLl8igkdujzI4Fz4SoUrCdnI2KUo6DsNtPdAhwjYpac=";
npmFlags = [ "--legacy-peer-deps" ];
nativeBuildInputs = [
pkg-config
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
makeWrapper
copyDesktopItems
];
buildInputs = [
pixman
cairo
pango
];
desktopItems = [
(makeDesktopItem {
name = "bruno";
desktopName = "Bruno";
exec = "bruno %U";
icon = "bruno";
comment = "Opensource API Client for Exploring and Testing APIs";
categories = [ "Development" ];
startupWMClass = "Bruno";
})
];
postPatch = ''
substituteInPlace scripts/build-electron.sh \
--replace-fail 'if [ "$1" == "snap" ]; then' 'exit 0; if [ "$1" == "snap" ]; then'
# disable telemetry
substituteInPlace packages/bruno-app/src/providers/App/index.js \
--replace-fail "useTelemetry({ version });" ""
# fix version reported in sidebar and about page
${jq}/bin/jq '.version |= "${version}"' packages/bruno-electron/package.json | ${moreutils}/bin/sponge packages/bruno-electron/package.json
${jq}/bin/jq '.version |= "${version}"' packages/bruno-app/package.json | ${moreutils}/bin/sponge packages/bruno-app/package.json
'';
postConfigure = ''
# sh: line 1: /build/source/packages/bruno-common/node_modules/.bin/rollup: cannot execute: required file not found
patchShebangs packages/*/node_modules
'';
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
# remove giflib dependency
npmRebuildFlags = [ "--ignore-scripts" ];
preBuild = ''
# upstream keeps removing and adding back canvas, only patch it when it is present
if [[ -e node_modules/canvas/binding.gyp ]]; then
substituteInPlace node_modules/canvas/binding.gyp \
--replace-fail "'with_gif%': '<!(node ./util/has_lib.js gif)'" "'with_gif%': 'false'"
npm rebuild
fi
'';
buildPhase = ''
runHook preBuild
npm run build --workspace=packages/bruno-common
npm run build --workspace=packages/bruno-graphql-docs
npm run build --workspace=packages/bruno-converters
npm run build --workspace=packages/bruno-app
npm run build --workspace=packages/bruno-query
npm run build --workspace=packages/bruno-filestore
npm run build --workspace=packages/bruno-requests
npm run sandbox:bundle-libraries --workspace=packages/bruno-js
bash scripts/build-electron.sh
pushd packages/bruno-electron
${
if stdenv.hostPlatform.isDarwin then
''
cp -r ${electron.dist}/Electron.app ./
find ./Electron.app -name 'Info.plist' | xargs -d '\n' chmod +rw
substituteInPlace electron-builder-config.js \
--replace-fail "identity: 'Anoop MD (W7LPPWA48L)'" 'identity: null' \
--replace-fail "afterSign: 'notarize.js'," ""
npm exec electron-builder -- \
--dir \
--config electron-builder-config.js \
-c.electronDist=./ \
-c.electronVersion=${electron.version} \
-c.npmRebuild=false
''
else
''
npm exec electron-builder -- \
--dir \
-c.electronDist=${electron.dist} \
-c.electronVersion=${electron.version} \
-c.npmRebuild=false
''
}
popd
runHook postBuild
'';
npmPackFlags = [ "--ignore-scripts" ];
installPhase = ''
runHook preInstall
${
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/Applications
cp -R packages/bruno-electron/out/**/Bruno.app $out/Applications/
''
else
''
mkdir -p $out/opt/bruno $out/bin
cp -r packages/bruno-electron/dist/linux*-unpacked/{locales,resources{,.pak}} $out/opt/bruno
makeWrapper ${lib.getExe electron} $out/bin/bruno \
--add-flags $out/opt/bruno/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--set-default ELECTRON_IS_DEV 0 \
--inherit-argv0
for s in 16 32 48 64 128 256 512 1024; do
size=${"$"}{s}x$s
install -Dm644 $src/packages/bruno-electron/resources/icons/png/$size.png $out/share/icons/hicolor/$size/apps/bruno.png
done
''
}
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Open-source IDE For exploring and testing APIs";
homepage = "https://www.usebruno.com";
license = lib.licenses.mit;
mainProgram = "bruno";
maintainers = with lib.maintainers; [
gepbird
kashw2
lucasew
mattpolzin
redyf
water-sucks
starsep
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
brotli,
}:
stdenv.mkDerivation rec {
pname = "brunsli";
version = "0.1";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "google";
repo = "brunsli";
rev = "v${version}";
hash = "sha256-ZcrRz2xSoRepgG8KZYY/JzgONerItW0e6mH1PYsko98=";
};
patches = [
# unvendor brotli
(fetchpatch {
url = "https://cgit.freebsd.org/ports/plain/graphics/brunsli/files/patch-CMakeLists.txt";
extraPrefix = "";
hash = "sha256-/WPOG9OcEDj9ObBSXEM8Luq4Rix+PS2MvsYyHhK5mns=";
})
(fetchpatch {
url = "https://cgit.freebsd.org/ports/plain/graphics/brunsli/files/patch-brunsli.cmake";
extraPrefix = "";
hash = "sha256-+HXA9Tin+l2St7rRUEBM0AfhAjSoFxz8UX7hsg12aFg=";
})
];
postPatch = ''
rm -r third_party
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
rm -r build
''
# fix build with cmake v4, should be removed in next release
+ ''
substituteInPlace CMakeLists.txt \
--replace-fail 'cmake_minimum_required(VERSION 3.1)' 'cmake_minimum_required(VERSION 3.10)'
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
brotli
];
meta = {
description = "Lossless JPEG repacking library";
homepage = "https://github.com/google/brunsli";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
bzip2,
libxkbcommon,
sqlite,
vulkan-loader,
zstd,
stdenv,
wayland,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "brush-splat";
version = "0.2.0";
src = fetchFromGitHub {
owner = "ArthurBrussee";
repo = "brush";
tag = finalAttrs.version;
hash = "sha256-IvsHYCM/M2hHozzKwovgXpcW1b7MSEGneU62y1k8U9U=";
};
cargoHash = "sha256-7cJj5L8ggkBP9SDaYMtY9xIAHVAhi8cTD/0pncUaHbI=";
# Force linking to libEGL, which is always dlopen()ed, and to
# libwayland-client & libxkbcommon, which is dlopen()ed based on the
# winit backend.
NIX_LDFLAGS = [
"--no-as-needed"
"-lvulkan"
"-lwayland-client"
"-lxkbcommon"
];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
libxkbcommon
sqlite
vulkan-loader
zstd
]
++ lib.optionals stdenv.isLinux [
wayland
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "3D Reconstruction for all";
homepage = "https://github.com/ArthurBrussee/brush";
changelog = "https://github.com/ArthurBrussee/brush/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ matthewcroughan ];
mainProgram = "brush_app";
};
})

View File

@@ -0,0 +1,69 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
testers,
runCommand,
writeText,
nix-update-script,
brush,
}:
rustPlatform.buildRustPackage rec {
pname = "brush";
version = "0.2.23";
src = fetchFromGitHub {
owner = "reubeno";
repo = "brush";
tag = "brush-shell-v${version}";
hash = "sha256-b3foza29ty4P09PaBFh1nmGyn1YsxNPiVQHUcwWo6Lg=";
};
cargoHash = "sha256-+HUZNOPPyRn2tQel/8fIiRQo761G3ygfRPuvjHkRAV8=";
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = "--version";
# Found argument '--test-threads' which wasn't expected, or isn't valid in this context
doCheck = false;
passthru = {
shellPath = "/bin/brush";
tests = {
complete = testers.testEqualContents {
assertion = "brushinfo performs to inspect completions";
expected = writeText "expected" ''
brush
brushctl
brushinfo
'';
actual =
runCommand "actual"
{
nativeBuildInputs = [ brush ];
}
''
brush -c 'brushinfo complete line bru' >$out
'';
};
};
updateScript = nix-update-script { extraArgs = [ "--version-regex=brush-shell-v([\\d\\.]+)" ]; };
};
meta = {
description = "Bash/POSIX-compatible shell implemented in Rust";
homepage = "https://github.com/reubeno/brush";
changelog = "https://github.com/reubeno/brush/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kachick ];
mainProgram = "brush";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
fetchFromSourcehut,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "brutalmaze";
version = "1.1.1";
format = "pyproject";
disabled = python3Packages.pythonOlder "3.7";
src = fetchFromSourcehut {
owner = "~cnx";
repo = "brutalmaze";
tag = version;
sha256 = "1m105iq378mypj64syw59aldbm6bj4ma4ynhc50gafl656fabg4y";
};
nativeBuildInputs = with python3Packages; [
flit-core
];
propagatedBuildInputs = with python3Packages; [
loca
palace
pygame
];
doCheck = false; # there's no test
meta = with lib; {
description = "Minimalist thrilling shoot 'em up game";
mainProgram = "brutalmaze";
homepage = "https://brutalmaze.rtfd.io";
license = licenses.agpl3Plus;
maintainers = [ maintainers.McSinyx ];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
alsa-lib,
fftw,
fftwFloat,
flex,
libjack2,
}:
stdenv.mkDerivation rec {
pname = "brutefir";
version = "1.0o";
src = fetchurl {
url = "https://torger.se/anders/files/brutefir-${version}.tar.gz";
sha256 = "caae4a933b53b55b29d6cb7e2803e20819f31def6d0e4e12f9a48351e6dbbe9f";
};
nativeBuildInputs = [ flex ];
buildInputs = [
alsa-lib
fftw
fftwFloat
libjack2
];
postPatch = "substituteInPlace bfconf.c --replace /usr/local $out";
installFlags = [ "INSTALL_PREFIX=$(out)" ];
meta = with lib; {
homepage = "https://torger.se/anders/brutefir.html";
description = "Software convolution engine";
license = licenses.gpl2Only;
maintainers = with maintainers; [ auchter ];
platforms = [
"x86_64-linux"
"i686-linux"
];
mainProgram = "brutefir";
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
cryptsetup,
}:
stdenv.mkDerivation rec {
pname = "bruteforce-luks";
version = "1.4.1";
src = fetchFromGitHub {
owner = "glv2";
repo = "bruteforce-luks";
tag = version;
hash = "sha256-t07YyfCjaXQs/OMekcPNBT8DeSRtq2+8tUpsPP2pG7o=";
};
postPatch = ''
# the test hangs indefinetly when more than 3 threads are used, I haven't figured out why
substituteInPlace tests/Makefile.am \
--replace-fail " crack-volume3.sh" ""
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ cryptsetup ];
enableParallelBuilding = true;
doCheck = true;
meta = {
homepage = "https://github.com/glv2/bruteforce-luks";
description = "Cracks passwords of LUKS encrypted volumes";
mainProgram = "bruteforce-luks";
longDescription = ''
The program tries to decrypt at least one of the key slots by trying
all the possible passwords. It is especially useful if you know
something about the password (i.e. you forgot a part of your password but
still remember most of it). Finding the password of a volume without
knowing anything about it would take way too much time (unless the
password is really short and/or weak). It can also use a dictionary.
'';
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
openssl,
}:
stdenv.mkDerivation rec {
pname = "bruteforce-salted-openssl";
version = "1.5.0";
src = fetchFromGitHub {
owner = "glv2";
repo = "bruteforce-salted-openssl";
tag = version;
hash = "sha256-hXB4CUQ5pihKmahyK359cgQACrs6YH1gHmZJAuTXgQM=";
};
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
openssl
];
enableParallelBuilding = true;
meta = with lib; {
description = "Try to find the password of file encrypted with OpenSSL";
homepage = "https://github.com/glv2/bruteforce-salted-openssl";
changelog = "https://github.com/glv2/bruteforce-salted-openssl/blob/${src.rev}/NEWS";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ octodi ];
mainProgram = "bruteforce-salted-openssl";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
openssl,
db,
}:
stdenv.mkDerivation rec {
pname = "bruteforce-wallet";
version = "1.5.4";
src = fetchFromGitHub {
owner = "glv2";
repo = "bruteforce-wallet";
tag = version;
hash = "sha256-ngzG39c/bWv++PHVgce9r1PXElFhpgYoAepbqD/1Dq0=";
};
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
openssl
db
];
enableParallelBuilding = true;
meta = with lib; {
description = "Try to find password of encrypted cryptocurrency wallet";
homepage = "https://github.com/glv2/bruteforce-wallet";
changelog = "https://github.com/glv2/bruteforce-wallet/blob/${src.rev}/NEWS";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ octodi ];
mainProgram = "bruteforce-wallet";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromGitHub,
makeBinaryWrapper,
medusa,
}:
buildGoModule (finalAttrs: {
pname = "brutespray";
version = "2.4.0";
src = fetchFromGitHub {
owner = "x90skysn3k";
repo = "brutespray";
tag = "v${finalAttrs.version}";
hash = "sha256-tws3BvVQSlGcBgiJ8Ho7V/KJjzoq3TEOiChqTzrMbiU=";
};
vendorHash = "sha256-Fe3W5rlKygw4z5bF+6xy5mv86wKcBuCf3nhtdtFWJPM=";
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
wrapProgram $out/bin/brutespray \
--prefix PATH : ${lib.makeBinPath [ medusa ]}
mkdir -p $out/share/brutespray
cp -r wordlist $out/share/brutespray/wordlist
'';
meta = {
homepage = "https://github.com/x90skysn3k/brutespray";
description = "Tool to do brute-forcing from Nmap output";
mainProgram = "brutespray";
longDescription = ''
This tool automatically attempts default credentials on found services
directly from Nmap output.
'';
license = lib.licenses.mit;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "brygada-1918";
version = "3.006";
src = fetchFromGitHub {
owner = "kosmynkab";
repo = "Brygada-1918";
rev = "8325dc36ca87b8c7b8909c3e048fe90fd7e46c4b";
hash = "sha256-ePehnBYFlm+iExf2Sy25PsIWvtHlys2hcCZ4cHT+H1k=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm444 -t $out/share/fonts/opentype fonts/otf/*.otf
install -Dm444 -t $out/share/fonts/truetype fonts/ttf/*.ttf
install -Dm444 -t $out/share/fonts/variable fonts/variable/*.ttf
runHook postInstall
'';
meta = {
description = "Digital revival of the Brygada serif typeface";
homepage = "https://brygada1918.eu/";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ oidro ];
};
}