packcc: use finalAttrs.finalPackage

This commit is contained in:
Peder Bergebakken Sundt 2024-09-17 03:32:58 +02:00
parent c14bf38c79
commit a1b7dfbc6c

View File

@ -2,21 +2,20 @@
bats, bats,
fetchFromGitHub, fetchFromGitHub,
lib, lib,
packcc,
python3, python3,
stdenv, stdenv,
testers, testers,
uncrustify, uncrustify,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "packcc"; pname = "packcc";
version = "2.0.2"; version = "2.0.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "arithy"; owner = "arithy";
repo = "packcc"; repo = "packcc";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-k1C/thvr/5fYrgu/j8YN3kwXp4k26sC9AhYhYAKQuX0="; hash = "sha256-k1C/thvr/5fYrgu/j8YN3kwXp4k26sC9AhYhYAKQuX0=";
}; };
@ -61,7 +60,7 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
passthru.tests.version = testers.testVersion { package = packcc; }; passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
meta = with lib; { meta = with lib; {
description = "Parser generator for C"; description = "Parser generator for C";
@ -72,10 +71,10 @@ stdenv.mkDerivation rec {
- Supports direct and indirect left-recursive grammar rules. - Supports direct and indirect left-recursive grammar rules.
''; '';
homepage = "https://github.com/arithy/packcc"; homepage = "https://github.com/arithy/packcc";
changelog = "https://github.com/arithy/packcc/releases/tag/${src.rev}"; changelog = "https://github.com/arithy/packcc/releases/tag/${finalAttrs.src.rev}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ azahi ]; maintainers = with maintainers; [ azahi ];
platforms = platforms.unix; platforms = platforms.unix;
mainProgram = "packcc"; mainProgram = "packcc";
}; };
} })