--- /dev/null
+{ pkgs ? import <nixpkgs> {} }:
+
+pkgs.stdenv.mkDerivation rec {
+ pname = "libzakformcgi";
+ version = "0.0.1";
+
+ src = pkgs.fetchgit {
+ url = "https://saetta.ns0.it/git/zakform/cgi";
+ sha256 = "crqvOxduBUduI7ZVSOFZSGqd3ok4oMI/dvq1cV+JN4Y=";
+ rev = "e1bd04669361dfafa25e06b82cb0e17ae698e17d";
+ };
+
+ libzakform = pkgs.callPackage ./libzakform.nix {};
+
+ nativeBuildInputs = [ pkgs.gnome.gnome-common pkgs.autoconf pkgs.automake pkgs.glib pkgs.intltool pkgs.libtool pkgs.gtk-doc pkgs.gobject-introspection ];
+
+ buildInputs = [ pkgs.pkg-config pkgs.libxml2 (pkgs.callPackage ./libzakutils.nix {}) libzakform (pkgs.callPackage ./libzakformini.nix {}) (pkgs.callPackage ./libzakcgi.nix {}) ];
+
+ PKG_CONFIG_LIBZAKFORM_MODULESDIR="${libzakform}/lib/libzakform/modules";
+
+ preConfigure=
+ ''
+ chmod +w ${libzakform}/lib/libzakform/modules
+ sed -i -e 's/bin\/bash/bin\/sh/g' ./autogen.sh
+ ./autogen.sh
+ '';
+
+ postInstall=
+ ''
+ chmod -w ${libzakform}/lib/libzakform/modules
+ '';
+}