diff --git a/pkgs/tools/system/bottom/default.nix b/pkgs/by-name/bo/bottom/package.nix similarity index 65% rename from pkgs/tools/system/bottom/default.nix rename to pkgs/by-name/bo/bottom/package.nix index f042b7067f4ec..33b91c6db5d23 100644 --- a/pkgs/tools/system/bottom/default.nix +++ b/pkgs/by-name/bo/bottom/package.nix @@ -2,11 +2,12 @@ lib, rustPlatform, fetchFromGitHub, + autoAddDriverRunpath, installShellFiles, stdenv, - darwin, - bottom, - testers, + apple-sdk_11, + versionCheckHook, + nix-update-script, }: rustPlatform.buildRustPackage rec { @@ -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 \ @@ -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"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f60fc1d210258..6394576ab6db0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };