xinlib: extend prIsOpen to work with packages and overlays
This commit is contained in:
parent
9df648d22c
commit
40fb017c00
@ -24,6 +24,8 @@ let
|
||||
startAt = "*:0/5";
|
||||
path = [ promnesia hpi ];
|
||||
}];
|
||||
tailscale-systray = xinlib.prIsOpen.pkg 219502
|
||||
(pkgs.callPackage ../pkgs/tailscale-systray.nix { });
|
||||
in with lib; {
|
||||
imports = [ ./gnome.nix ./kde.nix ./xfce.nix ./arcan.nix ];
|
||||
|
||||
@ -75,9 +77,9 @@ in with lib; {
|
||||
vlc
|
||||
zeal
|
||||
|
||||
(callPackage ../pkgs/tailscale-systray.nix { })
|
||||
(callPackage ../pkgs/govulncheck.nix { })
|
||||
(callPackage ../configs/helix.nix { })
|
||||
tailscale-systray
|
||||
];
|
||||
|
||||
programs = { } // firefox.programs;
|
||||
|
@ -1,16 +1,31 @@
|
||||
{ lib, ... }:
|
||||
# TODO: this could be cleaner :D
|
||||
let
|
||||
prIsOpen = pr: overlay:
|
||||
getPrStatus = pr:
|
||||
let
|
||||
prstr = builtins.toString pr;
|
||||
prStatus =
|
||||
builtins.fromJSON (builtins.readFile ../pull_requests/${prstr}.json);
|
||||
in if prStatus.status == "open" then
|
||||
overlay
|
||||
else
|
||||
lib.warn
|
||||
"PR: ${prstr} (${prStatus.title}) is complete, ignoring overlay..."
|
||||
(_: _: { });
|
||||
in prStatus;
|
||||
prIsOpen = {
|
||||
pkg = pr: pkg:
|
||||
let prStatus = getPrStatus pr;
|
||||
in if prStatus.status == "open" then
|
||||
pkg
|
||||
else
|
||||
lib.warn "PR: ${
|
||||
builtins.toString pr
|
||||
} (${prStatus.title}) is complete, ignoring pkg..." null;
|
||||
|
||||
overlay = pr: overlay:
|
||||
let prStatus = getPrStatus pr;
|
||||
in if prStatus.status == "open" then
|
||||
overlay
|
||||
else
|
||||
lib.warn "PR: ${
|
||||
builtins.toString pr
|
||||
} (${prStatus.title}) is complete, ignoring overlay..." (_: _: { });
|
||||
};
|
||||
|
||||
mkCronScript = name: src: ''
|
||||
. /etc/profile;
|
||||
|
@ -2,16 +2,13 @@
|
||||
let
|
||||
inherit (xinlib) prIsOpen;
|
||||
#openssh = import ./openssh.nix;
|
||||
obsidian = prIsOpen 235408 (import ./obsidian.nix);
|
||||
obsidian = prIsOpen.overlay 235408 (import ./obsidian.nix);
|
||||
#tailscale = import ./tailscale.nix;
|
||||
#jetbrains = prIsOpen 232308 (import ./jetbrains.nix);
|
||||
#tidal-hifi = prIsOpen 228552 (import ./tidal-hifi.nix { inherit lib; });
|
||||
#matrix-synapse = prIsOpen 233652 (import ./matrix-synapse.nix);
|
||||
in {
|
||||
nixpkgs.overlays = if isUnstable then [
|
||||
obsidian
|
||||
] else
|
||||
[ ];
|
||||
nixpkgs.overlays = if isUnstable then [ obsidian ] else [ ];
|
||||
}
|
||||
|
||||
# Example Python dep overlay
|
||||
|
19
pull_requests/219502.json
Normal file
19
pull_requests/219502.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"branches": [
|
||||
"master",
|
||||
"staging",
|
||||
"staging-next"
|
||||
],
|
||||
"pull_request": 219502,
|
||||
"release": "unstable",
|
||||
"status": "open",
|
||||
"status_info": {
|
||||
"master": true,
|
||||
"nixos-unstable": false,
|
||||
"nixos-unstable-small": false,
|
||||
"nixpkgs-unstable": false,
|
||||
"staging": true,
|
||||
"staging-next": true
|
||||
},
|
||||
"title": "tailscale-systray: init at 2022-10-19"
|
||||
}
|
Loading…
Reference in New Issue
Block a user