f6f0b7ac5d
then all the hacks are not necessary
56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
{ lib, stdenv, fetchgit, qtbase, qmake, makeWrapper, qtscript, gcc, flex, bison, qtdeclarative, gnutar }:
|
|
|
|
|
|
let
|
|
version = "5.1";
|
|
|
|
src = fetchgit {
|
|
url = "https://github.com/kmkolasinski/AwesomeBump.git";
|
|
rev = "Winx32v${version}";
|
|
sha256 = "1c8b9jki0v8kzkvsvyv7q1w3s7j40br6ph15hh2xi0a1mpwckq56";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
qtnproperty = stdenv.mkDerivation {
|
|
name = "qtnproperty";
|
|
inherit src;
|
|
sourceRoot = "AwesomeBump/Sources/utils/QtnProperty";
|
|
buildInputs = [ qtscript qtbase qtdeclarative ];
|
|
nativeBuildInputs = [ qmake flex bison ];
|
|
postInstall = ''
|
|
install -D bin-linux/QtnPEG $out/bin/QtnPEG
|
|
'';
|
|
};
|
|
in stdenv.mkDerivation rec {
|
|
name = "awesomebump-${version}";
|
|
|
|
inherit src;
|
|
|
|
buildInputs = [ qtbase qtscript qtdeclarative ];
|
|
|
|
nativeBuildInputs = [ qmake makeWrapper ];
|
|
|
|
preBuild = ''
|
|
ln -sf ${qtnproperty}/bin/QtnPEG Sources/utils/QtnProperty/bin-linux/QtnPEG
|
|
'';
|
|
|
|
postInstall = ''
|
|
d=$out/libexec/AwesomeBump
|
|
|
|
mkdir -p $d
|
|
cp -vr workdir/`cat workdir/current`/bin/AwesomeBump $d/
|
|
cp -prd Bin/Configs Bin/Core $d/
|
|
|
|
# AwesomeBump expects to find Core and Configs in its current directory.
|
|
makeWrapper $d/AwesomeBump $out/bin/AwesomeBump \
|
|
--run "cd $d"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = https://github.com/kmkolasinski/AwesomeBump;
|
|
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;
|
|
};
|
|
}
|