Update default.nix
This commit is contained in:
+13
-66
@@ -1,78 +1,25 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
lib,
|
helium = pkgs.appimageTools.wrapType2 rec {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
pname = "helium";
|
pname = "helium";
|
||||||
version = "0.12.4.1";
|
version = "0.12.4.1";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64.AppImage";
|
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage";
|
||||||
hash = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0=";
|
sha256 = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
contents = pkgs.appimageTools.extractType2 {
|
extraInstallCommands =
|
||||||
inherit pname version src;
|
let
|
||||||
};
|
contents = pkgs.appimageTools.extract { inherit pname version src; };
|
||||||
in
|
in
|
||||||
pkgs.appimageTools.wrapType2 {
|
''
|
||||||
inherit pname version src;
|
|
||||||
|
|
||||||
extraPkgs =
|
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
|
||||||
pkgs: with pkgs; [
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
gtk3
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||||
nss
|
cp -r ${contents}/usr/share/icons $out/share
|
||||||
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
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
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