diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index d960a9d3d990..936555f93a4d 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -2,6 +2,7 @@ , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, pkg-config, python3, xmlto , zstd , acl, attr, e2fsprogs, libuuid, lzo, systemd, zlib +, runCommand, btrfs-progs }: stdenv.mkDerivation rec { @@ -37,6 +38,15 @@ stdenv.mkDerivation rec { enableParallelBuilding = 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 ] + ''; + }; meta = with lib; { description = "Utilities for the btrfs filesystem"; homepage = "https://btrfs.wiki.kernel.org/";