Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 45c95507bb46
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 829a06020277
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 18, 2021

  1. Verified

    This commit was signed with the committer’s verified signature. The key has been revoked.
    joachifm Joachim F.
    Copy the full SHA
    993c9fa View commit details

Commits on Jan 19, 2021

  1. Merge pull request #107040 from nagy/dstat-python3

    dstat: 0.7.3 -> 0.7.4
    SuperSandro2000 authored Jan 19, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has been revoked.
    joachifm Joachim F.
    Copy the full SHA
    829a060 View commit details
Showing with 23 additions and 8 deletions.
  1. +23 −8 pkgs/os-specific/linux/dstat/default.nix
31 changes: 23 additions & 8 deletions pkgs/os-specific/linux/dstat/default.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
{ lib, stdenv, fetchurl, python2Packages }:
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:

python2Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "dstat";
format = "other";
version = "0.7.3";
version = "0.7.4";

src = fetchurl {
url = "https://github.com/dagwieers/dstat/archive/${version}.tar.gz";
sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6";
src = fetchFromGitHub {
owner = "dstat-real";
repo = "dstat";
rev = "v${version}";
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
};

propagatedBuildInputs = with python2Packages; [ python-wifi ];
propagatedBuildInputs = with python3Packages; [ six ];

patches = [ ./fix_pluginpath.patch ];
patches = [
./fix_pluginpath.patch
# this fixes another bug with python3
(fetchpatch {
url = https://github.com/efexgee/dstat/commit/220a785321b13b6df92a536080aca6ef1cb644ad.patch ;
sha256 = "08kcz3yxvl35m55y7g1pr73x3bjcqnv0qlswxqyq8cqxg9zd64cn";
})
];

makeFlags = [ "prefix=$(out)" ];

# remove deprecation warnings
preFixup = ''
sed -i "s/import collections/import collections.abc/g" $out/share/dstat/dstat.py $out/bin/dstat
sed -i "s/collections.Sequence/collections.abc.Sequence/g" "$out"/bin/dstat
'';

meta = with lib; {
homepage = "http://dag.wieers.com/home-made/dstat/";
description = "Versatile resource statistics tool";