# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie # SPDX-License-Identifier: MIT { description = "Submit a new version of a program to the JCOllie winget source as a pull request"; inputs = { nixpkgs = { url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; }; outputs = { self, nixpkgs, ... }: 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 rec { # nix is deliberately not among its inputs: `wingetsource` runs in # jeff/winget-pkgs' own devshell, through the job's own nix. submit = pkgs.writeShellApplication { name = "winget-submit"; runtimeInputs = [ pkgs.git pkgs.python3 ]; text = '' exec python3 ${./winget_submit.py} "$@" ''; }; default = submit; } ); devShells = forAllSystems ( system: let pkgs = makePackages system; in { default = pkgs.mkShell { name = "winget-submit"; nativeBuildInputs = [ pkgs.python3 pkgs.reuse ]; shellHook = '' export PYTHONDONTWRITEBYTECODE=1 ''; }; } ); }; }