Merge pull request #119753 from evils/btrfs-heatmap
This commit is contained in:
commit
34463b2e38
@ -1,17 +1,23 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "btrfs";
|
pname = "btrfs";
|
||||||
version = "11";
|
version = "12";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "knorrie";
|
||||||
sha256 = "1w92sj47wy53ygz725xr613k32pk5khi0g9lrpp6img871241hrx";
|
repo = "python-btrfs";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-ZQSp+pbHABgBTrCwC2YsUUXAf/StP4ny7MEhBgCRqgE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# no tests (in v12)
|
||||||
|
doCheck = false;
|
||||||
|
pythonImportsCheck = [ "btrfs" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Inspect btrfs filesystems";
|
description = "Inspect btrfs filesystems";
|
||||||
homepage = "https://github.com/knorrie/python-btrfs";
|
homepage = "https://github.com/knorrie/python-btrfs";
|
||||||
|
@ -2,25 +2,17 @@
|
|||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3
|
, python3
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, fetchurl
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "btrfs-heatmap";
|
pname = "btrfs-heatmap";
|
||||||
version = "8";
|
version = "9";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "knorrie";
|
owner = "knorrie";
|
||||||
repo = "btrfs-heatmap";
|
repo = "btrfs-heatmap";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "035frvk3s7g18y81srssvm550nfq7jylr7w60nvixidxvrc0yrnh";
|
sha256 = "sha256-yCkuZqWwxrs2eS7EXY6pAOVVVSq7dAMxJtf581gX8vg=";
|
||||||
};
|
|
||||||
|
|
||||||
# man page is currently only in the debian branch
|
|
||||||
# https://github.com/knorrie/btrfs-heatmap/issues/11
|
|
||||||
msrc = fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/knorrie/btrfs-heatmap/45d844e12d7f5842ebb99e65d7b968a5e1a89066/debian/man/btrfs-heatmap.8";
|
|
||||||
sha256 = "1md7xc426sc8lq4w29gjd6gv7vjqhcwrqqcr6z39kihvi04d5f6q";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python3 ];
|
buildInputs = [ python3 ];
|
||||||
@ -29,11 +21,15 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm 0755 heatmap.py $out/sbin/btrfs-heatmap
|
runHook preInstall
|
||||||
installManPage ${msrc}
|
|
||||||
|
install -Dm 0755 btrfs-heatmap $out/sbin/btrfs-heatmap
|
||||||
|
installManPage man/btrfs-heatmap.1
|
||||||
|
|
||||||
buildPythonPath ${python3.pkgs.btrfs}
|
buildPythonPath ${python3.pkgs.btrfs}
|
||||||
patchPythonScript $out/sbin/btrfs-heatmap
|
patchPythonScript $out/sbin/btrfs-heatmap
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user