5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
35 lines
1,008 B
Nix
35 lines
1,008 B
Nix
{ renode
|
|
, fetchurl
|
|
, writeScript
|
|
}:
|
|
|
|
renode.overrideAttrs (finalAttrs: _: {
|
|
pname = "renode-unstable";
|
|
version = "1.15.0+20240509git8750f2500";
|
|
|
|
src = fetchurl {
|
|
url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-portable.tar.gz";
|
|
hash = "sha256-bvPY+VPKCHG0/QHBsM7frU0+9sSMHV0ImISChHfWiAE=";
|
|
};
|
|
|
|
passthru.updateScript =
|
|
let
|
|
versionRegex = "[0-9\.\+]+[^\+]*.";
|
|
in
|
|
writeScript "${finalAttrs.pname}-updater" ''
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p common-updater-scripts curl gnugrep gnused pup
|
|
|
|
latestVersion=$(
|
|
curl -sS https://builds.renode.io \
|
|
| pup 'a text{}' \
|
|
| egrep 'renode-${versionRegex}\.linux-portable\.tar\.gz' \
|
|
| head -n1 \
|
|
| sed -e 's,renode-\(.*\)\.linux-portable\.tar\.gz,\1,g'
|
|
)
|
|
|
|
update-source-version ${finalAttrs.pname} "$latestVersion" \
|
|
--file=pkgs/by-name/re/${finalAttrs.pname}/package.nix \
|
|
--system=x86_64-linux
|
|
'';
|
|
})
|