<commit_before>x@{builderDefsPackage
  , ...}:
builderDefsPackage
(a :
let
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
    [];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    baseName="gsm";
    version="1.0.13";
    name="${baseName}-${version}";
    url="http://www.quut.com/gsm/${name}.tar.gz";
    hash="1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["createDirs" "setVars" "doMakeInstall"];

  createDirs = a.fullDepEntry ''
    mkdir -p "$out/"{bin,lib,share/man,share/info,include/gsm}
  '' ["minInit" "defEnsureDir"];

  setVars = a.noDepEntry ''
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
  '';

  makeFlags = [
    ''INSTALL_ROOT="$out"''
    ''GSM_INSTALL_INC="$out/include/gsm"''
  ];

  meta = {
    description = "A GSM codec library";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      linux;
    license = a.lib.licenses.free;
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://www.quut.com/gsm/";
    };
  };
}) x<commit_msg>gsm: refactor<commit_after>{ stdenv, fetchurl }:

with stdenv.lib;
stdenv.mkDerivation rec {
  name = "gsm-${version}";
  version = "1.0.13";

  src = fetchurl {
    url = "http://www.quut.com/gsm/${name}.tar.gz";
    sha256 = "1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
  };

  preConfigure = ''
    sed -e 's,$(GSM_INSTALL_ROOT)/inc,$(GSM_INSTALL_ROOT)/includes,' -i Makefile
    mkdir -p "$out/"{bin,lib,man/man1,man/man3,include}
    makeFlags="$makeFlags INSTALL_ROOT=$out"
  '';

  parallelBuild = false;

  meta = {
    description = "Lossy speech compression codec";
    homepage    = http://www.quut.com/gsm/;
    license     = licenses.bsd2;
    maintainers = with maintainers; [ codyop<NAME> ];
    platforms   = platforms.all;
  };
}
{'fraction_non_alphanumeric': 0.1609733270940571, 'fraction_numerical': 0.02667290594291062, 'mean_word_length': 3.2931726907630523, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5617610', 'n_tokens_mistral': 871, 'n_tokens_neox': 837, 'n_words': 132}