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,48 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
perl,
perlPackages,
bluez,
}:
stdenv.mkDerivation rec {
pname = "bt-fw-converter";
version = "2017-02-19";
rev = "2d8b34402df01c6f7f4b8622de9e8b82fadf4153";
src = fetchurl {
url = "https://raw.githubusercontent.com/winterheart/broadcom-bt-firmware/${rev}/tools/bt-fw-converter.pl";
sha256 = "c259b414a4a273c89a0fa7159b3ef73d1ea62b6de91c3a7c2fcc832868e39f4b";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
perl
perlPackages.RegexpGrammars
bluez
];
unpackCmd = ''
mkdir -p ${pname}-${version}
cp $src ${pname}-${version}/bt-fw-converter.pl
'';
installPhase = ''
install -D -m755 bt-fw-converter.pl $out/bin/bt-fw-converter
substituteInPlace $out/bin/bt-fw-converter --replace /usr/bin/hex2hcd ${bluez}/bin/hex2hcd
wrapProgram $out/bin/bt-fw-converter --set PERL5LIB $PERL5LIB
'';
meta = with lib; {
homepage = "https://github.com/winterheart/broadcom-bt-firmware/";
description = "Tool that converts hex to hcd based on inf file";
mainProgram = "bt-fw-converter";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ zraexy ];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
boost,
cmake,
cxxopts,
digestpp,
fetchFromGitHub,
fmt,
jsoncons,
pugixml,
sqlite_orm,
stdenv,
}:
stdenv.mkDerivation {
pname = "bt-migrate";
version = "0-unstable-2025-05-31";
src = fetchFromGitHub {
owner = "mikedld";
repo = "bt-migrate";
rev = "eb5b0ba5e0176844efde3a319595f52ffe900c2c";
hash = "sha256-eg7rZnqpQiOA1N7GHv14eDAmvmj6VWq/dlw2YBw6IAA=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
boost
cxxopts
fmt
jsoncons
pugixml
sqlite_orm
];
cmakeFlags = [
(lib.strings.cmakeBool "USE_VCPKG" false)
# NOTE: digestpp does not have proper CMake packaging (yet?)
(lib.strings.cmakeBool "USE_FETCHCONTENT" true)
(lib.strings.cmakeFeature "FETCHCONTENT_SOURCE_DIR_DIGESTPP" "${digestpp}/include/digestpp")
];
# NOTE: no install target in CMake...
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp BtMigrate $out/bin
runHook postInstall
'';
strictDeps = true;
meta = {
description = "Torrent state migration tool";
homepage = "https://github.com/mikedld/bt-migrate?tab=readme-ov-file";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ambroisie ];
mainProgram = "BtMigrate";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,89 @@
{
lib,
SDL,
SDL_image,
expat,
fetchpatch,
fetchurl,
libGL,
libGLU,
libvorbis,
libX11,
lua,
pkg-config,
scons,
smpeg,
stdenv,
zip,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "btanks";
version = "0.9.8083";
src = fetchurl {
url = "mirror://sourceforge/btanks/btanks-${finalAttrs.version}.tar.bz2";
hash = "sha256-P9LOaitF96YMOxFPqa/xPLPdn7tqZc3JeYt2xPosQ0E=";
};
patches = [
(fetchpatch {
name = "lua52.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/lua52.patch?h=btanks&id=cd0e016963238f16209baa2da658aa3fad36e33d";
hash = "sha256-Xwl//sfGprhg71jf+X3q8qxdB+5ZtqJrjBxS8+cw5UY=";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/-/raw/debian/0.9.8083-9/debian/patches/gcc-4.7.patch";
hash = "sha256-JN7D+q63EvKJX9wAEQgcVqE1VZzMa4Y1CPIlA3uYtLc=";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/-/raw/debian/0.9.8083-9/debian/patches/pow10f.patch";
hash = "sha256-6QFP1GTwqXnjfekzEiIpWKCD6HOcGusYW+02sUE6hcA=";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/-/raw/debian/0.9.8083-9/debian/patches/python3.patch";
hash = "sha256-JpK409Myi8mxQaunmLFKKh1NKvKLXpNHHsDvRee8OoQ=";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/-/raw/debian/0.9.8083-9/debian/patches/scons.patch";
hash = "sha256-JCvBY2fOV8Sc/mpvEsJQv1wKcS1dHqYxvRk6I9p7ZKc=";
})
];
nativeBuildInputs = [
SDL
pkg-config
scons
smpeg
zip
];
buildInputs = [
SDL
SDL_image
expat
libGL
libGLU
libX11
libvorbis
lua
smpeg
zlib
];
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL_image}/include/SDL";
enableParallelBuilding = true;
strictDeps = true;
meta = {
homepage = "https://sourceforge.net/projects/btanks/";
description = "Fast 2d tank arcade game with multiplayer and split-screen modes";
license = lib.licenses.gpl2Plus;
mainProgram = "btanks";
maintainers = [ ];
inherit (SDL.meta) platforms;
};
})

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
librsync,
}:
stdenv.mkDerivation rec {
pname = "btar";
version = "1.1.1";
src = fetchurl {
url = "https://vicerveza.homeunix.net/~viric/soft/btar/btar-${version}.tar.gz";
sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd";
};
patches = [
(fetchpatch {
url = "https://build.opensuse.org/public/source/openSUSE:Factory/btar/btar-librsync.patch?rev=2";
sha256 = "1awqny9489vsfffav19s73xxg26m7zrhvsgf1wxb8c2izazwr785";
})
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: listindex.o:/build/btar-1.1.1/loadindex.h:12: multiple definition of
# `ptr'; main.o:/build/btar-1.1.1/loadindex.h:12: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
buildInputs = [ librsync ];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Tar-compatible block-based archiver";
mainProgram = "btar";
license = lib.licenses.gpl3Plus;
homepage = "https://briantracy.xyz/writing/btar.html";
platforms = platforms.all;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
pkg-config,
python3,
vips,
}:
buildNpmPackage rec {
pname = "btc-rpc-explorer";
version = "3.5.1";
src = fetchFromGitHub {
owner = "janoside";
repo = "btc-rpc-explorer";
rev = "v${version}";
hash = "sha256-L7mW1WIbHga6/UjMx4sP0MUhJIRytUhHVIEWMD2amQo=";
};
npmDepsHash = "sha256-eYA2joO4wcV10xJeYLqCbvM2szWlqofmugoHHD9D30U=";
postPatch = ''
ln -s npm-shrinkwrap.json package-lock.json
'';
makeCacheWritable = true;
nativeBuildInputs = [
pkg-config
python3
];
buildInputs = [
vips
];
dontNpmBuild = true;
meta = {
changelog = "https://github.com/janoside/btc-rpc-explorer/blob/${src.rev}/CHANGELOG.md";
description = "Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core";
homepage = "https://github.com/janoside/btc-rpc-explorer";
license = lib.licenses.mit;
mainProgram = "btc-rpc-explorer";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "btcd";
version = "0.24.2";
src = fetchFromGitHub {
owner = "btcsuite";
repo = "btcd";
rev = "v${version}";
hash = "sha256-83eiVYXpyiGgLmYxj3rFk4CHG7F9UQ3vk1ZHm64Cm4A=";
};
vendorHash = "sha256-ek+gaolwpwoEEWHKYpK2OxCpk/0vywF784J3CC0UCZ4=";
subPackages = [
"."
"cmd/*"
];
preCheck = ''
DIR="github.com/btcsuite/btcd/"
# TestCreateDefaultConfigFile requires the sample-btcd.conf in $DIR
mkdir -p $DIR
cp sample-btcd.conf $DIR
'';
meta = {
description = "Alternative full node bitcoin implementation written in Go (golang)";
homepage = "https://github.com/btcsuite/btcd";
changelog = "https://github.com/btcsuite/btcd/releases/tag/v${version}";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ _0xB10C ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
openssl,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "btcdeb";
version = "0.3.20-unstable-2024-04-09";
src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "btcdeb";
rev = "e2c2e7b9fe2ecc0884129b53813a733f93a6e2c7";
hash = "sha256-heV5VByNZ/2doGVtYhGEei4fV4847UPVgOyU0PDDHc8=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [ openssl ];
enableParallelBuilding = true;
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Bitcoin Script Debugger";
homepage = "https://github.com/bitcoin-core/btcdeb";
changelog = "https://github.com/bitcoin-core/btcdeb/releases";
license = licenses.mit;
maintainers = with maintainers; [ akru ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,5 @@
{ btcpayserver }:
btcpayserver.override {
altcoinSupport = true;
}

1862
pkgs/by-name/bt/btcpayserver/deps.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
altcoinSupport ? false,
}:
buildDotnetModule rec {
pname = "btcpayserver";
version = "2.2.1";
src = fetchFromGitHub {
owner = "btcpayserver";
repo = "btcpayserver";
tag = "v${version}";
hash = "sha256-W6344r+Doz2aiYebeY3+UkFW7dq4aH/GUGqYyxnK4II=";
};
projectFile = "BTCPayServer/BTCPayServer.csproj";
nugetDeps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
buildType = if altcoinSupport then "Altcoins-Release" else "Release";
# macOS has a case-insensitive filesystem, so these two can be the same file
postFixup = ''
mv $out/bin/{BTCPayServer,btcpayserver} || :
'';
meta = {
description = "Self-hosted, open-source cryptocurrency payment processor";
homepage = "https://btcpayserver.org";
changelog = "https://github.com/btcpayserver/btcpayserver/blob/v${version}/Changelog.md";
maintainers = with lib.maintainers; [
kcalvinalvin
erikarvstedt
];
license = lib.licenses.mit;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
cd "$scriptDir"
echo "Updating nbxplorer"
../../nb/nbxplorer/update.sh
echo
echo "Updating btcpayserver"
../../nb/nbxplorer/util/update-common.sh btcpayserver deps.nix

View File

@@ -0,0 +1,20 @@
{
"dependencies": {
"ae": {
"version": "0.0.3461",
"sha256": "1mk075r3bas8s699y6sc4fxbdyjhc9cm6qxcqqaj0di9ijb71fq1"
},
"btrfs": {
"version": "0.0.21",
"sha256": "0j7ksngwn8kilbql6p7hh5jvmrxqsr7pniw2n1qlrwdsms6qv72m"
},
"ncurses": {
"version": "1.0.0",
"sha256": "0ivl88vp2dy9rpv6x3f9jlyqa7aps2x1kkyx80w2d4vcs31pzmb2"
},
"emsi_containers": {
"version": "0.9.0",
"sha256": "1viz1fjh6jhfvl0d25bb1q7aclm1hrs0d7hhcx1d9c0gg5k6lcpm"
}
}
}

View File

@@ -0,0 +1,45 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
ncurses,
zlib,
}:
buildDubPackage rec {
pname = "btdu";
version = "0.6.0";
src = fetchFromGitHub {
owner = "CyberShadow";
repo = "btdu";
rev = "v${version}";
hash = "sha256-B8ojxdXibeNEZay9S5lzpB6bTKNB2ZI6AQ3XKUHioE0=";
};
dubLock = ./dub-lock.json;
buildInputs = [
ncurses
zlib
];
installPhase = ''
runHook preInstall
install -Dm755 btdu -t $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Sampling disk usage profiler for btrfs";
homepage = "https://github.com/CyberShadow/btdu";
changelog = "https://github.com/CyberShadow/btdu/releases/tag/${src.rev}";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [
atila
cybershadow
];
mainProgram = "btdu";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
cargo-hack,
rustc,
zlib,
libxml2,
}:
rustPlatform.buildRustPackage rec {
pname = "btfdump";
version = "0.0.4";
src = fetchCrate {
inherit pname version;
hash = "sha256-iLYGFXB4goiY7eJXXBhX9Y1TOltsW40ogeBhvTV2NvU=";
};
cargoHash = "sha256-uGp9XaqepceUmaEKBVEcu8oorfMAOk8BCPIHtun8Sto=";
meta = {
description = "BTF introspection tool";
mainProgram = "btf";
homepage = "https://github.com/anakryiko/btfdump";
license = with lib.licenses; [ bsd2 ];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
python3,
boost,
fuse3,
libtorrent-rasterbar,
curl,
}:
stdenv.mkDerivation rec {
pname = "btfs";
version = "3.1";
src = fetchFromGitHub {
owner = "johang";
repo = "btfs";
rev = "v${version}";
sha256 = "sha256-JuofC4TpbZ56qiUrHeoK607YHVbwqwLGMIdUpsTm9Ic=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
boost
fuse3
libtorrent-rasterbar
curl
python3
];
meta = with lib; {
description = "Bittorrent filesystem based on FUSE";
homepage = "https://github.com/johang/btfs";
license = licenses.gpl3;
maintainers = with maintainers; [ rnhmjoj ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "btlejack";
version = "2.1.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "virtualabs";
repo = "btlejack";
tag = "v${version}";
sha256 = "sha256-Q6y9murV1o2i1sluqTVB5+X3B7ywFsI0ZvlJjHrHSpo=";
};
postPatch = ''
sed -i "s|^.*'argparse',$||" setup.py
'';
build-system = [
python3Packages.setuptools
];
dependencies = [
python3Packages.pyserial
python3Packages.halo
];
meta = {
homepage = "https://github.com/virtualabs/btlejack";
description = "Bluetooth Low Energy Swiss-army knife";
mainProgram = "btlejack";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ oxzi ];
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
config,
stdenv,
fetchFromGitHub,
cmake,
removeReferencesTo,
autoAddDriverRunpath,
apple-sdk_15,
versionCheckHook,
nix-update-script,
rocmPackages,
cudaSupport ? config.cudaSupport,
rocmSupport ? config.rocmSupport,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "btop";
version = "1.4.5";
src = fetchFromGitHub {
owner = "aristocratos";
repo = "btop";
tag = "v${finalAttrs.version}";
hash = "sha256-ZLT+Hc1rvBFyhey+imbgGzSH/QaVxIh/jvDKVSmDrA0=";
};
nativeBuildInputs = [
cmake
]
++ lib.optionals cudaSupport [
autoAddDriverRunpath
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_15
];
installFlags = [ "PREFIX=$(out)" ];
# fix build on darwin (see https://github.com/NixOS/nixpkgs/pull/422218#issuecomment-3039181870 and https://github.com/aristocratos/btop/pull/1173)
cmakeFlags = [
(lib.cmakeBool "BTOP_LTO" (!stdenv.hostPlatform.isDarwin))
];
postInstall = ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop)
'';
postPhases = lib.optionals rocmSupport [ "postPatchelf" ];
postPatchelf = lib.optionalString rocmSupport ''
patchelf --add-rpath ${lib.getLib rocmPackages.rocm-smi}/lib $out/bin/btop
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Monitor of resources";
homepage = "https://github.com/aristocratos/btop";
changelog = "https://github.com/aristocratos/btop/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [
khaneliman
rmcgibbo
ryan4yin
];
mainProgram = "btop";
};
})

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
fixDarwinDylibNames,
}:
stdenv.mkDerivation {
pname = "btor2tools";
version = "0-unstable-2025-09-18";
src = fetchFromGitHub {
owner = "boolector";
repo = "btor2tools";
rev = "d33c73ff1d173f1bfac8ba6b1c6d68ba62c55f8e";
sha256 = "sha256-RVjZ5HM2yQ3eAICFuzwvNeQDXzWzzSiCCslIWMJi6U8=";
};
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
installPhase = ''
mkdir -p $out $dev/include/btor2parser/ $lib/lib
cp -vr bin $out
cp -v ../src/btor2parser/btor2parser.h $dev/include/btor2parser
cp -v lib/libbtor2parser.* $lib/lib
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
# make sure shared libraries are present and program can be executed
$out/bin/btorsim -h > /dev/null
runHook postInstallCheck
'';
outputs = [
"out"
"dev"
"lib"
];
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/btorsim contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
];
meta = with lib; {
description = "Generic parser and tool package for the BTOR2 format";
homepage = "https://github.com/Boolector/btor2tools";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchurl,
bash,
btrfs-progs,
openssh,
perl,
perlPackages,
util-linux,
asciidoctor,
mbuffer,
makeWrapper,
genericUpdater,
curl,
writeShellScript,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "btrbk";
version = "0.32.6";
src = fetchurl {
url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz";
sha256 = "AuKsZHyRhGMgLL5ge7lVV6T3/SNwaRJDM8VNpbK7t2s=";
};
nativeBuildInputs = [
asciidoctor
makeWrapper
];
buildInputs = with perlPackages; [
perl
DateCalc
];
preInstall = ''
for f in $(find . -name Makefile); do
substituteInPlace "$f" \
--replace "/usr" "$out" \
--replace "/etc" "$out/etc"
done
# Tainted Mode disables PERL5LIB
substituteInPlace btrbk \
--replace "perl -T" "perl" \
--replace "\$0" "\$ENV{'program_name'}"
# Fix SSH filter script
sed -i '/^export PATH/d' ssh_filter_btrbk.sh
substituteInPlace ssh_filter_btrbk.sh --replace logger ${util-linux}/bin/logger
'';
preFixup = ''
wrapProgram $out/bin/btrbk \
--set PERL5LIB $PERL5LIB \
--run 'export program_name=$0' \
--prefix PATH ':' "${
lib.makeBinPath [
btrfs-progs
bash
mbuffer
openssh
]
}"
'';
passthru.tests = {
inherit (nixosTests)
btrbk
btrbk-no-timer
btrbk-section-order
btrbk-doas
;
};
passthru.updateScript = genericUpdater {
versionLister = writeShellScript "btrbk-versionLister" ''
${curl}/bin/curl -s https://digint.ch/download/btrbk/releases/ | ${perl}/bin/perl -lne 'print $1 if /btrbk-([0-9.]*)\.tar/'
'';
};
meta = with lib; {
description = "Backup tool for btrfs subvolumes";
homepage = "https://digint.ch/btrbk";
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ asymmetric ];
mainProgram = "btrbk";
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitLab,
btrfs-progs,
cmake,
coreutils,
git,
pkg-config,
qt6,
snapper,
util-linux,
enableSnapper ? true,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "btrfs-assistant";
version = "2.2";
src = fetchFromGitLab {
owner = "btrfs-assistant";
repo = "btrfs-assistant";
rev = finalAttrs.version;
hash = "sha256-hFWYT+YIgnqBigpPkGdsLj6rcg4CjJffAyXlR23QP0Y=";
};
nativeBuildInputs = [
cmake
git
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = [
btrfs-progs
coreutils
qt6.qtbase
qt6.qtsvg
qt6.qttools
qt6.qtwayland
util-linux
]
++ lib.optionals enableSnapper [ snapper ];
prePatch = lib.optionalString enableSnapper ''
substituteInPlace src/main.cpp \
--replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
'';
postPatch = ''
substituteInPlace src/org.btrfs-assistant.pkexec.policy \
--replace-fail '/usr/bin' "$out/bin"
substituteInPlace src/btrfs-assistant \
--replace-fail 'btrfs-assistant-bin' "$out/bin/btrfs-assistant-bin"
substituteInPlace src/btrfs-assistant-launcher \
--replace-fail 'btrfs-assistant' "$out/bin/btrfs-assistant"
''
+ lib.optionalString enableSnapper ''
substituteInPlace src/btrfs-assistant.conf \
--replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "GUI management tool to make managing a Btrfs filesystem easier";
homepage = "https://gitlab.com/btrfs-assistant/btrfs-assistant";
license = lib.licenses.gpl3Only;
mainProgram = "btrfs-assistant-bin";
maintainers = with lib.maintainers; [ khaneliman ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
coreutils,
getopt,
gnugrep,
gnused,
gawk,
btrfs-progs,
syslogSupport ? true,
util-linux ? null,
}:
assert syslogSupport -> util-linux != null;
stdenv.mkDerivation rec {
version = "2.0.4";
pname = "btrfs-auto-snapshot";
src = fetchFromGitHub {
owner = "hunleyd";
repo = "btrfs-auto-snapshot";
rev = "v${version}";
hash = "sha256-QpuwkGaYAkpu5hYyb360Mr5tHsZc2LzMlKtpS8CyyhI=";
};
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm755 btrfs-auto-snapshot $out/bin/btrfs-auto-snapshot
'';
wrapperPath = lib.makeBinPath (
[
coreutils
getopt
gnugrep
gnused
gawk
btrfs-progs
]
++ lib.optional syslogSupport util-linux
);
postFixup = ''
wrapProgram $out/bin/btrfs-auto-snapshot \
--prefix PATH : "${wrapperPath}"
'';
meta = with lib; {
description = "BTRFS Automatic Snapshot Service for Linux";
homepage = "https://github.com/hunleyd/btrfs-auto-snapshot";
license = licenses.gpl2;
mainProgram = "btrfs-auto-snapshot";
maintainers = with maintainers; [ motiejus ];
platforms = platforms.linux;
longDescription = ''
btrfs-auto-snapshot is a Bash script designed to bring as much of the
functionality of the wonderful ZFS snapshot tool zfs-auto-snapshot to
BTRFS as possible. Designed to run from cron (using
/etc/cron.{daily,hourly,weekly}) it automatically creates a snapshot of
the specified BTRFS filesystem (or, optionally, all of them) and then
automatically purges the oldest snapshots of that type (hourly, daily, et
al) based on a user-defined retention policy.
Snapshots are stored in a '.btrfs' directory at the root of the BTRFS
filesystem being snapped and are read-only by default.
'';
};
}

View File

@@ -0,0 +1,51 @@
{
stdenv,
lib,
fetchFromGitHub,
python3,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "btrfs-heatmap";
version = "9";
src = fetchFromGitHub {
owner = "knorrie";
repo = "btrfs-heatmap";
rev = "v${version}";
sha256 = "sha256-yCkuZqWwxrs2eS7EXY6pAOVVVSq7dAMxJtf581gX8vg=";
};
buildInputs = [ python3 ];
nativeBuildInputs = [
python3.pkgs.wrapPython
installShellFiles
];
outputs = [
"out"
"man"
];
installPhase = ''
runHook preInstall
install -Dm 0755 btrfs-heatmap $out/sbin/btrfs-heatmap
installManPage man/btrfs-heatmap.1
buildPythonPath ${python3.pkgs.btrfs}
patchPythonScript $out/sbin/btrfs-heatmap
runHook postInstall
'';
meta = with lib; {
description = "Visualize the layout of a mounted btrfs";
mainProgram = "btrfs-heatmap";
homepage = "https://github.com/knorrie/btrfs-heatmap";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
btrfs-progs,
coreutils,
ncurses,
perl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "btrfs-list";
version = "2.4";
src = fetchFromGitHub {
owner = "speed47";
repo = "btrfs-list";
rev = "v${finalAttrs.version}";
hash = "sha256-K6/xFR4Qmr6ynH5rZfOTN8nkl99iqcJPmKPwtp9FYyc=";
};
buildInputs = [ perl ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -D -t $out/bin btrfs-list
wrapProgram $out/bin/btrfs-list \
--prefix PATH : ${
lib.makeBinPath [
coreutils # uses readlink
ncurses # uses tput
btrfs-progs
]
}
'';
meta = {
description = "Get a nice tree-style view of your btrfs subvolumes/snapshots, including their size, à la 'zfs list'";
homepage = "https://github.com/speed47/btrfs-list";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ asymmetric ];
mainProgram = "btrfs-list";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,111 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
pkg-config,
zstd,
acl,
attr,
e2fsprogs,
libuuid,
lzo,
udev,
zlib,
runCommand,
btrfs-progs,
gitUpdater,
udevSupport ? true,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "btrfs-progs";
version = "6.16";
src = fetchurl {
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
hash = "sha256-Makw+HN8JhioJK1L0f3YP1QQPg6qFaqtxIT/rjNGb8U=";
};
nativeBuildInputs = [
pkg-config
]
++ lib.optionals udevSupport [
udevCheckHook
]
++ [
(buildPackages.python3.withPackages (
ps: with ps; [
sphinx
sphinx-rtd-theme
]
))
];
buildInputs = [
acl
attr
e2fsprogs
libuuid
lzo
udev
zlib
zstd
];
# gcc bug with -O1 on ARM with gcc 4.8
# This should be fine on all platforms so apply universally
postPatch = "sed -i s/-O1/-O2/ configure";
postInstall = ''
install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs
'';
configureFlags = [
# Built separately, see python3Packages.btrfsutil
"--disable-python"
]
++ lib.optionals stdenv.hostPlatform.isMusl [
"--disable-backtrace"
]
++ lib.optionals (!udevSupport) [
"--disable-libudev"
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
makeFlags = [ "udevruledir=$(out)/lib/udev/rules.d" ];
enableParallelBuilding = true;
doInstallCheck = true;
passthru.tests = {
simple-filesystem = runCommand "btrfs-progs-create-fs" { } ''
mkdir -p $out
truncate -s110M $out/disc
${btrfs-progs}/bin/mkfs.btrfs $out/disc | tee $out/success
${btrfs-progs}/bin/btrfs check $out/disc | tee $out/success
[ -e $out/success ]
'';
};
passthru.updateScript = gitUpdater {
# No nicer place to find latest release.
url = "https://github.com/kdave/btrfs-progs.git";
rev-prefix = "v";
};
meta = {
description = "Utilities for the btrfs filesystem";
homepage = "https://btrfs.readthedocs.io/en/latest/";
changelog = "https://github.com/kdave/btrfs-progs/raw/v${version}/CHANGES";
license = lib.licenses.gpl2Only;
mainProgram = "btrfs";
maintainers = with lib.maintainers; [ raskin ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,45 @@
{
bash,
btrfs-progs,
coreutils,
fetchFromGitHub,
gnugrep,
lib,
makeWrapper,
stdenvNoCC,
util-linuxMinimal,
}:
stdenvNoCC.mkDerivation rec {
pname = "btrfs-snap";
version = "1.7.3";
src = fetchFromGitHub {
owner = "jf647";
repo = "btrfs-snap";
tag = version;
sha256 = "sha256-SDzLjgNRuR9XpmcYCD9T10MLS+//+pWFGDiTAb8NiLQ=";
};
buildInputs = [ bash ];
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp btrfs-snap $out/bin/
wrapProgram $out/bin/btrfs-snap --prefix PATH : ${
lib.makeBinPath [
btrfs-progs # btrfs
coreutils # cut, date, head, ls, mkdir, readlink, stat, tail, touch, test, [
gnugrep # grep
util-linuxMinimal # logger, mount
]
}
'';
meta = with lib; {
description = "Create and maintain the history of snapshots of btrfs filesystems";
mainProgram = "btrfs-snap";
homepage = "https://github.com/jf647/btrfs-snap";
license = licenses.gpl3Only;
maintainers = with maintainers; [ lionello ];
platforms = platforms.linux;
};
}