mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
Merge pull request #86861 from evils/btrfs-heatmap
btrfs-heatmap: init at v8; incl. python.pkgs.btrfs
This commit is contained in:
commit
e437a20642
22
pkgs/development/python-modules/btrfs/default.nix
Normal file
22
pkgs/development/python-modules/btrfs/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "btrfs";
|
||||
version = "11";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1w92sj47wy53ygz725xr613k32pk5khi0g9lrpp6img871241hrx";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Inspect btrfs filesystems";
|
||||
homepage = "https://github.com/knorrie/python-btrfs";
|
||||
license = licenses.lgpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.evils ];
|
||||
};
|
||||
}
|
46
pkgs/tools/filesystems/btrfs-heatmap/default.nix
Normal file
46
pkgs/tools/filesystems/btrfs-heatmap/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ stdenv, lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, installShellFiles
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "btrfs-heatmap";
|
||||
version = "8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "knorrie";
|
||||
repo = "btrfs-heatmap";
|
||||
rev = "v${version}";
|
||||
sha256 = "035frvk3s7g18y81srssvm550nfq7jylr7w60nvixidxvrc0yrnh";
|
||||
};
|
||||
|
||||
# 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 ];
|
||||
nativeBuildInputs = [ python3.pkgs.wrapPython installShellFiles ];
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm 0755 heatmap.py $out/sbin/btrfs-heatmap
|
||||
installManPage ${msrc}
|
||||
|
||||
buildPythonPath ${python3.pkgs.btrfs}
|
||||
patchPythonScript $out/sbin/btrfs-heatmap
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Visualize the layout of a mounted btrfs";
|
||||
homepage = "https://github.com/knorrie/btrfs-heatmap";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.evils ];
|
||||
};
|
||||
}
|
|
@ -862,6 +862,8 @@ in
|
|||
|
||||
boulder = callPackage ../tools/admin/boulder { };
|
||||
|
||||
btrfs-heatmap = callPackage ../tools/filesystems/btrfs-heatmap { };
|
||||
|
||||
buildbot = with python3Packages; toPythonApplication buildbot;
|
||||
buildbot-ui = with python3Packages; toPythonApplication buildbot-ui;
|
||||
buildbot-full = with python3Packages; toPythonApplication buildbot-full;
|
||||
|
|
|
@ -557,6 +557,8 @@ in {
|
|||
|
||||
browsermob-proxy = disabledIf isPy3k (callPackage ../development/python-modules/browsermob-proxy {});
|
||||
|
||||
btrfs = callPackage ../development/python-modules/btrfs { };
|
||||
|
||||
bt_proximity = callPackage ../development/python-modules/bt-proximity { };
|
||||
|
||||
bugseverywhere = throw "bugseverywhere has been removed: Abandoned by upstream."; # Added 2019-11-27
|
||||
|
|
Loading…
Reference in a new issue