aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/graphics/qosmic/default.nix
blob: 96823441b6e1644965a4688243d13f70dd7a3e2b (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ mkDerivation
, fetchFromGitHub
, fetchpatch
, qmake
, wrapQtAppsHook
, qtbase
, pkg-config
, lua
, flam3
, libxml2
, libpng
, libjpeg
, lib
}:

mkDerivation rec {
  pname = "qosmic";
  version = "1.6.0";

  src = fetchFromGitHub {
    owner = "bitsed";
    repo = "qosmic";
    rev = "v${version}";
    sha256 = "13nw1mkdib14430r21mj352v62vi546vf184vyhxm7yjjygyra1w";
  };

  patches = [
    # Allow overriding PREFIX (to install to $out,
    # written while creating this derivation)
    # https://github.com/bitsed/qosmic/pull/39
    (fetchpatch {
      name = "allow-overriding-PREFIX.patch";
      url = "https://github.com/bitsed/qosmic/commit/77fb3a577b0710efae2a1d9ed97c26ae16f3a5ba.patch";
      sha256 = "0v9hj9s78cb6bg8ca0wjkbr3c7ml1n51n8h4a70zpzzgzz7rli5b";
    })
    # Fix QButtonGroup include errors with Qt 5.11:
    # Will be part of the next post-1.6.0 release
    (fetchpatch {
      name = "fix-class-QButtonGroup-include-errors-with-Qt-5.11.patch";
      url = "https://github.com/bitsed/qosmic/commit/3f6e1ea8d384a124dbc2d568171a4da798480752.patch";
      sha256 = "0bp6b759plkqs32nvfpkfvf3qqzc9716k3ycwnjvwabbvpg1xwbl";
    })
  ];

  nativeBuildInputs = [ qmake wrapQtAppsHook pkg-config ];

  buildInputs = [
    qtbase
    lua
    flam3
    libxml2
    libpng
    libjpeg
  ];

  qmakeFlags = [
    # Use pkg-config to correctly locate library paths
    "-config" "link_pkgconfig"
  ];

  meta = with lib; {
    description = "A cosmic recursive flame fractal editor";
    homepage = "https://github.com/bitsed/qosmic";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.raboof ];
    # It might be possible to make it work on OSX,
    # but this has not been tested.
    platforms = platforms.linux;
  };
}