From 5ac19f8437327468c8cb92ec5749d68feb6a4c03 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Wed, 30 Oct 2024 19:01:31 +0800 Subject: [PATCH] _389_ds_base: add passthru.updateScript --- pkgs/by-name/_3/_389_ds_base/package.nix | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/_3/_389_ds_base/package.nix b/pkgs/by-name/_3/_389_ds_base/package.nix index 5dd713e08655..5114d8630e16 100644 --- a/pkgs/by-name/_3/_389_ds_base/package.nix +++ b/pkgs/by-name/_3/_389_ds_base/package.nix @@ -35,23 +35,24 @@ rsync, withCockpit ? true, withAsan ? false, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs:{ pname = "389-ds-base"; version = "2.4.6"; src = fetchFromGitHub { owner = "389ds"; - repo = pname; - rev = "${pname}-${version}"; + repo = "389-ds-base"; + rev = "389-ds-base-${finalAttrs.version}"; hash = "sha256-+FTCzEyQY71TCkj8HMnSkrnQtxjHxOmtYhfZEAYOLis="; }; cargoDeps = rustPlatform.fetchCargoTarball { - inherit src; - sourceRoot = "${src.name}/src"; - name = "${pname}-${version}"; + inherit (finalAttrs) src; + sourceRoot = "${finalAttrs.src.name}/src"; + name = "389-ds-base-${finalAttrs.version}"; hash = "sha256-2Ng268tfbMRU3Uyo5ljSS/HxPnw1abvGjcczo25HyVk="; }; @@ -97,7 +98,7 @@ stdenv.mkDerivation rec { preBuild = '' mkdir -p ./vendor - tar -xzf ${cargoDeps} -C ./vendor --strip-components=1 + tar -xzf ${finalAttrs.cargoDeps} -C ./vendor --strip-components=1 ''; configureFlags = @@ -141,13 +142,15 @@ stdenv.mkDerivation rec { "localstatedir=${placeholder "TMPDIR"}" ]; - passthru.version = version; + passthru.version = finalAttrs.version; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { homepage = "https://www.port389.org/"; description = "Enterprise-class Open Source LDAP server for Linux"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = [ maintainers.ners ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = [ lib.maintainers.ners ]; }; -} +})