Overview
Create a Nix flake for NixOS and Nix package manager users.
Parent issue: #2
Requirements
Flake Template
{
description = "Convert documents to audiobooks using Piper TTS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python312;
in {
packages.default = python.pkgs.buildPythonApplication {
pname = "make-audiobook";
version = "2.0.0";
src = ./.;
format = "other";
propagatedBuildInputs = with pkgs; [
ffmpeg
pandoc
fzf
fd
piper-tts
] ++ (with python.pkgs; [
pyside6
requests
]);
installPhase = ''
mkdir -p $out/bin
cp make-audiobook $out/bin/
cp make-audiobook-gui $out/bin/
cp -r gui $out/lib/python${python.version}/site-packages/
'';
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
python
python.pkgs.pyside6
python.pkgs.pytest
python.pkgs.pytest-qt
ffmpeg
pandoc
];
};
});
}
Usage
# Run without installing
nix run github:tigger04/make-audiobook
# Install to profile
nix profile install github:tigger04/make-audiobook
# Development shell
nix develop github:tigger04/make-audiobook
Acceptance Criteria
nix run launches GUI
nix build produces working package
- Works on NixOS 24.05+
- Works with nix-darwin on macOS
- All dependencies resolved by Nix
Overview
Create a Nix flake for NixOS and Nix package manager users.
Parent issue: #2
Requirements
Flake Template
Usage
Acceptance Criteria
nix runlaunches GUInix buildproduces working package