<commit_before>{ stdenv, fetchurl, flex, udev, perl }:

assert stdenv.isLinux;

stdenv.mkDerivation rec {
  name = "drbd-8.4.4";

  src = fetchurl {
    url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
    sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0";
  };

  patches = [ ./pass-force.patch ];

  buildInputs = [ flex perl ];

  configureFlags = "--without-distro --without-pacemaker --localstatedir=/var --sysconfdir=/etc";

  preConfigure =
    ''
      export PATH=${udev}/sbin:$PATH
      substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
      substituteInPlace user/legacy/Makefile.in \
        --replace /sbin/ $out/sbin/ \
        --replace '$(DESTDIR)/lib/drbd' $out/lib/drbd
      substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
      substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm
    '';

  makeFlags = "SHELL=${stdenv.shell}";

  installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d";

  meta = {
    homepage = http://www.drbd.org/;
    description = "Distributed Replicated Block Device, a distributed storage system for Linux";
    platforms = stdenv.lib.platforms.linux;
  };
}
<commit_msg>drbd: set DESTDIR<commit_after>{ stdenv, fetchurl, flex, udev, perl }:

assert stdenv.isLinux;

stdenv.mkDerivation rec {
  name = "drbd-8.4.4";

  src = fetchurl {
    url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
    sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0";
  };

  patches = [ ./pass-force.patch ];

  buildInputs = [ flex perl ];

  configureFlags = "--without-distro --without-pacemaker --localstatedir=/var --sysconfdir=/etc";

  preConfigure =
    ''
      export PATH=${udev}/sbin:$PATH
      substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
      substituteInPlace user/legacy/Makefile.in \
        --replace /sbin/ $out/sbin/ \
        --replace '$(DESTDIR)/lib/drbd' $out/lib/drbd
      substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
      substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm
    '';

  makeFlags = "SHELL=${stdenv.shell}";

  installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d DESTDIR=$(out)";

  meta = {
    homepage = http://www.drbd.org/;
    description = "Distributed Replicated Block Device, a distributed storage system for Linux";
    platforms = stdenv.lib.platforms.linux;
  };
}

{'fraction_non_alphanumeric': 0.15663611000398564, 'fraction_numerical': 0.022319649262654444, 'mean_word_length': 3.183333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '236874', 'n_tokens_mistral': 989, 'n_tokens_neox': 946, 'n_words': 155}