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
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
990 B
Nix

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