configuration.nix/mirea-specific/mireaweek.nix
Gregory Bednov 4aae45f13b
Some checks failed
/ build-installer (push) Failing after 2s
i20n and universalization for config
2026-09-14 14:21:08 +03:00

19 lines
725 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Утилита расчёта номера учебной недели.
# Даты отсечки семестров (9 февраля / 1 сентября) специфичны для МИРЭА,
# поэтому пакет живёт здесь, а не в общем mireadesktop.
{ pkgs }:
pkgs.stdenv.mkDerivation rec {
pname = "mireaweek";
version = "0.1.0";
src = ./weekday.kt;
dontInstall = true;
dontUnpack = true;
nativeBuildInputs = [ pkgs.kotlin ];
buildPhase = ''
mkdir -p $out/{bin,lib}
kotlinc $src -include-runtime -d mireaweek.jar
mv mireaweek.jar $out/lib
printf "${pkgs.jre}/bin/java -jar $out/lib/mireaweek.jar" > $out/bin/mireaweek
chmod +x $out/bin/mireaweek
'';
}