t-rec: move to by-name, moderinize (#399645)

This commit is contained in:
Aleksana
2025-04-19 21:12:13 +08:00
committed by GitHub
2 changed files with 23 additions and 24 deletions
@@ -1,55 +1,58 @@
{
lib,
stdenv,
imagemagick,
ffmpeg,
rustPlatform,
fetchFromGitHub,
makeWrapper,
imagemagick,
libiconv,
Foundation,
ffmpeg,
versionCheckHook,
nix-update-script,
}:
let
binPath = lib.makeBinPath [
imagemagick
ffmpeg
];
in
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "t-rec";
version = "0.7.9";
src = fetchFromGitHub {
owner = "sassman";
repo = "t-rec-rs";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-aQX+JJ2MwzzxJkA1vsE8JqvYpWtqyycvycPc2pyFU7g=";
};
cargoHash = "sha256-AgSYM2a9XGH2X4dcp5CSMnt0Bq/5XT8C3g1R2UX4mLY=";
nativeBuildInputs = [ makeWrapper ];
buildInputs =
[ imagemagick ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
Foundation
];
postInstall = ''
wrapProgram "$out/bin/t-rec" --prefix PATH : "${binPath}"
wrapProgram "$out/bin/t-rec" --prefix PATH : "${
lib.makeBinPath [
imagemagick
ffmpeg
]
}"
'';
useFetchCargoVendor = true;
cargoHash = "sha256-AgSYM2a9XGH2X4dcp5CSMnt0Bq/5XT8C3g1R2UX4mLY=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
meta = with lib; {
passthru.updateScript = nix-update-script { };
meta = {
description = "Blazingly fast terminal recorder that generates animated gif images for the web written in rust";
homepage = "https://github.com/sassman/t-rec-rs";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [
changelog = "https://github.com/sassman/t-rec-rs/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [ gpl3Only ];
maintainers = with lib.maintainers; [
hoverbear
matthiasbeyer
];
mainProgram = "t-rec";
};
}
})
-4
View File
@@ -16374,10 +16374,6 @@ with pkgs;
tests-stdenv-gcc-stageCompare = callPackage ../test/stdenv/gcc-stageCompare.nix { };
t-rec = callPackage ../misc/t-rec {
inherit (darwin.apple_sdk.frameworks) Foundation;
};
twinkle = qt5.callPackage ../applications/networking/instant-messengers/twinkle { };
terminal-typeracer = callPackage ../applications/misc/terminal-typeracer {