about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2020-01-27 00:19:00 +0100
committerMichael Raskin <7c6f434c@mail.ru>2020-01-27 00:19:52 +0100
commit4eba7020b9ec9e5abb249dbf3430beedbf1155cd (patch)
tree4be5af1227311277ddfc80dab8965d73b064fbc7 /pkgs/tools
parenta7ffeaae61806dbff5f54633b9cc810dbf2ef923 (diff)
downloadnixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar.gz
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar.bz2
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar.lz
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar.xz
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.tar.zst
nixlib-4eba7020b9ec9e5abb249dbf3430beedbf1155cd.zip
cfdg: 3.0.9 -> 3.2_2, fix build
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/graphics/cfdg/default.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/tools/graphics/cfdg/default.nix b/pkgs/tools/graphics/cfdg/default.nix
index 2c96e872f4e6..1fd4d3324a0b 100644
--- a/pkgs/tools/graphics/cfdg/default.nix
+++ b/pkgs/tools/graphics/cfdg/default.nix
@@ -1,17 +1,20 @@
-{ stdenv, fetchurl, libpng, bison, flex, ffmpeg }:
+{ stdenv, fetchFromGitHub, libpng, bison, flex, ffmpeg, icu }:
 
 stdenv.mkDerivation rec {
   pname = "cfdg";
-  version = "3.0.9";
-  src = fetchurl {
-    sha256 = "1jqpinz6ri4a2l04mf2z1ljalkdk1m07hj47lqkh8gbf2slfs0jl";
-    url = "http://www.contextfreeart.org/download/ContextFreeSource${version}.tgz";
+  version = "3.2_2";
+  src = fetchFromGitHub {
+    owner = "MtnViewJohn";
+    repo = "context-free";
+    rev = "Version${version}";
+    sha256 = "14v1gya7h0p9dj16hw87wpmjfddmkz537w3kjvaribgxxp0gzyz5";
   };
 
-  buildInputs = [ libpng bison flex ffmpeg ];
+  buildInputs = [ libpng bison flex 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 = ''
@@ -26,8 +29,7 @@ stdenv.mkDerivation rec {
     description = "Context-free design grammar - a tool for graphics generation";
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
-    homepage = https://contextfreeart.org/;
+    homepage = "https://contextfreeart.org/";
     license = licenses.gpl2;
-    downloadPage = "https://contextfreeart.org/mediawiki/index.php/Download_page";
   };
 }