mir: Drop custom updateScript

We can *kinda* hack together gitUpdater to do what we need... Not that pretty though.
This commit is contained in:
OPNA2608
2025-12-21 22:19:04 +01:00
parent 2cbe3a443f
commit 8a13ab5e01
2 changed files with 26 additions and 9 deletions
+26 -1
View File
@@ -2,7 +2,10 @@
stdenv,
rustPlatform,
lib,
common-updater-scripts,
fetchFromGitHub,
genericUpdater,
gitUpdater,
nixosTests,
testers,
cargo,
@@ -245,7 +248,29 @@ stdenv.mkDerivation (
"mir-shell"
];
}
// lib.optionalAttrs (!pinned) { updateScript = ./update.sh; };
// lib.optionalAttrs (!pinned) {
updateScript =
let
cusWithFlag = common-updater-scripts.overrideAttrs (oa: {
# Have to double-wrap it...
installPhase = oa.installPhase + ''
wrapProgram $out/bin/update-source-version \
--add-flag '--file=${lib.strings.removeSuffix "/common.nix" __curPos.file}/default.nix'
'';
});
in
# Attrs to update are in default.nix
(gitUpdater.override {
common-updater-scripts = cusWithFlag;
genericUpdater = genericUpdater.override {
common-updater-scripts = cusWithFlag;
};
})
{
rev-prefix = "v";
ignoredVersions = "-(dev|rc)$";
};
};
meta = {
description = "Display server and Wayland compositor developed by Canonical";
-8
View File
@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused jq common-updater-scripts
set -eou pipefail
version="$(curl --silent "https://api.github.com/repos/canonical/mir/tags" | jq '.[0].name' --raw-output)"
update-source-version mir "${version:1}" --file=./pkgs/servers/mir/default.nix