From 34fda4cbe2936caa619e51454464bf32f5f76996 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:10:24 +0200 Subject: cfdg: reimplement using mkDerivation --- pkgs/tools/graphics/cfdg/default.nix | 48 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 27 deletions(-) (limited to 'pkgs/tools/graphics/cfdg/default.nix') diff --git a/pkgs/tools/graphics/cfdg/default.nix b/pkgs/tools/graphics/cfdg/default.nix index 9376ad6a709c..2b88ada21aa7 100644 --- a/pkgs/tools/graphics/cfdg/default.nix +++ b/pkgs/tools/graphics/cfdg/default.nix @@ -1,38 +1,32 @@ -a @ {libpng, bison, flex, ffmpeg, fullDepEntry, ...} : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - libpng bison flex ffmpeg - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl, libpng, bison, flex, ffmpeg }: - inherit (s) name; - inherit buildInputs; - configureFlags = []; +stdenv.mkDerivation rec { + name = "cfdg-${version}"; + version = "3.0.2"; + src = fetchurl { + sha256 = "1pd1hjippbhad8l4s4lsglykh22i24qfrgmnxrsx71bvcqbr356p"; + url = "http://www.contextfreeart.org/download/ContextFreeSource${version}.tgz"; + }; + + buildInputs = [ libpng bison flex ffmpeg ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doFixInc" "doMake" "copyFiles"]; - - doFixInc = a.fullDepEntry '' + postPatch = '' sed -e "/YY_NO_UNISTD/a#include " -i src-common/cfdg.l - '' ["doUnpack" "minInit"]; - - copyFiles = a.fullDepEntry '' + ''; + + installPhase = '' mkdir -p $out/bin cp cfdg $out/bin/ mkdir -p $out/share/doc/${name} cp *.txt $out/share/doc/${name} - '' ["defEnsureDir" "doMake"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Context-free design grammar - a tool for graphics generation"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + homepage = http://contextfreeart.org/; + downloadPage = "http://contextfreeart.org/mediawiki/index.php/Download_page"; }; } -- cgit 1.4.1