diff --git a/pkgs/tools/system/dool/default.nix b/pkgs/tools/system/dool/default.nix new file mode 100644 index 000000000000..c2cde5e9569c --- /dev/null +++ b/pkgs/tools/system/dool/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +}: + +stdenv.mkDerivation rec { + pname = "dool"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "scottchiefbaker"; + repo = "dool"; + rev = "v${version}"; + hash = "sha256-e6gLPmxOZBw6htiJ5Ljob2tQ9xB4kjK8vPs/9WMGER4="; + }; + + 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.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e3a43c73b41..7a395ee7e2c5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7074,6 +7074,8 @@ with pkgs; buildGoModule = buildGo119Module; # build fails with 1.20 }; + dool = callPackage ../tools/system/dool { }; + dosfstools = callPackage ../tools/filesystems/dosfstools { }; dotnetfx35 = callPackage ../development/libraries/dotnetfx35 { };