donkey: use finalAttrs.finalPackage

This commit is contained in:
Peder Bergebakken Sundt 2024-09-17 03:32:56 +02:00
parent 82ada5c114
commit 57002b84d2

View File

@ -4,20 +4,19 @@
, coreutils , coreutils
, lib , lib
, testers , testers
, donkey
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "donkey"; pname = "donkey";
version = "1.2.0"; version = "1.2.0";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "donkey"; owner = "donkey";
repo = "donkey"; repo = "donkey";
rev = "tags/release/${version}"; rev = "tags/release/${finalAttrs.version}";
hash = "sha256-2xgb9l0Eko39HJVROAWEIP3qLg5t/5h/rm2MoXoKnJI="; hash = "sha256-2xgb9l0Eko39HJVROAWEIP3qLg5t/5h/rm2MoXoKnJI=";
}; };
sourceRoot = "${src.name}/src"; sourceRoot = "${finalAttrs.src.name}/src";
buildInputs = [ libmd ]; buildInputs = [ libmd ];
@ -27,7 +26,7 @@ stdenv.mkDerivation rec {
export INSTALL_DATA="${coreutils}/bin/install -m 444" export INSTALL_DATA="${coreutils}/bin/install -m 444"
''; '';
passthru.tests.version = testers.testVersion { package = donkey; }; passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
meta = with lib; { meta = with lib; {
description = "Alternative for S/KEY's 'key' command"; description = "Alternative for S/KEY's 'key' command";
@ -51,4 +50,4 @@ The name "Donkey" is an acronym of "Don't Key".
maintainers = with maintainers; [ raboof ]; maintainers = with maintainers; [ raboof ];
platforms = platforms.all; platforms = platforms.all;
}; };
} })