fix(durdraw): withGifExport

This commit is contained in:
2025-07-22 14:36:48 -06:00
parent c29d6d5b3c
commit 7ce5863058

View File

@@ -6,17 +6,20 @@
, ansilove , ansilove
}: }:
let # We use `fix` explicitly since `buildPythonApplication` rejects the typical
version = "0.29.0"; # stdenv.mkDerivation (finalAttrs: {
in python3Packages.buildPythonApplication { # ...
# })
# syntax.
python3Packages.buildPythonApplication (lib.fix (finalAttrs: {
pname = "durdraw"; pname = "durdraw";
inherit version; version = "0.29.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cmang"; owner = "cmang";
repo = "durdraw"; repo = "durdraw";
rev = version; rev = finalAttrs.version;
hash = "sha256-a+4DGWBD5XLaNAfTN/fmI/gALe76SCoWrnjyglNhVPY="; hash = "sha256-a+4DGWBD5XLaNAfTN/fmI/gALe76SCoWrnjyglNhVPY=";
}; };
@@ -24,7 +27,12 @@ in python3Packages.buildPythonApplication {
python3Packages.setuptools python3Packages.setuptools
]; ];
dependencies = []; dependencies =
lib.optionals withGifExport finalAttrs.optional-dependencies.gif-export;
optional-dependencies.gif-export = [
python3Packages.pillow
];
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper makeWrapper
@@ -37,7 +45,7 @@ in python3Packages.buildPythonApplication {
meta = { meta = {
changelog = changelog =
"https://github.com/cmang/durdraw/releases/tag/${version}"; "https://github.com/cmang/durdraw/releases/tag/${finalAttrs.version}";
description = '' description = ''
Versatile ASCII and ANSI Art text editor for drawing in the Versatile ASCII and ANSI Art text editor for drawing in the
Linux/Unix/macOS terminal, with animation, 256 and 16 colors, Unicode and Linux/Unix/macOS terminal, with animation, 256 and 16 colors, Unicode and
@@ -46,4 +54,4 @@ in python3Packages.buildPythonApplication {
homepage = "https://github.com/cmang/durdraw/"; homepage = "https://github.com/cmang/durdraw/";
license = lib.licenses.bsd3; license = lib.licenses.bsd3;
}; };
} }))