mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
mcat: init at 0.2.8 (#402539)
This commit is contained in:
commit
7c134e5d06
2 changed files with 58 additions and 0 deletions
34
pkgs/by-name/mc/mcat-unwrapped/package.nix
Normal file
34
pkgs/by-name/mc/mcat-unwrapped/package.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "mcat-unwrapped";
|
||||
version = "0.2.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Skardyy";
|
||||
repo = "mcat";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-XvZBikp+Q/pe80eOTQj2rKZ14kXEUBjIroWsh8xmr8A=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-DIvKCPyqD82IgOqs7+fsAz3sj5IkXacxfZOttSEQ1aA=";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "cat command for documents / images / videos and more!";
|
||||
homepage = "https://github.com/Skardyy/mcat";
|
||||
changelog = "https://github.com/Skardyy/mcat/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "mcat";
|
||||
maintainers = with lib.maintainers; [
|
||||
louis-thevenet
|
||||
];
|
||||
};
|
||||
})
|
24
pkgs/by-name/mc/mcat/package.nix
Normal file
24
pkgs/by-name/mc/mcat/package.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
runCommand,
|
||||
mcat-unwrapped,
|
||||
makeWrapper,
|
||||
lib,
|
||||
chromium,
|
||||
ffmpeg-headless,
|
||||
useChromium ? false,
|
||||
useFfmpeg ? false,
|
||||
}:
|
||||
|
||||
runCommand "mcat"
|
||||
{
|
||||
pname = "mcat";
|
||||
inherit (mcat-unwrapped) version meta;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${lib.getExe mcat-unwrapped} $out/bin/mcat --prefix PATH : ${
|
||||
lib.makeBinPath ((lib.optional useChromium chromium) ++ (lib.optional useFfmpeg ffmpeg-headless))
|
||||
}
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue