1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/pkgs/by-name/bt/btrfs-heatmap/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
990 B
Nix
Raw Permalink Normal View History

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