lisp-scripts/nix/time-window.nix

45 lines
896 B
Nix
Raw Normal View History

{
sbcl,
lib,
cl-hyprland-ipc,
writeText,
makeWrapper,
}: let
time-window = sbcl.buildASDFSystem {
pname = "sync-music";
version = "dev";
src = lib.cleanSource ../.;
lispLibs = [
cl-hyprland-ipc
];
nativeBuildInputs = [
makeWrapper
];
buildScript = writeText "build-sync-music.lisp" ''
(load "${time-window.asdfFasl}/asdf.${time-window.faslExt}")
(asdf:load-system :time-window)
(setf uiop:*image-entry-point* #'time-window:main)
(uiop:dump-image "main"
:executable t
#+sb-core-compression :compression
#+sb-core-compression t)
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -va main $out/bin/time-window
runHook postInstall
'';
meta.mainProgram = "time-window";
};
in
time-window