about summary refs log tree commit diff
path: root/pkgs/applications/graphics/comical/default.nix
blob: 208c0ea821cd1e9d45e894dcb8e699752ea725a3 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, stdenv
, fetchurl
, hexdump
, wxGTK32
, zlib
, Cocoa
}:

stdenv.mkDerivation rec {
  pname = "comical";
  version = "0.8";

  src = fetchurl {
    url = "mirror://sourceforge/comical/comical-${version}.tar.gz";
    hash = "sha256-C2UnzAayWpNwQfHrJI0P2IHPBVNiCXA2uTmBf3hauF4=";
  };

  patches = [
    ./wxgtk-3.2.patch
  ];

  nativeBuildInputs = [
    hexdump
  ];

  buildInputs = [
    wxGTK32
    zlib
  ] ++ lib.optionals stdenv.isDarwin [
    Cocoa
  ];

  makeFlags = [
    "prefix=${placeholder "out"}"
    "CC=${stdenv.cc.targetPrefix}cc"
    "CXX=${stdenv.cc.targetPrefix}c++"
  ];

  preInstall = ''
    mkdir -p $out/bin
  '';

  meta = {
    description = "Viewer of CBR and CBZ files, often used to store scanned comics";
    homepage = "https://comical.sourceforge.net/";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ viric wegank ];
    platforms = with lib.platforms; unix;
    mainProgram = "comical";
  };
}