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";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.0.8.170";
|
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 = {
|
2023-03-15 16:39:30 +00:00
|
|
|
aarch64-linux = "sha256-FHE87B34QSc7rcKHE3wkZq1VzcZeKWh68rlIIMDRmm8=";
|
|
|
|
armv7l-linux = "sha256-OqomlL7IFHyQQULbdbf5I0dRXdy3lDHY4ej2P1OZgzo=";
|
|
|
|
x86_64-linux = "sha256-QNcWMVZ4bTXPLFEtD35hP2LbuNntvF2e9Wk2knt4TBY=";
|
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
|
|
|
};
|
|
|
|
}
|