2023-01-16 18:45:08 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, qmake, qtbase, qttools, wrapQtAppsHook, copyDesktopItems }:
|
2015-06-16 22:50:55 +00:00
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
let datapath = "$out/share/XaoS";
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "xaos";
|
2023-01-16 18:45:08 +00:00
|
|
|
version = "4.2.1";
|
|
|
|
outputs = [ "out" "man" ];
|
2009-02-08 14:17:05 +00:00
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xaos-project";
|
|
|
|
repo = pname;
|
|
|
|
rev = "release-${version}";
|
|
|
|
hash = "sha256-JLF8Mz/OHZEEJG/aryKQuJ6B5R8hPJdvln7mbKoqXFU=";
|
2009-02-08 14:17:05 +00:00
|
|
|
};
|
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools wrapQtAppsHook copyDesktopItems ];
|
|
|
|
buildInputs = [ qtbase ];
|
2016-08-26 15:19:37 +00:00
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
QMAKE_LRELEASE = "lrelease";
|
|
|
|
DEFINES = [ "USE_OPENGL" "USE_FLOAT128" ];
|
2009-02-08 14:17:05 +00:00
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/include/config.h \
|
|
|
|
--replace "/usr/share/XaoS" "${datapath}"
|
2015-06-16 22:50:55 +00:00
|
|
|
'';
|
2014-07-28 09:43:20 +00:00
|
|
|
|
2023-01-16 18:45:08 +00:00
|
|
|
desktopItems = [ "xdg/xaos.desktop" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D bin/xaos "$out/bin/xaos"
|
|
|
|
|
|
|
|
mkdir -p "${datapath}"
|
|
|
|
cp -r tutorial examples catalogs "${datapath}"
|
|
|
|
|
|
|
|
install -D "xdg/${pname}.png" "$out/share/icons/${pname}.png"
|
|
|
|
|
|
|
|
install -D doc/xaos.6 "$man/man6/xaos.6"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = src.meta // {
|
|
|
|
description = "Real-time interactive fractal zoomer";
|
|
|
|
homepage = "https://xaos-project.github.io/";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2016-08-06 13:59:14 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-01-16 18:45:08 +00:00
|
|
|
maintainers = with lib.maintainers; [ ehmry ];
|
2009-02-08 14:17:05 +00:00
|
|
|
};
|
|
|
|
}
|