p4c: use finalAttrs pattern

This commit is contained in:
Pol Dellaiera 2023-07-29 13:02:22 +02:00
parent 958cc373f5
commit a45519d09c
No known key found for this signature in database
GPG key ID: D476DFE9C67467CA

View file

@ -25,15 +25,15 @@
let let
toCMakeBoolean = v: if v then "ON" else "OFF"; toCMakeBoolean = v: if v then "ON" else "OFF";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "p4c"; pname = "p4c";
version = "1.2.4.1"; version = "1.2.4.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "p4lang"; owner = "p4lang";
repo = "p4c"; repo = "p4c";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw="; hash = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -78,12 +78,12 @@ stdenv.mkDerivation rec {
python3 python3
]; ];
meta = with lib; { meta = {
homepage = "https://github.com/p4lang/p4c";
changelog = "https://github.com/p4lang/p4c/releases"; changelog = "https://github.com/p4lang/p4c/releases";
description = "Reference compiler for the P4 programming language"; description = "Reference compiler for the P4 programming language";
platforms = platforms.linux; homepage = "https://github.com/p4lang/p4c";
maintainers = with maintainers; [ raitobezarius govanify ]; license = lib.licenses.asl20;
license = licenses.asl20; maintainers = with lib.maintainers; [ raitobezarius govanify ];
platforms = lib.platforms.linux;
}; };
} })