diff --git a/README.md b/README.md index e852620..55ccb91 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ - [neuralnote](https://github.com/DamRsn/NeuralNote) - [neural-amp-modeler-lv2](https://github.com/mikeoliphant/neural-amp-modeler-lv2) - [artworks](https://github.com/mrtnvgr/artworks) +- [nam-trainer](https://github.com/sdatkinson/neural-amp-modeler) ### Fetchers diff --git a/default.nix b/default.nix index fe666f0..81932ea 100644 --- a/default.nix +++ b/default.nix @@ -60,6 +60,7 @@ in rec { neuralnote = p ./pkgs/audio/neuralnote { }; neural-amp-modeler-lv2 = p ./pkgs/audio/neural-amp-modeler-lv2 { }; artworks = p ./pkgs/audio/artworks { }; + nam-trainer = p ./pkgs/audio/nam-trainer { }; # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; # ... diff --git a/pkgs/audio/nam-trainer/default.nix b/pkgs/audio/nam-trainer/default.nix new file mode 100644 index 0000000..7c1a672 --- /dev/null +++ b/pkgs/audio/nam-trainer/default.nix @@ -0,0 +1,50 @@ +{ lib, fetchFromGitHub, fetchPypi, python3Packages }: +let + wavio = python3Packages.buildPythonPackage rec { + pname = "wavio"; + version = "0.0.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-UcE3aIhdQJW6CCVHhXUC4hI5BdtUf669wAfgOt4Y7V0="; + }; + + dependencies = with python3Packages; [ numpy ]; + }; + + auraloss = python3Packages.buildPythonPackage rec { + pname = "auraloss"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Gz+hP9XKA2nUZ16irm07Rxkb08jKbMiy4hf+48YnweA="; + }; + + # Ignoring ~broken~ pyproject file + patchPhase = "rm pyproject.toml"; + + dependencies = with python3Packages; [ numpy torch scipy matplotlib ]; + }; +in +python3Packages.buildPythonApplication rec { + pname = "neural-amp-modeler"; + version = "0ee6fd6c3a0c918035156dc9a6c54bee8d9470bb"; + + src = fetchFromGitHub { + owner = "sdatkinson"; + repo = pname; + rev = version; + hash = "sha256-dCAzX0TlIICv4I+/QGDCNDpTLQYeX9kb5bjHOwB2jkk="; + }; + + dependencies = with python3Packages; [ numpy torch wavio transformers sounddevice scipy pytorch-lightning pydantic onnxruntime onnx matplotlib auraloss pytest ]; + + meta = with lib; { + description = "Neural network emulator for guitar amplifiers"; + homepage = "https://github.com/sdatkinson/neural-amp-modeler"; + license = licenses.mit; + platforms = platforms.all; + mainProgram = "nam"; + }; +}