diff --git a/derivations/gh-pr-url/default.nix b/derivations/gh-pr-url/default.nix new file mode 100644 index 00000000..bd525cc7 --- /dev/null +++ b/derivations/gh-pr-url/default.nix @@ -0,0 +1,10 @@ +{pkgs ? import {}}: +pkgs.stdenvNoCC.mkDerivation { + pname = "gh-pr-url"; + version = "unstable"; + src = ./.; + doBuild = false; + installPhase = '' + install -Dm755 ./gh-pr-url $out/bin/gh-pr-url + ''; +} diff --git a/derivations/gh-pr-url/gh-pr-url b/derivations/gh-pr-url/gh-pr-url new file mode 100755 index 00000000..b9c86aed --- /dev/null +++ b/derivations/gh-pr-url/gh-pr-url @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -e + +gh pr view --json url -t '{{.url}}' $* diff --git a/flake.nix b/flake.nix index 2c2e01af..ec2d9a34 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,7 @@ cert-info = cert-info.packages.${system}.default; simpleproxy = inputs.simpleproxy.packages.${system}.default; gh-repo-url = final.callPackage ./derivations/gh-repo-url {}; + gh-pr-url = final.callPackage ./derivations/gh-pr-url {}; gh-rebase-pr = final.callPackage ./derivations/gh-rebase-pr {}; wlman = final.callPackage ./derivations/wlman {}; check-certificate-revocation = final.callPackage ./derivations/check-certificate-revocation {}; diff --git a/home/gh.nix b/home/gh.nix index 52f03052..fc5cc7a5 100644 --- a/home/gh.nix +++ b/home/gh.nix @@ -13,6 +13,7 @@ extensions = [ pkgs.gh-dash pkgs.gh-repo-url + pkgs.gh-pr-url pkgs.gh-rebase-pr pkgs.gh-markdown-preview ];