pkgs/openssh: add script to update everything via a json file

This commit is contained in:
Aaron Bieber 2023-08-29 17:53:40 -06:00
parent 795786b8e4
commit e8993fbc74
No known key found for this signature in database
4 changed files with 14 additions and 3 deletions

8
bin/update-openssh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
ATOM="$(curl -s https://github.com/openssh/openssh-portable/commits/master.atom)"
COMMIT="$(echo $ATOM | dasel -rxml 'feed.entry.[0].id' | awk -F/ '{print $NF}')"
COMMENT="$(echo $ATOM | dasel -rxml 'feed.entry.[0].title')"
UPDATED="$(echo $ATOM | dasel -rxml 'feed.entry.[0].updated' | awk -FT '{print $1}')"
jo -- version="${UPDATED}" rev="${COMMIT}" comment="${COMMENT}" -s hash=

View File

@ -70,6 +70,7 @@
'';
nativeBuildInputs = with pkgs; [
curl
dasel
deadnix
git
git-bug

View File

@ -3,17 +3,18 @@
lib,
fetchFromGitHub,
}: let
inherit (builtins) readFile fromJSON;
common = opts: callPackage (import ./common.nix opts) {};
verStr = fromJSON (readFile ./version.json);
in {
openssh = common {
pname = "openssh";
version = "unstable-2023-08-29";
inherit (verStr) version;
src = fetchFromGitHub {
inherit (verStr) rev hash;
owner = "openssh";
repo = "openssh-portable";
rev = "f98031773db361424d59e3301aa92aacf423d920";
hash = "sha256-MxEwe4x/PIjofzGzQC4LhladRQT5AcnDa+BwMm0DQx4=";
};
extraPatches = [./ssh-keysign-8.5.patch];

View File

@ -0,0 +1 @@
{"rev":"f98031773db361424d59e3301aa92aacf423d920","hash":"sha256-MxEwe4x/PIjofzGzQC4LhladRQT5AcnDa+BwMm0DQx4=","version":"2023-08-29"}