From c0f09dbff53c41ddcfd0c08bd4121b4978c32999 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 8 Jul 2023 19:13:06 -0400 Subject: pkgs: init check-pr --- pkgs/check-pr.nix | 13 +++++++++++++ pkgs/default.nix | 1 + 2 files changed, 14 insertions(+) create mode 100644 pkgs/check-pr.nix diff --git a/pkgs/check-pr.nix b/pkgs/check-pr.nix new file mode 100644 index 0000000..fca30b1 --- /dev/null +++ b/pkgs/check-pr.nix @@ -0,0 +1,13 @@ +{writeShellApplication}: +writeShellApplication { + name = "check-pr"; + text = '' + _usage=" + usage: check-pr [package] + " + + [ "$#" -lt 2 ] && echo -n "$_usage" && exit 1 + + nix run "github:$1?ref=pull/$2/head''${3:+#$3}" + ''; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 2b9c515..02906f1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,6 +4,7 @@ in { # original packages cartridges = callPackage ./cartridges.nix {}; cfspeedtest = callPackage ./cfspeedtest.nix {}; + check-pr = callPackage ./check-pr.nix {}; huion = callPackage ./huion.nix {}; mommy = callPackage ./mommy.nix {}; theseus = callPackage ./theseus {}; -- cgit v1.2.3