From 46227e2003de28202cc4e82bca4f7f4745476c4e Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Sat, 5 Sep 2026 17:51:13 -0700 Subject: init --- flake.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c3900bb --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + description = "animalese - Animal Crossing style speech synthesis"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = inputs: { + packages = builtins.mapAttrs (system: pkgs: { + animalese = pkgs.rustPlatform.buildRustPackage { + pname = "animalese"; + version = "0.1.0"; + + src = inputs.self; + cargoLock.lockFile = ./Cargo.lock; + + meta = { + description = "Animal Crossing style speech synthesis"; + mainProgram = "animalese"; + }; + }; + + default = inputs.self.packages.${system}.animalese; + }) inputs.nixpkgs.legacyPackages; + + devShells = builtins.mapAttrs (system: pkgs: { + default = pkgs.mkShell { + packages = [ + pkgs.cargo + pkgs.rustc + pkgs.clippy + pkgs.rustfmt + pkgs.rust-analyzer + ]; + + # so rust-analyzer can find the standard library sources + RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}"; + }; + }) inputs.nixpkgs.legacyPackages; + }; +} -- cgit v1.3.1