lol
1{ lib
2, stdenv
3, fetchFromGitHub
4}:
5
6stdenv.mkDerivation rec {
7 pname = "cimg";
8 version = "3.1.6";
9
10 src = fetchFromGitHub {
11 owner = "dtschump";
12 repo = "CImg";
13 rev = "v.${version}";
14 hash = "sha256-NZwivsTYgirZXuS25buGHL3uk75shRGMH4c3YdS7Mgg=";
15 };
16
17 outputs = [ "out" "doc" ];
18
19 installPhase = ''
20 runHook preInstall
21
22 install -dm 755 $out/include/CImg/plugins $doc/share/doc/cimg/examples
23 install -m 644 CImg.h $out/include/
24 cp -dr --no-preserve=ownership plugins/* $out/include/CImg/plugins/
25 cp -dr --no-preserve=ownership examples/* $doc/share/doc/cimg/examples/
26 cp README.txt $doc/share/doc/cimg/
27
28 runHook postInstall
29 '';
30
31 meta = with lib; {
32 homepage = "http://cimg.eu/";
33 description = "A small, open source, C++ toolkit for image processing";
34 longDescription = ''
35 CImg stands for Cool Image. It is easy to use, efficient and is intended
36 to be a very pleasant toolbox to design image processing algorithms in
37 C++. Due to its generic conception, it can cover a wide range of image
38 processing applications.
39 '';
40 license = licenses.cecill-c;
41 maintainers = [ maintainers.AndersonTorres ];
42 platforms = platforms.unix;
43 };
44}