Files
Guy Chronister d0ff9e414d tclPackages.*: refactor to modern conventions
- Remove 'with lib;' from meta blocks and use qualified lib attributes
  - Replace deprecated 'sha256' with 'hash' for fetchurl and fetchFromGitHub
  - Replace 'rev' with 'tag' when using version tags in fetchFromGitHub
  - Update substituteInPlace to use --replace-fail for better error detection
2025-11-21 14:53:20 +00:00

49 lines
893 B
Nix

{
lib,
fetchFromGitHub,
mkTclDerivation,
tcl,
tcllib,
}:
mkTclDerivation rec {
pname = "critcl";
version = "3.3.1";
src = fetchFromGitHub {
owner = "andreas-kupries";
repo = "critcl";
tag = version;
hash = "sha256-LBTAuwTrvwj42vo/TXVSUK8euxHgvSLai23e1jmhMso=";
};
buildInputs = [
tcl
tcllib
];
dontBuild = true;
doCheck = true;
checkPhase = ''
runHook preInstall
HOME="$(mktemp -d)" tclsh ./build.tcl test
runHook postInstall
'';
installPhase = ''
runHook preInstall
tclsh ./build.tcl install --prefix $out
runHook postInstall
'';
meta = {
description = "Easily embed C code in Tcl";
homepage = "https://andreas-kupries.github.io/critcl/";
license = lib.licenses.tcltk;
mainProgram = "critcl";
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
};
}