summary refs log tree commit diff
path: root/pkgs/applications/graphics/kodelife/default.nix
blob: 961b0175da9f284d8e2ed79dfe61d0c117b4086b (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv
, fetchzip
, alsaLib
, glib
, gst_all_1
, libGLU_combined
, xorg
}:

stdenv.mkDerivation rec {
  pname = "kodelife";
  version = "0.8.6.101";

  src = fetchzip {
    url = "https://hexler.net/pub/${pname}/${pname}-${version}-linux-x86_64.zip";
    sha256 = "1ldab1famdcby2djfys657g85d46s8k96m6mr71riw4v336ar238";
  };

  dontConfigure = true;
  dontBuild = true;
  dontStrip = true;
  dontPatchELF = true;

  installPhase = ''
    mkdir -p $out/bin
    mv KodeLife $out/bin
  '';

  preFixup = let
    libPath = stdenv.lib.makeLibraryPath [
      stdenv.cc.cc.lib
      alsaLib
      glib
      gst_all_1.gstreamer
      gst_all_1.gst-plugins-base
      libGLU_combined
      xorg.libX11
    ];
  in ''
    patchelf \
      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
      --set-rpath "${libPath}" \
      $out/bin/KodeLife
  '';

  meta = with stdenv.lib; {
    homepage = "https://hexler.net/products/kodelife";
    description = "Real-time GPU shader editor";
    license = licenses.unfree;
    maintainers = with maintainers; [ prusnak ];
    platforms = [ "x86_64-linux" ];
  };
}