<commit_before>with import <nixpkgs> { };

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

  version = "0.1";

  buildInputs = [ git rustUnstable.cargo rustUnstable.cargo.rustc ] ++ serverBuildInputs; # ++ appBuildInputs;

  #appBuildInputs = [ elmPackages.elm ];

  serverBuildInputs = [ openssl postgresql sqlite pkgconfig ];

  shellHook = ''
    APP=`pwd`/app
    SERVER=`pwd`/server

    function build {
      pushd $APP; elm-package install -y && elm-make --yes src/App.elm; popd
      pushd $SERVER; cargo build; popd
    }

    function test {
      pushd $SERVER; cargo test; popd
    }

    function ci {
      cargo install diesel_cli
      pushd server; $HOME/.cargo/bin/diesel migration run; popd
      build
      test
    }
<commit_msg>nix: set -e<commit_after>with import <nixpkgs> { };

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

  version = "0.1";

  buildInputs = [ git rustUnstable.cargo rustUnstable.cargo.rustc ] ++ serverBuildInputs; # ++ appBuildInputs;

  #appBuildInputs = [ elmPackages.elm ];

  serverBuildInputs = [ openssl postgresql sqlite pkgconfig ];

  shellHook = ''
    set -e

    APP=`pwd`/app
    SERVER=`pwd`/server

    function build {
      pushd $APP; elm-package install -y && elm-make --yes src/App.elm; popd
      pushd $SERVER; cargo build; popd
    }

    function test {
      pushd $SERVER; cargo test; popd
    }

    function ci {
      cargo install diesel_cli
      pushd server; $HOME/.cargo/bin/diesel migration run; popd
      build
      test
    }

{'fraction_non_alphanumeric': 0.11745406824146981, 'fraction_numerical': 0.0026246719160104987, 'mean_word_length': 2.6658653846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6556298', 'n_tokens_mistral': 546, 'n_tokens_neox': 519, 'n_words': 126}