pkgs/openssh: add script to update everything via a json file
This commit is contained in:
parent
795786b8e4
commit
e8993fbc74
8
bin/update-openssh
Executable file
8
bin/update-openssh
Executable 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=
|
@ -70,6 +70,7 @@
|
|||||||
'';
|
'';
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
curl
|
curl
|
||||||
|
dasel
|
||||||
deadnix
|
deadnix
|
||||||
git
|
git
|
||||||
git-bug
|
git-bug
|
||||||
|
@ -3,17 +3,18 @@
|
|||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) readFile fromJSON;
|
||||||
common = opts: callPackage (import ./common.nix opts) {};
|
common = opts: callPackage (import ./common.nix opts) {};
|
||||||
|
verStr = fromJSON (readFile ./version.json);
|
||||||
in {
|
in {
|
||||||
openssh = common {
|
openssh = common {
|
||||||
pname = "openssh";
|
pname = "openssh";
|
||||||
version = "unstable-2023-08-29";
|
inherit (verStr) version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
inherit (verStr) rev hash;
|
||||||
owner = "openssh";
|
owner = "openssh";
|
||||||
repo = "openssh-portable";
|
repo = "openssh-portable";
|
||||||
rev = "f98031773db361424d59e3301aa92aacf423d920";
|
|
||||||
hash = "sha256-MxEwe4x/PIjofzGzQC4LhladRQT5AcnDa+BwMm0DQx4=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPatches = [./ssh-keysign-8.5.patch];
|
extraPatches = [./ssh-keysign-8.5.patch];
|
||||||
|
1
pkgs/openssh/version.json
Normal file
1
pkgs/openssh/version.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"rev":"f98031773db361424d59e3301aa92aacf423d920","hash":"sha256-MxEwe4x/PIjofzGzQC4LhladRQT5AcnDa+BwMm0DQx4=","version":"2023-08-29"}
|
Loading…
Reference in New Issue
Block a user