Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
32 lines
743 B
Nix
32 lines
743 B
Nix
{ faust
|
|
, baseName ? "faust2sc"
|
|
, supercollider
|
|
, makeWrapper
|
|
, python3
|
|
, stdenv
|
|
}@args:
|
|
let
|
|
faustDefaults = faust.faust2ApplBase
|
|
(args // {
|
|
baseName = "${baseName}.py";
|
|
});
|
|
in
|
|
stdenv.mkDerivation (faustDefaults // {
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ python3 faust supercollider ];
|
|
|
|
postInstall = ''
|
|
mv "$out/bin/${baseName}.py" "$out"/bin/${baseName}
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram "$out"/bin/${baseName} \
|
|
--append-flags "--import-dir ${faust}/share/faust" \
|
|
--append-flags "--architecture-dir ${faust}/share/faust" \
|
|
--append-flags "--architecture-dir ${faust}/include" \
|
|
--append-flags "-p ${supercollider}" \
|
|
--prefix PATH : "$PATH"
|
|
'';
|
|
})
|