misc changes and add tlauncher

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-14 09:57:36 +05:30
parent c7c5dfd651
commit c9879b147d
5 changed files with 83 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ let
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
exec "$@"
'';
in
{

View File

@@ -28,8 +28,6 @@
startx = {
enable = true;
};
# lightdm.enable = true;
# sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY";
};
extraLayouts = {
us-colemak = {

View File

@@ -17,6 +17,6 @@ emacsWithPackagesFromUsePackage {
alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [
use-package
# (epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
(epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins))
];
}

View File

@@ -1,6 +1,10 @@
final: prev: {
mpd_discord_richpresence = prev.callPackage ./mpd-rpc { };
customscripts = prev.callPackage ./customscripts { };
gruvbox-icons = prev.callPackage ./gruvbox-icons { };
mymacs = c: prev.callPackage ./emacs { conf = c; };
final: prev:
let
call = prev.callPackage; in
{
mpd_discord_richpresence = call ./mpd-rpc { };
customscripts = call ./customscripts { };
gruvbox-icons = call ./gruvbox-icons { };
mymacs = c: call ./emacs { conf = c; };
tlauncher = call ./tlauncher { };
}

View File

@@ -0,0 +1,72 @@
{ stdenv
, openjdk8
, buildFHSUserEnv
, fetchzip
}:
let
version = "2.86";
jar = stdenv.mkDerivation {
pname = "tlauncher-jar";
inherit version;
src = fetchzip {
name = "tlauncher.zip";
url = "https://dl2.tlauncher.org/f.php?f=files%2FTLauncher-${version}.zip";
sha256 = "sha256-Tpia/GtPfeO8/Tca0fE7z387FRpkXfS1CtvX/oNJDag=";
stripRoot = false;
};
installPhase = ''
cp $src/*.jar $out
'';
};
fhs = buildFHSUserEnv {
name = "tlauncher";
runScript = ''
${openjdk8}/bin/java -jar "${jar}" "$@"
'';
targetPkgs = pkgs: with pkgs; [
zip
zlib
alsa-lib
cpio
cups
file
fontconfig
freetype
giflib
glib
gnome2.GConf
gnome2.gnome_vfs
gtk2
libjpeg
libGL
openjdk8-bootstrap
perl
which
] ++
(with xorg; [
libICE
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
xrandr
libXrender
libXt
libXtst
libXtst
libXxf86vm
]);
};
in
stdenv.mkDerivation rec {
pname = "tlauncher";
inherit version;
dontUnpack = true;
installPhase = ''
mkdir $out/{bin,share/applications} -p
install ${fhs}/bin/tlauncher $out/bin
'';
}