Files
nixpkgs/pkgs/by-name/cf/cfdg/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
libpng,
bison,
flex,
ffmpeg,
icu,
}:
stdenv.mkDerivation rec {
pname = "cfdg";
version = "3.4.2";
src = fetchFromGitHub {
owner = "MtnViewJohn";
repo = "context-free";
rev = "Version${version}";
sha256 = "sha256-PtkvhX5PIeN/5UDpAaVwBwfp8ykjsjfH+8iGdbNQOfI=";
};
nativeBuildInputs = [
bison
flex
];
buildInputs = [
libpng
ffmpeg
icu
];
postPatch = ''
sed -e "/YY_NO_UNISTD/a#include <stdio.h>" -i src-common/cfdg.l
sed -e '1i#include <algorithm>' -i src-common/{cfdg,builder,ast}.cpp
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp cfdg $out/bin/
mkdir -p $out/share/doc/${pname}-${version}
cp *.txt $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
description = "Context-free design grammar - a tool for graphics generation";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
homepage = "https://contextfreeart.org/";
license = licenses.gpl2Only;
mainProgram = "cfdg";
};
}