2024-01-02 11:29:13 +00:00
|
|
|
{ renode
|
|
|
|
, fetchurl
|
2024-04-21 15:54:59 +00:00
|
|
|
, writeScript
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
renode.overrideAttrs (finalAttrs: _: {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "renode-unstable";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.15.1+20240627git66a08265a";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-portable.tar.gz";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-Np/+QydZ+temEOCPI4K+PHScCQBYeFPZ2pOlFLWYXmA=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +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{}' \
|
|
|
|
| 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
|
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
})
|