nixos/java: No bashisms in `environment.shellInit` script (#294121)
[NixPkgs.git] / pkgs / applications / graphics / xaos / default.nix
blobdd717223fdbb31fe04a81e9f899007e5d9e90754
1 { lib, stdenv, fetchFromGitHub, qmake, qtbase, qttools, wrapQtAppsHook, copyDesktopItems }:
3 let datapath = "$out/share/XaoS";
4 in stdenv.mkDerivation rec {
5   pname = "xaos";
6   version = "4.2.1";
7   outputs = [ "out" "man" ];
9   src = fetchFromGitHub {
10     owner = "xaos-project";
11     repo = pname;
12     rev = "release-${version}";
13     hash = "sha256-JLF8Mz/OHZEEJG/aryKQuJ6B5R8hPJdvln7mbKoqXFU=";
14   };
16   nativeBuildInputs = [ qmake qttools wrapQtAppsHook copyDesktopItems ];
17   buildInputs = [ qtbase ];
19   QMAKE_LRELEASE = "lrelease";
20   DEFINES = [ "USE_OPENGL" "USE_FLOAT128" ];
22   postPatch = ''
23     substituteInPlace src/include/config.h \
24       --replace "/usr/share/XaoS" "${datapath}"
25   '';
27   desktopItems = [ "xdg/xaos.desktop" ];
29   installPhase = ''
30     runHook preInstall
32     install -D bin/xaos "$out/bin/xaos"
34     mkdir -p "${datapath}"
35     cp -r tutorial examples catalogs "${datapath}"
37     install -D "xdg/${pname}.png" "$out/share/icons/${pname}.png"
39     install -D doc/xaos.6 "$man/man6/xaos.6"
40     runHook postInstall
41   '';
43   meta = src.meta // {
44     description = "Real-time interactive fractal zoomer";
45     mainProgram = "xaos";
46     homepage = "https://xaos-project.github.io/";
47     license = lib.licenses.gpl2Plus;
48     platforms = [ "x86_64-linux" ];
49     maintainers = with lib.maintainers; [ ehmry ];
50   };