Something went wrong. Try again.
Plays short audio files such as a terminal bell through PipeWire on Linux and WASAPI on Windows.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ description = "zig-chime";
inputs = { nixpkgs = { url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; # Mine, not the one in nixpkgs, which is Jari Vetoniemi's original and # takes different options. zon2nix = { url = "github:jcollie/zon2nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, zon2nix, ... }:
let inherit (nixpkgs) lib; makePackages = system: import nixpkgs { inherit system; }; forAllSystems = lib.genAttrs lib.systems.flakeExposed; in { packages = forAllSystems ( system: let pkgs = makePackages system; in { # Every package build.zig.zon names, fetched by Nix, for # `zig build --system`. The workflow builds with it so that the # dependencies come through Nix and its cache rather than being # fetched by Zig on every run. zig-deps = pkgs.callPackage ./build.zig.zon.nix { }; } );
devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "zig-chime"; nativeBuildInputs = [ pkgs.zig_0_17 pkgs.git-pages-cli pkgs.reuse # Wrapped so that the `zig env` it shells out to is this # project's Zig rather than whatever happens to be on PATH -- # without one it prints "unable to execute zig" and writes # nothing, leaving the previous build.zig.zon.nix in place # looking untouched. (pkgs.symlinkJoin { name = "zon2nix"; paths = [ zon2nix.packages.${pkgs.stdenv.hostPlatform.system}.zon2nix ]; nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/zon2nix \ --prefix PATH : ${lib.makeBinPath [ pkgs.zig_0_17 ]} ''; }) ] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.kcov ] # The Windows build's tests run under Wine: # `zig build test -Dtarget=x86_64-windows -fwine`. ++ lib.optionals (system == "x86_64-linux") [ pkgs.wineWow64Packages.stable ]; }; } ); };}