Update default.nix
This commit is contained in:
+13
-66
@@ -1,78 +1,25 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
helium = pkgs.appimageTools.wrapType2 rec {
|
||||
|
||||
let
|
||||
pname = "helium";
|
||||
version = "0.12.4.1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64.AppImage";
|
||||
hash = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0=";
|
||||
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage";
|
||||
sha256 = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0=";
|
||||
};
|
||||
|
||||
contents = pkgs.appimageTools.extractType2 {
|
||||
inherit pname version src;
|
||||
};
|
||||
in
|
||||
pkgs.appimageTools.wrapType2 {
|
||||
inherit pname version src;
|
||||
extraInstallCommands =
|
||||
let
|
||||
contents = pkgs.appimageTools.extract { inherit pname version src; };
|
||||
in
|
||||
''
|
||||
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
gtk3
|
||||
nss
|
||||
nspr
|
||||
libdrm
|
||||
mesa
|
||||
|
||||
libx11
|
||||
libxcb
|
||||
libxcomposite
|
||||
libxdamage
|
||||
libxext
|
||||
libxfixes
|
||||
libxrandr
|
||||
libxi
|
||||
libxtst
|
||||
libxscrnsaver
|
||||
|
||||
atk
|
||||
at-spi2-atk
|
||||
cairo
|
||||
pango
|
||||
expat
|
||||
alsa-lib
|
||||
];
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p $out/share/applications
|
||||
mkdir -p $out/share/icons
|
||||
mkdir -p $out/share/pixmaps
|
||||
|
||||
cp ${contents}/*.desktop \
|
||||
$out/share/applications/${pname}.desktop
|
||||
|
||||
desktop_file="$out/share/applications/${pname}.desktop"
|
||||
|
||||
sed -i "s|^Exec=.*|Exec=$out/bin/${pname}|g" "$desktop_file"
|
||||
|
||||
if [ -d "${contents}/usr/share/icons" ]; then
|
||||
cp -r ${contents}/usr/share/icons/* \
|
||||
$out/share/icons/
|
||||
fi
|
||||
|
||||
find ${contents} -iname "*.png" -exec cp {} $out/share/pixmaps/${pname}.png \; | head -n 1
|
||||
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
cp -r ${contents}/usr/share/icons $out/share
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Helium Browser";
|
||||
homepage = "https://github.com/imputnet/helium";
|
||||
changelog = "https://github.com/imputnet/helium/releases";
|
||||
license = licenses.bsl11;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = pname;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user