hydra-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU SASL recipe


From: Simon Josefsson
Subject: GNU SASL recipe
Date: Sun, 25 Apr 2010 16:53:07 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

I want to create a gsasl recipe, see below (based on gnutls's recipe),
how do I most easily test it on a normal Debian machine?

/Simon

{ nixpkgs ? ../../nixpkgs }:

let
  meta = {
    description = "GNU Simple Authentication and Security Layer (SASL) Library";

    longDescription = ''
       GNU SASL is an implementation of the Simple Authentication and
       Security Layer framework and a few common SASL mechanisms.
    '';

    homepage = http://www.gnu.org/software/gsasl/;
    license = "LGPLv2.1+";

    # Where notification emails go.
    maintainers = [ "address@hidden" "address@hidden" ];
  };

  pkgs = import nixpkgs {};

  inherit (pkgs) releaseTools;

  buildInputsFrom = pkgs: with pkgs;
    [ gettext pkgconfig perl ]
    ++ stdenv.lib.optional stdenv.isLinux valgrind;

  jobs = rec {

    tarball =
      { gsaslSrc ? { outPath = /data/src/gsasl; }
      , libgcrypt ? pkgs.libgcrypt
      }:

      releaseTools.sourceTarball {
        name = "gsasl-tarball";
        src = gsaslSrc;

        patchPhase =
          # Remove occurrences of /usr/bin/perl.
          '' for i in                           \
                doc/gdoc                        \
                doc/doxygen/Doxyfile.orig       \
                doc/doxygen/Doxyfile.in
             do
               echo "patching \`/usr/bin/perl' in \`$i'..."
               sed -i "$i" -e's|/usr/bin/perl|${pkgs.perl}/bin/perl|g'
             done
          '';

        doCheck = false;

        autoconfPhase = "make";
        configureFlags = "--enable-gtk-doc";
        buildInputs = (buildInputsFrom pkgs)
          ++ [ libgcrypt ]
          ++ (with pkgs;
              [ autoconf automake111x git
                texinfo help2man
                cvs # for `autopoint'
                gnome.gtkdoc docbook_xsl
                libxml2 # for its setup-hook
                texinfo texLive
              ]);

        inherit meta;
      };

    build =
      { tarball ? jobs.tarball {}
      , system ? "x86_64-linux"
      , libgcrypt ? pkgs.libgcrypt
      }:

      let pkgs = import nixpkgs { inherit system; };
      in
        pkgs.releaseTools.nixBuild {
          name = "gsasl";
          src = tarball;
          configureFlags = "";
          buildInputs = (buildInputsFrom pkgs) ++ [ libgcrypt ];
          inherit meta;
        };

    coverage =
      { tarball ? jobs.tarball {}
      , libgcrypt ? pkgs.libgcrypt
      }:

      releaseTools.coverageAnalysis {
        name = "gsasl-coverage";
        src = tarball;
        configureFlags = "";
        buildInputs = (buildInputsFrom pkgs) ++ [ libtasn1 libgcrypt ];
        # No `meta' so that mail notifications are not sent.
      };

    manual =
      { tarball ? jobs.tarball {}
      , libgcrypt ? pkgs.libgcrypt
      }:

      releaseTools.nixBuild {
        name = "gsasl-manual";
        src = tarball;
        configureFlags = "";
        buildInputs = (buildInputsFrom pkgs)
          ++ [ libgcrypt ]
          ++ [ pkgs.texinfo pkgs.texLive ];

        buildPhase = "make -C doc html pdf";
        doCheck = false;
        installPhase =
          '' make -C doc install-html install-pdf

             ensureDir "$out/nix-support"
             echo "doc manual $out/share/doc/gsasl/gsasl.html" >> 
"$out/nix-support/hydra-build-products"
             echo "doc-pdf manual $out/share/doc/gsasl/gsasl.pdf" >> 
"$out/nix-support/hydra-build-products"
          '';
        inherit meta;
      };
  };

in jobs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]