1{
2 description = "Piper - A scrobbler service for teal.fm";
3 inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };
4
5 outputs = { self, nixpkgs }:
6 let
7 forAllSystems = nixpkgs.lib.genAttrs [
8 "x86_64-linux"
9 "aarch64-linux"
10 "x86_64-darwin"
11 "aarch64-darwin"
12 ];
13 in {
14 packages = forAllSystems (system:
15 let pkgs = import nixpkgs { inherit system; };
16 in {
17 tealfm-piper = pkgs.callPackage ./package.nix { };
18 default = pkgs.callPackage ./package.nix { source = ./.; };
19 });
20
21 apps = forAllSystems (system: {
22 default = {
23 type = "app";
24 program = "${self.packages.${system}.default}/bin/piper";
25 };
26 });
27
28 devShells = forAllSystems (system:
29 let pkgs = import nixpkgs { inherit system; };
30 in {
31 default =
32 pkgs.mkShell { buildInputs = with pkgs; [ go air nodejs sqlite ]; };
33 });
34
35 nixosModules.default = import ./module.nix { inherit self; };
36
37 overlays.default = final: prev: {
38 tealfm-piper = final.callPackage ./package.nix { };
39 };
40 };
41}