Skip to content

Commit

Permalink
btrfs-list: init at 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
asymmetric committed Oct 26, 2024
1 parent c3db199 commit 1ff374f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pkgs/by-name/bt/btrfs-list/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
btrfs-progs,
perl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "btrfs-list";
version = "2.3";

src = fetchFromGitHub {
owner = "speed47";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-cWzDRop0cyrjVIJzuZxTqELgec66GiPAUJY1xIBr3OY=";
};

buildInputs = [ btrfs-progs ];

patchPhase = ''
substituteInPlace btrfs-list --replace-fail /usr/bin/perl ${lib.getExe perl}
'';

installPhase = ''
mkdir -p $out/bin
cp btrfs-list $out/bin/
'';

meta = with lib; {
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 = licenses.gpl2Only;
maintainers = with maintainers; [ asymmetric ];
};
})

0 comments on commit 1ff374f

Please sign in to comment.