From 22fcbb59c10607a5fecc30ef753cc852f5c35c06 Mon Sep 17 00:00:00 2001 From: Leo Coogan Date: Sun, 18 May 2025 11:22:55 -0400 Subject: [PATCH] attempt at a nix package --- default.nix | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 25 +++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..0fce011 --- /dev/null +++ b/default.nix @@ -0,0 +1,52 @@ +{ + lib + stdenv # do I need this? assuming for nix-shell + fetchurl, + runtimeSHell, # do I need this? assuming for nix-shell + + cmake, + clang, + libcxx, + python312Packages.jinja2, + python312Packages.docutils, + python312Packages.pyaml, + python312Packages.schema, +}: + +mkDerivation rec { + pname = "Flucoma-sc"; + version = "1.0.8"; + + src = fetchurl { + url = "https://github.com/flucoma/flucoma-sc/archive/refs/tags/${version}.tar.gz"; + sha256 = "sha256-1phf1p40m20qlq0vivfinl2985ha8a1qhp3ixwfd5r8gjw7pbxs3"; + }; + + # patches = []; + # postPatch = ''; + # strictDeps = true; + # nativeBuildInputs + + buildInputs = [ + cmake, + clang, + libcxx, + python312Packages.jinja2, + python312Packages.docutils, + python312Packages.pyaml, + python312Packages.schema, + ]; + + cmakeFlags = [ + "-DSC_PATH=${scSource}" + ]; + + meta = with lib; { + description ="Fluid Corpus Manipulation plugins for Supercollider"; + homepage = "https://www.flucoma.org"; + changelog = ""; + maintainers = ["Leonard Francis Coogan"]; + license = licenses.bsd3; + platforms = platforms.linux; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..c340892 --- /dev/null +++ b/shell.nix @@ -0,0 +1,25 @@ +{pkgs ? import {} }: + +/* +let + scSource = pkgs.supercollider.src; +in +*/ + +pkgs.mkShell { + buildInputs = [ + pkgs.cmake + pkgs.clang + pkgs.libcxx + pkgs.fftw + pkgs.python312Packages.jinja2 + pkgs.python312Packages.docutils + pkgs.python312Packages.pyaml + pkgs.python312Packages.schema + ]; + + shellHook = '' + export SC_PATH="${scSource}" + export INSTALL_PREFIX="~/.local/share/SuperCollider/Extensions" + ''; +}