Merge pull request #204924 from StarGate01/lv_img_conv

This commit is contained in:
Sandro 2023-04-12 00:55:54 +02:00 committed by GitHub
commit b5b0ffda81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,66 @@
{ lib
, stdenv
, buildNpmPackage
, fetchFromGitHub
, pkg-config
, python3
, pixman
, libpng
, libjpeg
, librsvg
, giflib
, cairo
, pango
, nodePackages
, makeWrapper
, CoreText
, nix-update-script
}:
buildNpmPackage rec {
pname = "lv_img_conv";
version = "0.4.0";
src = fetchFromGitHub {
owner = "lvgl";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-LB7NZKwrpvps1cKzRoARHL4S48gBHadvxwA6JMmm/ME=";
};
npmDepsHash = "sha256-uDF22wlL3BlMQ/+Wmtgyjp4CVN6sDnjqjEPB4SeQuPk=";
nativeBuildInputs = [
pkg-config
python3
makeWrapper
];
buildInputs = [
pixman
libpng
libjpeg
librsvg
giflib
cairo
pango
] ++ lib.optionals stdenv.isDarwin [
CoreText
];
postInstall = ''
makeWrapper ${nodePackages.ts-node}/bin/ts-node $out/bin/lv_img_conv --add-flags $out/lib/node_modules/lv_img_conv/lib/cli.ts
'';
passthru.updateScript = nix-update-script {
attrPath = pname;
};
meta = with lib; {
changelog = "https://github.com/lvgl/lv_img_conv/releases/tag/v${version}";
description = "Image converter for LVGL";
homepage = "https://github.com/lvgl/lv_img_conv";
license = licenses.mit;
maintainers = with maintainers; [ stargate01 ];
};
}

View File

@ -9749,6 +9749,10 @@ with pkgs;
lv = callPackage ../tools/text/lv { };
lv_img_conv = callPackage ../development/tools/lv_img_conv {
inherit (darwin.apple_sdk.frameworks) CoreText;
};
lxc = callPackage ../os-specific/linux/lxc {
autoreconfHook = buildPackages.autoreconfHook269;
};