summary refs log tree commit diff
path: root/pkgs/applications/graphics/awesomebump/default.nix
blob: b89e18ed148c163c987eb44b61534a70f523c4e8 (plain) (blame)
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
{ lib, stdenv, fetchurl, qtbase, qmakeHook, makeWrapper }:

stdenv.mkDerivation {
  name = "awesomebump-4.0";

  src = fetchurl {
    url = https://github.com/kmkolasinski/AwesomeBump/archive/Linuxv4.0.tar.gz;
    sha256 = "1rp4m4y2ld49hibzwqwy214cbiin80i882d9l0y1znknkdcclxf2";
  };

  setSourceRoot = "sourceRoot=$(echo */Sources)";

  buildInputs = [ qtbase qmakeHook makeWrapper ];

  enableParallelBuilding = true;

  installPhase =
    ''
      d=$out/libexec/AwesomeBump
      mkdir -p $d $out/bin
      cp 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;
  };
}