From abdc3e66bccd751fa76e9cd4b3cf1b68876961e2 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 25 Nov 2025 09:54:26 -0800 Subject: [PATCH] cdktf-cli: fix version Why === * `cdktf-cli --version` returned '0.0.0' What changed === * Run align-version like they do in the github actions release to get the version right * Add versionCheckHook to avoid regressions Test plan === ``` [~/p/nixpkgs]$ ./result/bin/cdktf --version 0.21.0 ``` --- pkgs/by-name/cd/cdktf-cli/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/cd/cdktf-cli/package.nix b/pkgs/by-name/cd/cdktf-cli/package.nix index cb7372dc5d76..307a09748376 100644 --- a/pkgs/by-name/cd/cdktf-cli/package.nix +++ b/pkgs/by-name/cd/cdktf-cli/package.nix @@ -14,6 +14,7 @@ removeReferencesTo, testers, yarn, + versionCheckHook, }: stdenv.mkDerivation (finalAttrs: { @@ -101,6 +102,8 @@ stdenv.mkDerivation (finalAttrs: { buildPhase = '' runHook preBuild + bash ./tools/align-version.sh + faketty yarn --offline build runHook postBuild @@ -139,6 +142,9 @@ stdenv.mkDerivation (finalAttrs: { "$out/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2json/main.wasm" ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + passthru = { tests.version = testers.testVersion { package = finalAttrs.finalPackage;