Created
October 23, 2021 23:44
-
-
Save WolfangAukang/bb46618865a270a487ba296732ddf33e to your computer and use it in GitHub Desktop.
Indigenous Desktop for Nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, fetchurl, unzip, makeDesktopItem, copyDesktopItems, makeWrapper, autoPatchelfHook, | |
alsa-lib, gtk3, libXdamage, libXScrnSaver, libXtst, nss }: | |
let | |
app_icon = fetchurl { | |
url = "https://indigenous.realize.be/themes/custom/indigenous_theme/logo.png"; | |
sha256 = "sha256-j5As+yv/O7iADSzyS4rSe0/LSzok08urzFZVUQRywSI="; | |
}; | |
in stdenv.mkDerivation rec { | |
pname = "indigenous"; | |
version = "1.2.0"; | |
src = fetchurl { | |
url = "https://github.com/marksuth/indigenous-desktop/releases/download/v${version}/Indigenous-for-desktop-Linux-x64-${version}.zip"; | |
name = "indigenous-${version}.zip"; | |
sha256 = "sha256-AXbLSmeKerDKv6ogm7fNh3cXYVmj1A6L2aK3WnMO8wU="; | |
}; | |
nativeBuildInputs = [ | |
autoPatchelfHook | |
copyDesktopItems | |
makeWrapper | |
unzip | |
]; | |
buildInputs = [ alsa-lib gtk3 libXdamage libXScrnSaver libXtst nss ]; | |
libPath = lib.makeLibraryPath buildInputs; | |
dontConfigure = true; | |
dontBuild = true; | |
desktopItems = makeDesktopItem { | |
name = pname; | |
exec = "indigenous"; | |
icon = app_icon; | |
comment = meta.description; | |
desktopName = "Indigenous"; | |
genericName = "Feed Reader"; | |
}; | |
installPhase = '' | |
runHook preInstall | |
mkdir -p $out/opt/indigenous $out/share/indigenous | |
cp -r ./ $out/opt/indigenous | |
mv $out/opt/indigenous/{locales,resources} $out/share/indigenous | |
makeWrapper $out/opt/indigenous/Indigenous \ | |
$out/bin/indigenous \ | |
--prefix LD_LIBRARY_PATH : ${libPath} | |
runHook postInstall | |
''; | |
meta = with lib; { | |
description = "IndieWeb app with extensions for sharing to/reading from micropub endpoints"; | |
homepage = "https://indigenous.realize.be/indigenous-desktop"; | |
license = licenses.gpl3Only; | |
maintainers = with maintainers; [ wolfangaukang ]; | |
platforms = [ "x86_64-linux" ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment