depot/third_party/nixpkgs/pkgs/tools/system/dool/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

43 lines
933 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, python3
}:
stdenv.mkDerivation rec {
pname = "dool";
version = "1.3.2";
src = fetchFromGitHub {
owner = "scottchiefbaker";
repo = "dool";
rev = "v${version}";
hash = "sha256-G9mcvUPGQw+0AtvlHdnnfAmcZtcUH/Sc77UVeA/FYZc=";
};
buildInputs = [
python3
];
makeFlags = [
"prefix=$(out)"
];
# fix the plugins directory
postPatch = ''
substituteInPlace dool \
--replace \
"os.path.abspath(os.path.dirname(sys.argv[0])) + '/plugins/'" \
"'$out/share/dool/'"
'';
meta = with lib; {
description = "Python3 compatible clone of dstat";
homepage = "https://github.com/scottchiefbaker/dool";
changelog = "https://github.com/scottchiefbaker/dool/blob/${src.rev}/ChangeLog";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ figsoda ];
platforms = platforms.linux;
mainProgram = "dool";
};
}