Unverified Commit c31603e6 authored by Sirio Balmelli's avatar Sirio Balmelli
Browse files

asitop -> macpm: migrate to maintained fork, fix build



Migrate from 'asitop' to maintained fork 'macpm',
which fixes an issue related to temp files owned by root.

Fix python application build.

Symlink 'asitop' in the final package to maintain backwards compatibility.

Signed-off-by: default avatarSirio Balmelli <sirio@b-ad.ch>
Co-authored-by: default avatarAleksana <me@aleksana.moe>
parent fb777966
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  lib,

  python3Packages,
  fetchFromGitHub,
}:

python3Packages.buildPythonApplication {
  pname = "macpm";
  version = "0.24-unstable-2024-11-19";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "visualcjy";
    repo = "macpm";
    rev = "7882d4c86c84bb23a8966ca57990de9b11397bd4";
    hash = "sha256-jqaPPvYbuL8q6grmBLyZLf8aDmjugYxMOWAh1Ix82jc=";
  };

  # has no tests
  doCheck = false;

  # backwards compatibility for users still expecting 'asitop'
  postInstall = ''
    ln -rs $out/bin/macpm $out/bin/asitop
  '';

  dependencies = with python3Packages; [
    dashing
    humanize
    psutil
  ];

  meta = {
    description = "Perf monitoring CLI tool for Apple Silicon; previously named 'asitop'";
    homepage = "https://github.com/visualcjy/macpm";
    mainProgram = "macpm";
    platforms = [ "aarch64-darwin" ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      juliusrickert
      siriobalmelli
    ];
  };
}
+0 −34
Original line number Diff line number Diff line
{
  lib,
  python3,
  fetchPypi,
}:

python3.pkgs.buildPythonApplication rec {
  pname = "asitop";
  version = "0.0.24";
  format = "setuptools";

  disabled = python3.pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Xfe1kwRXKpSPcc+UuHrcYThpqKh6kzWVsbPia/QsPjc=";
  };

  # has no tests
  doCheck = false;

  propagatedBuildInputs = with python3.pkgs; [
    dashing
    psutil
  ];

  meta = with lib; {
    homepage = "https://github.com/tlkh/asitop";
    description = "Perf monitoring CLI tool for Apple Silicon";
    platforms = platforms.darwin;
    license = licenses.mit;
    maintainers = with maintainers; [ juliusrickert ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ mapAliases {
  aria = aria2; # Added 2024-03-26
  armcord = throw "ArmCord was renamed to legcord by the upstream developers. Action is required to migrate configurations between the two applications. Please see this PR for more details: https://github.com/NixOS/nixpkgs/pull/347971"; # Added 2024-10-11
  aseprite-unfree = aseprite; # Added 2023-08-26
  asitop = macpm; # 'macpm' is a better-maintained downstream; keep 'asitop' for backwards-compatibility
  async = throw "'async' has been removed due to lack of upstream maintenance"; # Added 2025-01-26
  atlassian-bamboo = throw "Atlassian software has been removed, as support for the Atlassian Server products ended in February 2024 and there was insufficient interest in maintaining the Atlassian Data Center replacements"; # Added 2024-11-02
  atlassian-confluence = throw "Atlassian software has been removed, as support for the Atlassian Server products ended in February 2024 and there was insufficient interest in maintaining the Atlassian Data Center replacements"; # Added 2024-11-02
+0 −2
Original line number Diff line number Diff line
@@ -282,8 +282,6 @@ with pkgs;
    extraPackages = [ jdk17 ];
  };
  asitop = callPackage ../os-specific/darwin/asitop { };
  cve = with python3Packages; toPythonApplication cvelib;
  apko = callPackage ../development/tools/apko {