museum: switch to finalAttrs and add passthru test
This commit is contained in:
@@ -5,9 +5,10 @@
|
||||
libsodium,
|
||||
buildGoModule,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "museum";
|
||||
version = "1.2.4";
|
||||
|
||||
@@ -15,13 +16,13 @@ buildGoModule rec {
|
||||
owner = "ente-io";
|
||||
repo = "ente";
|
||||
sparseCheckout = [ "server" ];
|
||||
tag = "photos-v${version}";
|
||||
tag = "photos-v${finalAttrs.version}";
|
||||
hash = "sha256-2kcIXnQPNB6V8ElTxoAETFCSyIIOGme15pYVXNLPlAg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-px4pMqeH73Fe06va4+n6hklIUDMbPmAQNKKRIhwv6ec=";
|
||||
|
||||
sourceRoot = "${src.name}/server";
|
||||
sourceRoot = "${finalAttrs.src.name}/server";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
@@ -42,21 +43,26 @@ buildGoModule rec {
|
||||
$out/share/museum
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"photos-v(.*)"
|
||||
];
|
||||
passthru = {
|
||||
tests.ente = nixosTests.ente;
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"photos-v(.*)"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "API server for ente.io";
|
||||
homepage = "https://github.com/ente-io/ente/tree/main/server";
|
||||
changelog = "https://github.com/ente-io/ente/releases/tag/photos-v${finalAttrs.version}";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
pinpox
|
||||
oddlama
|
||||
];
|
||||
mainProgram = "museum";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user