depot/third_party/nixpkgs/pkgs/applications/audio/faust/faust2sc.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

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"
'';
})