1a714ac77a
Instead of blindly copying over .cue files, attempt to parse them with cuetools and use the data to split up the associated flac files. Old behavior is available under --dumb-cue-copy.
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{
|
|
sbcl,
|
|
lib,
|
|
writeText,
|
|
cuetools,
|
|
ffmpeg-headless,
|
|
makeWrapper,
|
|
}: let
|
|
sync-music = sbcl.buildASDFSystem rec {
|
|
pname = "sync-music";
|
|
version = "dev";
|
|
src = lib.cleanSource ../.;
|
|
|
|
lispLibs = with sbcl.pkgs; [
|
|
alexandria
|
|
babel
|
|
cl-ppcre
|
|
fset
|
|
lparallel
|
|
pathname-utils
|
|
serapeum
|
|
uax-15
|
|
unix-opts
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
runtimeInputs = [
|
|
cuetools
|
|
ffmpeg-headless
|
|
];
|
|
|
|
buildScript = writeText "build-sync-music.lisp" ''
|
|
(load "${sync-music.asdfFasl}/asdf.${sync-music.faslExt}")
|
|
(asdf:load-system :sync-music/cli)
|
|
|
|
(setf uiop:*image-entry-point* #'sync-music/cli:main)
|
|
(uiop:dump-image "main" :executable t)
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp -va main $out/bin/sync-music
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/sync-music \
|
|
--prefix PATH : ${lib.makeBinPath runtimeInputs}
|
|
'';
|
|
|
|
meta.mainProgram = "sync-music";
|
|
};
|
|
in
|
|
sync-music
|