<commit_before>{ stdenv, fetchgit, cmake, zlib, boost }:

stdenv.mkDerivation rec {
  name = "avy-${version}";
  version = "2017.10.16";

  src = fetchgit {
    url    = "https://bitbucket.org/arieg/extavy";
    rev    = "c75c83379c38d6ea1046d0caee95aef77283ffe3";
    sha256 = "0zcycnypg4q5g710bnkjpycaawmibc092vmyhgfbixkgq9fb5lfh";
    fetchSubmodules = true;
  };

  buildInputs = [ cmake zlib boost.out boost.dev ];
  NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ]
    # Squelch endless stream of warnings on same few things
    ++ stdenv.lib.optionals stdenv.cc.isClang [
      "-Wno-empty-body"
      "-Wno-tautological-compare"
      "-Wc++11-compat-deprecated-writable-strings"
      "-Wno-deprecated"
    ];

  prePatch = ''
    sed -i -e '1i#include <stdint.h>' abc/src/bdd/dsd/dsd.h
    substituteInPlace abc/src/bdd/dsd/dsd.h --replace \
               '((Child = Dsd_NodeReadDec(Node,Index))>=0);' \
               '((intptr_t)(Child = Dsd_NodeReadDec(Node,Index))>=0);'

    patch -p1 -d minisat -i ${./minisat-fenv.patch}
    patch -p1 -d glucose -i ${./glucose-fenv.patch}
  '';

  patches =
    [ ./0001-no-static-boost-libs.patch
    ];

  installPhase = ''
    mkdir -p $out/bin
    cp avy/src/{avy,avybmc} $out/bin/
  '';

  meta = {
    description = "AIGER model checking for Property Directed Reachability";
    homepage    = https://arieg.bitbucket.io/avy/;
    license     = stdenv.lib.licenses.mit;
    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
    platforms   = stdenv.lib.platforms.linux;
  };
}<commit_msg>avy: Disable build on aarch64-linux<commit_after>{ stdenv, fetchgit, cmake, zlib, boost }:

stdenv.mkDerivation rec {
  name = "avy-${version}";
  version = "2017.10.16";

  src = fetchgit {
    url    = "https://bitbucket.org/arieg/extavy";
    rev    = "c75c83379c38d6ea1046d0caee95aef77283ffe3";
    sha256 = "0zcycnypg4q5g710bnkjpycaawmibc092vmyhgfbixkgq9fb5lfh";
    fetchSubmodules = true;
  };

  buildInputs = [ cmake zlib boost.out boost.dev ];
  NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ]
    # Squelch endless stream of warnings on same few things
    ++ stdenv.lib.optionals stdenv.cc.isClang [
      "-Wno-empty-body"
      "-Wno-tautological-compare"
      "-Wc++11-compat-deprecated-writable-strings"
      "-Wno-deprecated"
    ];

  prePatch = ''
    sed -i -e '1i#include <stdint.h>' abc/src/bdd/dsd/dsd.h
    substituteInPlace abc/src/bdd/dsd/dsd.h --replace \
               '((Child = Dsd_NodeReadDec(Node,Index))>=0);' \
               '((intptr_t)(Child = Dsd_NodeReadDec(Node,Index))>=0);'

    patch -p1 -d minisat -i ${./minisat-fenv.patch}
    patch -p1 -d glucose -i ${./glucose-fenv.patch}
  '';

  patches =
    [ ./0001-no-static-boost-libs.patch
    ];

  installPhase = ''
    mkdir -p $out/bin
    cp avy/src/{avy,avybmc} $out/bin/
  '';

  meta = {
    description = "AIGER model checking for Property Directed Reachability";
    homepage    = https://arieg.bitbucket.io/avy/;
    license     = stdenv.lib.licenses.mit;
    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
    platforms   = stdenv.lib.platforms.linux;
    # See pkgs/applications/science/logic/glucose/default.nix
    # (The error is different due to glucose-fenv.patch, but the same)
    badPlatforms = [ "aarch64-linux" ];
  };
}
{'fraction_non_alphanumeric': 0.14931714719271624, 'fraction_numerical': 0.03520485584218513, 'mean_word_length': 2.779816513761468, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4035102', 'n_tokens_mistral': 1361, 'n_tokens_neox': 1280, 'n_words': 214}