7065f73dd3
No more random lisp scripts and derivations in my main NixOS config anymore
45 lines
896 B
Nix
45 lines
896 B
Nix
{
|
|
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
|