kodelife: 0.9.8.143 -> 1.0.5.161

This commit is contained in:
Lily Foster 2022-08-09 10:08:00 -04:00
parent 0bb630d2b3
commit 9dc35afd5f
2 changed files with 81 additions and 39 deletions

View File

@ -1,15 +1,51 @@
{ lib, stdenv
, fetchzip
{ lib
, stdenv
, fetchurl
, makeWrapper
, autoPatchelfHook
, dpkg
, alsa-lib
, glib
, gst_all_1
, libGLU, libGL
, xorg
, curl
, avahi
, gstreamer
, gst-plugins-base
, libxcb
, libX11
, libXcursor
, libXext
, libXi
, libXinerama
, libXrandr
, libXrender
, libXxf86vm
, libglvnd
, gnome
}:
let
runLibDeps = [
curl
avahi
libxcb
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
libXrender
libXxf86vm
libglvnd
];
runBinDeps = [
gnome.zenity
];
in
stdenv.mkDerivation rec {
pname = "kodelife";
version = "0.9.8.143";
version = "1.0.5.161";
suffix = {
aarch64-linux = "linux-arm64";
@ -17,51 +53,55 @@ stdenv.mkDerivation rec {
x86_64-linux = "linux-x86_64";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchzip {
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.zip";
sha256 = {
aarch64-linux = "0ryjmpzpfqdqrvqpq851vvrjd8ld5g91gcigpv9rxp3z1b7qdand";
armv7l-linux = "08nlwn8ixndqil4m7j6c8gjxmwx8zi3in86arnwf13shk6cds5nb";
x86_64-linux = "0kbz7pvh4i4a3pj1vzbzzslha825i888isvsigcqsqvipjr4798q";
src = fetchurl {
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
hash = {
aarch64-linux = "sha256-6QZ5jCxINCH46GQx+V68FpkIAOIOFw4Kd0tUQTKBRzU=";
armv7l-linux = "sha256-eToNjPttY62EzNuRSVvJsHttO6Ux6LXRPRuuIKnvaxM=";
x86_64-linux = "sha256-5M2tgpF74RmrCLI44RBNXK5t0hMAOHtmcjWu7fypc0U=";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
dontConfigure = true;
dontBuild = true;
dontStrip = true;
dontPatchELF = true;
preferLocalBuild = true;
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
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r usr/share $out/share
mkdir -p $out/bin
mv KodeLife $out/bin
cp opt/kodelife/KodeLife $out/bin/KodeLife
wrapProgram $out/bin/KodeLife \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
--prefix PATH : ${lib.makeBinPath runBinDeps}
runHook postInstall
'';
preFixup = let
libPath = lib.makeLibraryPath [
stdenv.cc.cc.lib
alsa-lib
glib
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
libGLU libGL
xorg.libX11
];
in ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
$out/bin/KodeLife
'';
meta = with lib; {
homepage = "https://hexler.net/products/kodelife";
homepage = "https://hexler.net/kodelife";
description = "Real-time GPU shader editor";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ prusnak ];
maintainers = with maintainers; [ prusnak lilyinstarlight ];
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
mainProgram = "KodeLife";
};
}

View File

@ -36227,7 +36227,9 @@ with pkgs;
uhubctl = callPackage ../tools/misc/uhubctl {};
kodelife = callPackage ../applications/graphics/kodelife {};
kodelife = callPackage ../applications/graphics/kodelife {
inherit (gst_all_1) gstreamer gst-plugins-base;
};
bunnyfetch = callPackage ../tools/misc/bunnyfetch {};