Unverified Commit 4faea1c2 authored by annalee's avatar annalee
Browse files

augeas: 1.12.0 -> 1.14.1; fix darwin build

use github source, enable tests, split output
parent fa094c6d
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
diff --git a/bootstrap b/bootstrap
index a84eb39..cac656d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -53,9 +53,6 @@ case ${GNULIB_SRCDIR--} in
     echo "$0: getting gnulib files..."
     git submodule update || exit $?
     GNULIB_SRCDIR=.gnulib
-  else
-    echo >&2 "$0: invalid gnulib srcdir: $GNULIB_SRCDIR"
-    exit 1
   fi
   ;;
 esac
+49 −7
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, pkg-config, readline, libxml2 }:
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, bison
, flex
, perl # for pod2man
, pkg-config
, readline
, libxml2
}:

stdenv.mkDerivation rec {
  pname = "augeas";
  version = "1.12.0";
  version = "1.14.1";

  src = fetchurl {
    url = "http://download.augeas.net/${pname}-${version}.tar.gz";
    sha256 = "11ybhb13wkkilsn7b416a1dn61m1xrq0lbdpkhp5w61jrk4l469j";
  src = fetchFromGitHub {
    owner = "hercules-team";
    repo = "augeas";
    rev = "release-${version}";
    fetchSubmodules = true;
    hash = "sha256-U5tm3LDUeI/idHtL2Zy33BigkyvHunXPjToDC59G9VE=";
  };
  nativeBuildInputs = [ pkg-config ];

  patches = [
    # already have the submodules so don't fail when .git doesn't exist.
    ./bootstrap.diff
  ];

  postPatch = ''
    ./bootstrap --gnulib-srcdir=.gnulib
  '';

  nativeBuildInputs = [
    autoreconfHook
    bison
    flex
    perl
    pkg-config
  ];

  buildInputs = [ readline libxml2 ];

  enableParallelBuilding = true;

  doCheck = true;

  checkPhase = ''
    runHook preCheck
    patchShebangs --build gnulib/tests tests
    make -j $NIX_BUILD_CORES check
    runHook postCheck
  '';

  outputs = [ "out" "dev" ];

  meta = with lib; {
    description = "Configuration editing tool";
    license = licenses.lgpl21Only;
    homepage = "https://augeas.net/";
    changelog = "https://augeas.net/news.html";
    changelog = "https://github.com/hercules-team/augeas/releases/tag/release-${version}";
    mainProgram = "augtool";
    maintainers = with maintainers; [ offline ];
    platforms = platforms.unix;
  };