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

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

108 lines
2.1 KiB
Nix
Raw Normal View History

2022-08-09 16:08:00 +02:00
{ lib
, stdenv
, fetchurl
, makeWrapper
, autoPatchelfHook
, dpkg
, alsa-lib
2022-08-09 16:08:00 +02:00
, curl
, avahi
, gstreamer
, gst-plugins-base
, libxcb
, libX11
, libXcursor
, libXext
, libXi
, libXinerama
, libXrandr
, libXrender
, libXxf86vm
, libglvnd
, gnome
2019-08-20 12:30:43 +02:00
}:
2022-08-09 16:08:00 +02:00
let
runLibDeps = [
curl
avahi
libxcb
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
libXrender
libXxf86vm
libglvnd
];
runBinDeps = [
gnome.zenity
];
in
2019-08-20 12:30:43 +02:00
stdenv.mkDerivation rec {
pname = "kodelife";
2022-09-29 15:58:16 +02:00
version = "1.0.6.163";
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}");
2019-08-20 12:30:43 +02:00
2022-08-09 16:08:00 +02:00
src = fetchurl {
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
hash = {
2022-09-29 15:58:16 +02:00
aarch64-linux = "sha256-BbNk/YfTx/J8ApgdiY/thnD2MFUUCSQt/CMjkewLcL0=";
armv7l-linux = "sha256-fp4YM2BgyTr4vvxw5FaqKyGm608q8fOpB3gAgPA9UQ4=";
x86_64-linux = "sha256-sLRdU/UW2JORAUOPzmr+VUkcLoesrshjdLvDCizX0iM=";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
2019-08-20 12:30:43 +02:00
};
2022-08-09 16:08:00 +02: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
];
2019-08-20 12:30:43 +02:00
installPhase = ''
2021-04-27 19:35:10 +02:00
runHook preInstall
2022-08-09 16:08:00 +02:00
mkdir -p $out
cp -r usr/share $out/share
2019-08-20 12:30:43 +02:00
mkdir -p $out/bin
2022-08-09 16:08:00 +02:00
cp opt/kodelife/KodeLife $out/bin/KodeLife
2019-08-20 12:30:43 +02:00
2022-08-09 16:08:00 +02:00
wrapProgram $out/bin/KodeLife \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
--prefix PATH : ${lib.makeBinPath runBinDeps}
runHook postInstall
2019-08-20 12:30:43 +02:00
'';
meta = with lib; {
2022-08-09 16:08:00 +02:00
homepage = "https://hexler.net/kodelife";
2019-08-20 12:30:43 +02:00
description = "Real-time GPU shader editor";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2019-08-20 12:30:43 +02:00
license = licenses.unfree;
2022-08-09 16:08:00 +02:00
maintainers = with maintainers; [ prusnak lilyinstarlight ];
2021-04-27 19:35:10 +02:00
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
2022-08-09 16:08:00 +02:00
mainProgram = "KodeLife";
2019-08-20 12:30:43 +02:00
};
}