nixpkgs fore homemanager

master
Aleksey Zubakov 2 years ago
parent 12d4685ff2
commit 16ccb34b8b
  1. 2
      nixpkgs/build.nix
  2. 28
      nixpkgs/eclipse-jdt-ls.nix
  3. 119
      nixpkgs/home.nix
  4. 26
      nixpkgs/jdk17.nix
  5. 13
      nixpkgs/mtp2lite.nix
  6. 1
      nixpkgs/result

@ -0,0 +1,2 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.callPackage ./eclipse-jdt-ls.nix {}

@ -0,0 +1,28 @@
{ stdenv, fetchurl, makeWrapper, jre }:# Add other dependencies here, as parameters to the function
stdenv.mkDerivation rec {
name = "eclipse-jdt-ls"; # name of the package
sourceRoot = ".";
src = fetchurl { # there's also fetchgit and other helpers
url = "https://download.eclipse.org/jdtls/milestones/1.10.0/jdt-language-server-1.10.0-202204131925.tar.gz";
sha256 = "sPqvT/iBfK5gemwtVLeLqtYwbeOrkQT/JSsi6zPYIEk=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ]; # just as example, autoconf needed if ...
installPhase = ''
mkdir -pv $out/share/java $out/bin
cp -r ./plugins/ $out
cp -r ./features/ $out
cp -r ./bin/ $out
makeWrapper ${jre}/bin/java $out/bin/eclipse-jdt-ls \
--add-flags "--add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
-noverify -Xmx1G \
-jar $out/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar \
-configuration ~/.config/eclipse/ \
-data ~/.eclipse/" \
--set _JAVA_OPTIONS "-Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.level=ALL -Dfile.encoding=utf-8"
'';
}

@ -0,0 +1,119 @@
{ config, pkgs, ... }: let
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-full;
# cyrillic
# minted
# tempora
# dvisvgm dvipng # for preview and export as html
# wrapfig amsmath ulem hyperref capt-of
# relsize eulervm multirow;
#(setq org-latex-compiler "lualatex")
#(setq org-preview-latex-default-process 'dvisvgm)
});
eclipse-jdt-ls = pkgs.callPackage ./eclipse-jdt-ls.nix {};
in
{
home.username = "apr";
home.homeDirectory = "/home/apr";
home.sessionVariables = { };
home.stateVersion = "22.05";
programs.home-manager.enable = true;
programs.bash = {
enable = true;
bashrcExtra = ''
export JAVA_HOME="/usr/lib/jvm/default-runtime/";
. ~/.bashrc.backup
'';
profileExtra = ''
. ~/.bash_profile.backup
'';
};
# programs.texlive = pkgs.texlive.combined.scheme-full;
# {
# extraPackages = tpkgs: { inherit (tpkgs) scheme-full cyrillic texindent; };
# };
home.packages = with pkgs; [
i3lock
pkg-config
# [dhall]
dhall
dhall-lsp-server
haskell-language-server
# [nix]
rnix-lsp
# [rust]
rust-analyzer
# [markdown]
pandoc
# [bash]
nodePackages.bash-language-server
glibc
# [java]
eclipse-jdt-ls
# [kotlin]
# do I need this bullshit actually?
# [latex]
# tex
# texlive.combined.scheme-full
texlab
zathura
# [go]
gopls
# [rust]
cargo
rustc
# [cpp]
clang
# [java]
# jdk17
# jdk11
# lzy
fuse
# [racket]
racket
# [yaml]
yaml-language-server
# [html]
#html-languageserver
imagemagick
inkscape
# python-language-server
(python39.withPackages (ps: with ps;[
# default one to install local modules I guess?
pip
python-lsp-server
# python lsp
# jedi
# pyls-mypy
# python formatter
# black
]))
];
}

@ -0,0 +1,26 @@
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
name = "openjdk17"; # name of the package
sourceRoot = ".";
src = fetchurl { # there's also fetchgit and other helpers
url = "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz";
sha256 = "1c0a73cbb863aad579b967316bf17673b8f98a9bb938602a140ba2e5c38f880a";
};
installPhase = ''
mkdir -pv $out/share/java $out/bin
cp -r ./plugins/ $out
cp -r ./features/ $out
cp -r ./bin/ $out
makeWrapper ${jre}/bin/java $out/bin/eclipse-jdt-ls \
--add-flags "--add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
-noverify -Xmx1G \
-jar $out/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar \
-configuration ~/.config/eclipse/ \
-data ~/.eclipse/" \
--set _JAVA_OPTIONS "-Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.level=ALL -Dfile.encoding=utf-8"
'';
}

@ -0,0 +1,13 @@
with import <nixpkgs>{};
stdenv.mkDerivation rec {
name = "mtp2lite"; # name of the package
sourceRoot = ".";
src = fetchurl { # there's also fetchgit and other helpers
url = "http://mirrors.ctan.org/fonts/mtp2lite.zip";
sha256 = "807RgMx5c7ynXudkFGKh4AYX/KfUe4Ypx/PQR+OEed8=";
};
buildInputs = [ pkgs.unzip ];
installPhase = ''
ls mtp2lite
'';
}

@ -0,0 +1 @@
/nix/store/zd7y3fvh82767df0k8j41yiw4g2a541k-eclipse-jdt-ls
Loading…
Cancel
Save