2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, autoPatchelfHook
|
|
|
|
, dpkg
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2022-08-12 12:06:08 +00:00
|
|
|
, curl
|
|
|
|
, avahi
|
|
|
|
, gstreamer
|
|
|
|
, gst-plugins-base
|
|
|
|
, libxcb
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXrender
|
|
|
|
, libXxf86vm
|
|
|
|
, libglvnd
|
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
|
|
|
runLibDeps = [
|
|
|
|
curl
|
|
|
|
avahi
|
|
|
|
libxcb
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXi
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libXxf86vm
|
|
|
|
libglvnd
|
|
|
|
];
|
|
|
|
|
|
|
|
runBinDeps = [
|
|
|
|
gnome.zenity
|
|
|
|
];
|
|
|
|
in
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kodelife";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.0.6.163";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
suffix = {
|
|
|
|
aarch64-linux = "linux-arm64";
|
|
|
|
armv7l-linux = "linux-armhf";
|
|
|
|
x86_64-linux = "linux-x86_64";
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
|
|
|
|
hash = {
|
2022-09-30 11:47:45 +00:00
|
|
|
aarch64-linux = "sha256-BbNk/YfTx/J8ApgdiY/thnD2MFUUCSQt/CMjkewLcL0=";
|
|
|
|
armv7l-linux = "sha256-fp4YM2BgyTr4vvxw5FaqKyGm608q8fOpB3gAgPA9UQ4=";
|
|
|
|
x86_64-linux = "sha256-sLRdU/UW2JORAUOPzmr+VUkcLoesrshjdLvDCizX0iM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
unpackCmd = "mkdir root; dpkg-deb -x $curSrc root";
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
alsa-lib
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
runHook preInstall
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r usr/share $out/share
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin
|
2022-08-12 12:06:08 +00:00
|
|
|
cp opt/kodelife/KodeLife $out/bin/KodeLife
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
wrapProgram $out/bin/KodeLife \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
|
|
|
|
--prefix PATH : ${lib.makeBinPath runBinDeps}
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://hexler.net/kodelife";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Real-time GPU shader editor";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ prusnak lilyinstarlight ];
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
mainProgram = "KodeLife";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|