From 958cc373f5bb99674f3a4a21255c8186c6a33836 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 29 Jul 2023 06:27:17 +0000 Subject: [PATCH 1/2] p4c: 1.2.4.0 -> 1.2.4.1 --- pkgs/development/compilers/p4c/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/p4c/default.nix b/pkgs/development/compilers/p4c/default.nix index 5c27ac26d6cb..dfc97c6703c8 100644 --- a/pkgs/development/compilers/p4c/default.nix +++ b/pkgs/development/compilers/p4c/default.nix @@ -27,13 +27,13 @@ let in stdenv.mkDerivation rec { pname = "p4c"; - version = "1.2.4.0"; + version = "1.2.4.1"; src = fetchFromGitHub { owner = "p4lang"; repo = "p4c"; rev = "v${version}"; - sha256 = "sha256-nIPvB6nwa55dKNeoNRrjhnnmoYLYTviaoL79+hT6gGs="; + sha256 = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw="; fetchSubmodules = true; }; From a45519d09c2067c226eef65491f0433d1761a6a1 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 29 Jul 2023 13:02:22 +0200 Subject: [PATCH 2/2] p4c: use `finalAttrs` pattern --- pkgs/development/compilers/p4c/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/p4c/default.nix b/pkgs/development/compilers/p4c/default.nix index dfc97c6703c8..99ec78c6ecee 100644 --- a/pkgs/development/compilers/p4c/default.nix +++ b/pkgs/development/compilers/p4c/default.nix @@ -25,15 +25,15 @@ let toCMakeBoolean = v: if v then "ON" else "OFF"; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "p4c"; version = "1.2.4.1"; src = fetchFromGitHub { owner = "p4lang"; repo = "p4c"; - rev = "v${version}"; - sha256 = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw="; + rev = "v${finalAttrs.version}"; + hash = "sha256-Whdryz1Gt0ymE7cj+mI95lW3Io9yBvLqcWa04gu5zEw="; fetchSubmodules = true; }; @@ -78,12 +78,12 @@ stdenv.mkDerivation rec { python3 ]; - meta = with lib; { - homepage = "https://github.com/p4lang/p4c"; + meta = { changelog = "https://github.com/p4lang/p4c/releases"; description = "Reference compiler for the P4 programming language"; - platforms = platforms.linux; - maintainers = with maintainers; [ raitobezarius govanify ]; - license = licenses.asl20; + homepage = "https://github.com/p4lang/p4c"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ raitobezarius govanify ]; + platforms = lib.platforms.linux; }; -} +})