Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bottom: add gpu recognition, new apple sdk, refactor #360568

Merged
merged 9 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
lib,
rustPlatform,
fetchFromGitHub,
autoAddDriverRunpath,
installShellFiles,
stdenv,
darwin,
bottom,
testers,
apple-sdk_11,
versionCheckHook,
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -15,21 +16,22 @@ rustPlatform.buildRustPackage rec {

src = fetchFromGitHub {
owner = "ClementTsang";
repo = pname;
rev = version;
repo = "bottom";
tag = version;
hash = "sha256-hm0Xfd/iW+431HflvZErjzeZtSdXVb/ReoNIeETJ5Ik=";
};

cargoHash = "sha256-FQbJx6ijX8kE4qxT7OQ7FwxLKJB5/moTKhBK0bfvBas=";

nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
autoAddDriverRunpath
installShellFiles
];

buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Foundation
apple-sdk_11
];

doCheck = false;

postInstall = ''
installManPage target/tmp/bottom/manpage/btm.1
installShellCompletion \
Expand All @@ -39,21 +41,32 @@ rustPlatform.buildRustPackage rec {
install -Dm444 desktop/bottom.desktop -t $out/share/applications
'';

preCheck = ''
HOME=$(mktemp -d)
'';

doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/btm";

BTM_GENERATE = true;

passthru.tests.version = testers.testVersion {
package = bottom;
passthru = {
updateScript = nix-update-script { };
};

meta = with lib; {
meta = {
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
description = "Cross-platform graphical process/system monitor with a customizable interface";
homepage = "https://github.com/ClementTsang/bottom";
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [
license = lib.licenses.mit;
mainProgram = "btm";
maintainers = with lib.maintainers; [
berbiche
figsoda
gepbird
];
mainProgram = "btm";
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18810,8 +18810,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreServices;
};

bottom = darwin.apple_sdk_11_0.callPackage ../tools/system/bottom { };

cagebreak = callPackage ../applications/window-managers/cagebreak {
wlroots = wlroots_0_17;
};
Expand Down
Loading