2023-12-30 01:54:34 +00:00
|
|
|
{ renode
|
|
|
|
, fetchurl
|
2024-03-27 16:21:32 +00:00
|
|
|
, writeScript
|
2023-12-30 01:54:34 +00:00
|
|
|
}:
|
|
|
|
|
2024-03-27 16:21:32 +00:00
|
|
|
renode.overrideAttrs (finalAttrs: _: {
|
2023-12-30 01:54:34 +00:00
|
|
|
pname = "renode-unstable";
|
2024-10-05 17:38:29 +00:00
|
|
|
version = "1.15.3+20241004git4b8a8f170";
|
2023-12-30 01:54:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-08-03 19:31:42 +00:00
|
|
|
url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-dotnet.tar.gz";
|
2024-10-05 17:38:29 +00:00
|
|
|
hash = "sha256-/+fH5DHL/kg4IlJyOlCuOMsUocaBsA8GYvq5iP7Ip+4=";
|
2023-12-30 01:54:34 +00:00
|
|
|
};
|
2024-03-27 16:21:32 +00:00
|
|
|
|
|
|
|
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{}' \
|
2024-08-03 19:31:42 +00:00
|
|
|
| egrep 'renode-${versionRegex}\.linux-dotnet\.tar\.gz' \
|
2024-03-27 16:21:32 +00:00
|
|
|
| head -n1 \
|
2024-08-03 19:31:42 +00:00
|
|
|
| sed -e 's,renode-\(.*\)\.linux-dotnet\.tar\.gz,\1,g'
|
2024-03-27 16:21:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
update-source-version ${finalAttrs.pname} "$latestVersion" \
|
|
|
|
--file=pkgs/by-name/re/${finalAttrs.pname}/package.nix \
|
|
|
|
--system=x86_64-linux
|
|
|
|
'';
|
2023-12-30 01:54:34 +00:00
|
|
|
})
|