2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchgit
|
|
|
|
, autoreconfHook
|
|
|
|
, glib
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, exiv2
|
2021-03-09 03:18:52 +00:00
|
|
|
, imagemagick6
|
2020-04-24 23:36:52 +00:00
|
|
|
, version
|
|
|
|
, sha256
|
|
|
|
, rev }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit version;
|
|
|
|
pname = "cataract";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.bzatek.net/cataract";
|
|
|
|
inherit sha256 rev;
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ glib libxml2 exiv2 imagemagick6 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i 's|#include <exiv2/exif.hpp>|#include <exiv2/exiv2.hpp>|' src/jpeg-utils.cpp
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
# Add workaround for -fno-common toolchains like upstream gcc-10 to
|
|
|
|
# avoid build failures like:
|
|
|
|
# ld: stats.o:/build/cataract-675e647/src/stats.h:24: multiple definition of
|
|
|
|
# `stats_images'; cgg.o:/build/cataract-675e647/src/stats.h:24: first defined here
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir $out/{bin,share} -p
|
|
|
|
cp src/cgg{,-dirgen} $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://cgg.bzatek.net/";
|
|
|
|
description = "A simple static web photo gallery, designed to be clean and easily usable";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.matthiasbeyer ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|