-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3db199
commit 1ff374f
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
}) |