about summary refs log tree commit diff
path: root/pkgs/tools/misc/dumptorrent/default.nix
blob: c80a696f8cba192f2ff09164e79023a6428b5d57 (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
29
30
{ lib, stdenv, fetchurl }:

stdenv.mkDerivation rec {
    pname = "dumptorrent";
    version = "1.2";

    src = fetchurl {
      url = "mirror://sourceforge/dumptorrent/dumptorrent-${version}.tar.gz";
      sha256 = "073h03bmpfdy15qh37lvppayld2747i4acpyk0pm5nf2raiak0zm";
    };

    postPatch = ''
      substituteInPlace Makefile \
        --replace "gcc" "$CC"
    '';

    installPhase = ''
      mkdir -p $out/bin
      cp ./dumptorrent $out/bin
    '';

    meta = with lib; {
      description = "Dump .torrent file information";
      homepage = "https://sourceforge.net/projects/dumptorrent/";
      license = licenses.gpl2Only;
      maintainers = [ maintainers.zohl ];
      platforms = platforms.all;
      mainProgram = "dumptorrent";
    };
}