summary refs log tree commit diff
path: root/pkgs/tools/misc/mktorrent/default.nix
blob: c62bd45fef8dc5e8c32c94e86d6ed33b1f518107 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{stdenv, fetchurl, openssl}:

stdenv.mkDerivation {
  name = "mktorrent-1.0";

  src = fetchurl {
    url = mirror://sourceforge/mktorrent/mktorrent-1.0.tar.gz;
    sha256 = "17qi3nfky240pq6qcmf5qg324mxm83vk9r3nvsdhsvinyqm5d3kg";
  };

  makeFlags = "USE_PTHREADS=1 USE_OPENSSL=1 USE_LONG_OPTIONS=1"
    + stdenv.lib.optionalString stdenv.isi686 " USE_LARGE_FILES=1"
    + stdenv.lib.optionalString stdenv.isLinux "CFLAGS=-lgcc_s";

  preInstall = ''
    installFlags=PREFIX=$out
  '';

  buildInputs = [ openssl ];

  meta = {
    homepage = http://mktorrent.sourceforge.net/;
    license = stdenv.lib.licenses.gpl2Plus;
    description = "Command line utility to create BitTorrent metainfo files";
    platforms = with stdenv.lib.platforms; unix;
    maintainers = with stdenv.lib.maintainers; [viric];
  };
}