aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix41
1 files changed, 41 insertions, 0 deletions
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;
+ };
+}