mir: Drop custom updateScript
We can *kinda* hack together gitUpdater to do what we need... Not that pretty though.
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user