overlays: add underpinnings for a pr tracking mechanism

This commit is contained in:
Aaron Bieber 2023-05-23 06:59:57 -06:00
parent 328583e199
commit 80a174e3c0
No known key found for this signature in database
3 changed files with 32 additions and 7 deletions

View File

@ -1,5 +1,12 @@
{ lib, ... }: { lib, ... }:
let let
prStatus = builtins.fromJSON (builtins.readFile ../pr_status.json);
prIsOpen = pr: overlay:
if prStatus."${builtins.toString pr}".status == "open" then
overlay
else
null;
mkCronScript = name: src: '' mkCronScript = name: src: ''
. /etc/profile; . /etc/profile;
set -x set -x
@ -31,6 +38,7 @@ let
deadnix deadnix
git git
git-bug git-bug
jo
jq jq
nil nil
nix-diff nix-diff
@ -54,7 +62,7 @@ let
}; };
xinlib = { xinlib = {
inherit buildVer mkCronScript jobToUserService jobToService buildShell; inherit buildVer mkCronScript jobToUserService jobToService buildShell prStatus prIsOpen;
}; };
in xinlib in xinlib

View File

@ -1,8 +1,9 @@
{ isUnstable, lib, ... }: { isUnstable, lib, xinlib, ... }:
let let
openssh = import ./openssh.nix; openssh = import ./openssh.nix;
tailscale = import ./tailscale.nix; tailscale = xinlib.prIsOpen 231281 (import ./tailscale.nix);
jetbrains = xinlib.prIsOpen 232308 (import ./jetbrains.nix);
tidal-hifi = xinlib.prIsOpen 228552 (import ./tidal-hifi.nix { inherit lib; });
in { in {
nixpkgs.overlays = if isUnstable then [ nixpkgs.overlays = if isUnstable then [
(_: super: { (_: super: {
@ -12,8 +13,8 @@ in {
}); });
}; };
}) })
(import ./jetbrains.nix) jetbrains
(import ./tidal-hifi.nix { inherit lib; }) tidal-hifi
openssh openssh
tailscale tailscale
] else [ ] else [

View File

@ -1 +1,17 @@
{"232308":{"status":"open","link":"https://github.com/NixOS/nixpkgs/pull/232308"}} {
"232308": {
"status": "open",
"target": "unstable",
"link": "https://github.com/NixOS/nixpkgs/pull/232308"
},
"228552": {
"status": "open",
"target": "unstable",
"link": "https://github.com/NixOS/nixpkgs/pull/228552"
},
"231281": {
"status": "open",
"target": "stable",
"link": "https://github.com/NixOS/nixpkgs/pull/231281"
}
}