nixpkgs/pkgs/applications/graphics/kodelife/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

117 lines
2.2 KiB
Nix
Raw Normal View History

2022-08-09 14:08:00 +00:00
{
lib,
stdenv,
fetchurl,
makeWrapper,
autoPatchelfHook,
dpkg,
alsa-lib,
2022-08-09 14:08:00 +00:00
curl,
avahi,
gstreamer,
gst-plugins-base,
libxcb,
libX11,
libXcursor,
libXext,
libXi,
libXinerama,
libXrandr,
libXrender,
libXxf86vm,
libglvnd,
zenity,
2019-08-20 10:30:43 +00:00
}:
2022-08-09 14:08:00 +00:00
let
runLibDeps = [
curl
avahi
libxcb
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
libXrender
libXxf86vm
libglvnd
];
runBinDeps = [
zenity
2022-08-09 14:08:00 +00:00
];
in
2019-08-20 10:30:43 +00:00
stdenv.mkDerivation rec {
pname = "kodelife";
2023-05-23 23:44:05 +00:00
version = "1.1.0.173";
suffix =
{
aarch64-linux = "linux-arm64";
armv7l-linux = "linux-armhf";
2023-05-23 23:44:05 +00:00
x86_64-linux = "linux-x64";
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
2019-08-20 10:30:43 +00:00
2022-08-09 14:08:00 +00:00
src = fetchurl {
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
hash =
{
2023-05-23 23:44:05 +00:00
aarch64-linux = "sha256-WPUWvgVZR+2Dg4zpk+iUemMBGlGBDtaGkUGrWuF5LBs=";
armv7l-linux = "sha256-tOPqP40e0JrXg92OluMZrurWHXZavGwTkJiNN1IFVEE=";
x86_64-linux = "sha256-ZA8BlUtKaiSnXGncYwb2BbhBlULuGz7SWuXL0RAgQLI=";
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
2019-08-20 10:30:43 +00:00
};
2022-08-09 14:08:00 +00:00
strictDeps = true;
nativeBuildInputs = [
makeWrapper
autoPatchelfHook
dpkg
];
buildInputs = [
(lib.getLib stdenv.cc.cc)
2022-08-09 14:08:00 +00:00
alsa-lib
gstreamer
gst-plugins-base
];
2019-08-20 10:30:43 +00:00
installPhase = ''
2021-04-27 17:35:10 +00:00
runHook preInstall
2022-08-09 14:08:00 +00:00
mkdir -p $out
cp -r usr/share $out/share
2019-08-20 10:30:43 +00:00
mkdir -p $out/bin
2022-08-09 14:08:00 +00:00
cp opt/kodelife/KodeLife $out/bin/KodeLife
2019-08-20 10:30:43 +00:00
2022-08-09 14:08:00 +00:00
wrapProgram $out/bin/KodeLife \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
--prefix PATH : ${lib.makeBinPath runBinDeps}
runHook postInstall
2019-08-20 10:30:43 +00:00
'';
2022-11-03 14:23:43 +00:00
passthru.updateScript = ./update.sh;
meta = with lib; {
2022-08-09 14:08:00 +00:00
homepage = "https://hexler.net/kodelife";
2019-08-20 10:30:43 +00:00
description = "Real-time GPU shader editor";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2019-08-20 10:30:43 +00:00
license = licenses.unfree;
2024-07-02 00:23:32 +00:00
maintainers = with maintainers; [ prusnak ];
2021-04-27 17:35:10 +00:00
platforms = [
"aarch64-linux"
"armv7l-linux"
"x86_64-linux"
];
2022-08-09 14:08:00 +00:00
mainProgram = "KodeLife";
2019-08-20 10:30:43 +00:00
};
}