Something went wrong. Try again.
A Forgejo action that submits a new version of a program to the JCOllie winget source as a pull request.
Something went wrong. Try again.
winget-submit flake.nix
1.6 kB · 71 lines
Nix
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># 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 ''; }; } ); };}