2020-04-07 21:32:16 +01:00
|
|
|
{ mkDerivation, lib, fetchgit, qtbase, qmake, qtscript, flex, bison, qtdeclarative }:
|
2015-12-16 20:39:26 +00:00
|
|
|
|
|
|
|
|
2017-10-24 11:29:17 +01:00
|
|
|
let
|
|
|
|
version = "5.1";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/kmkolasinski/AwesomeBump.git";
|
|
|
|
rev = "Winx32v${version}";
|
|
|
|
sha256 = "1c8b9jki0v8kzkvsvyv7q1w3s7j40br6ph15hh2xi0a1mpwckq56";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2020-04-07 21:32:16 +01:00
|
|
|
qtnproperty = mkDerivation {
|
2017-10-24 11:29:17 +01:00
|
|
|
name = "qtnproperty";
|
|
|
|
inherit src;
|
|
|
|
sourceRoot = "AwesomeBump/Sources/utils/QtnProperty";
|
2017-12-07 08:51:18 +00:00
|
|
|
patches = [ ./qtnproperty-parallel-building.patch ];
|
2017-10-24 11:29:17 +01:00
|
|
|
buildInputs = [ qtscript qtbase qtdeclarative ];
|
|
|
|
nativeBuildInputs = [ qmake flex bison ];
|
|
|
|
postInstall = ''
|
|
|
|
install -D bin-linux/QtnPEG $out/bin/QtnPEG
|
|
|
|
'';
|
2015-12-16 20:39:26 +00:00
|
|
|
};
|
2020-04-07 21:32:16 +01:00
|
|
|
in mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "awesomebump";
|
|
|
|
inherit version;
|
2015-12-16 20:39:26 +00:00
|
|
|
|
2017-10-24 11:29:17 +01:00
|
|
|
inherit src;
|
|
|
|
|
|
|
|
buildInputs = [ qtbase qtscript qtdeclarative ];
|
2017-10-23 16:41:45 +01:00
|
|
|
|
2020-04-07 21:32:16 +01:00
|
|
|
nativeBuildInputs = [ qmake ];
|
2017-10-23 16:41:45 +01:00
|
|
|
|
2017-10-24 11:29:17 +01:00
|
|
|
preBuild = ''
|
|
|
|
ln -sf ${qtnproperty}/bin/QtnPEG Sources/utils/QtnProperty/bin-linux/QtnPEG
|
2017-10-23 16:41:45 +01:00
|
|
|
'';
|
2015-12-16 20:39:26 +00:00
|
|
|
|
2020-04-07 21:32:16 +01:00
|
|
|
dontWrapQtApps = true;
|
2017-10-24 11:29:17 +01:00
|
|
|
postInstall = ''
|
|
|
|
d=$out/libexec/AwesomeBump
|
2015-12-16 20:39:26 +00:00
|
|
|
|
2017-10-24 11:29:17 +01:00
|
|
|
mkdir -p $d
|
|
|
|
cp -vr workdir/`cat workdir/current`/bin/AwesomeBump $d/
|
|
|
|
cp -prd Bin/Configs Bin/Core $d/
|
2015-12-16 20:39:26 +00:00
|
|
|
|
2017-10-24 11:29:17 +01:00
|
|
|
# AwesomeBump expects to find Core and Configs in its current directory.
|
2020-04-07 21:32:16 +01:00
|
|
|
makeQtWrapper $d/AwesomeBump $out/bin/AwesomeBump \
|
2022-03-14 18:06:00 +00:00
|
|
|
--chdir "$d"
|
2017-09-14 13:42:38 +01:00
|
|
|
'';
|
|
|
|
|
2017-12-08 12:35:22 +00:00
|
|
|
# $ cd Sources; qmake; make ../workdir/linux-g++-dgb-gl4/obj/glwidget.o
|
|
|
|
# fatal error: properties/ImageProperties.peg.h: No such file or directory
|
|
|
|
enableParallelBuilding = false;
|
2017-12-07 08:51:18 +00:00
|
|
|
|
2015-12-16 20:39:26 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/kmkolasinski/AwesomeBump";
|
2015-12-16 20:39:26 +00:00
|
|
|
description = "A program to generate normal, height, specular or ambient occlusion textures from a single image";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|