From e9ae22e7d9fc291786fff66cce585356be6132f8 Mon Sep 17 00:00:00 2001 From: Simon Garrelou Date: Fri, 16 Feb 2024 14:15:12 +0100 Subject: Add mht2htmcl --- pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch | 30 ++++++++++++++++ pkgs/mht2htmcl/README.md | 4 +++ pkgs/mht2htmcl/package.nix | 40 ++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch create mode 100644 pkgs/mht2htmcl/README.md create mode 100644 pkgs/mht2htmcl/package.nix (limited to 'pkgs/mht2htmcl') diff --git a/pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch b/pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch new file mode 100644 index 0000000..4441a4b --- /dev/null +++ b/pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch @@ -0,0 +1,30 @@ +diff -ruN a/mht2htmcl.lpi b/mht2htmcl.lpi +--- a/mht2htmcl.lpi 2016-04-05 00:37:14.000000000 +0200 ++++ b/mht2htmcl.lpi 2024-02-16 11:03:22.615248368 +0100 +@@ -30,10 +30,13 @@ + + + +- ++ + + + ++ ++ ++ + + + +diff -ruN a/mht2htmcl.lpr b/mht2htmcl.lpr +--- a/mht2htmcl.lpr 2016-04-07 17:36:48.000000000 +0200 ++++ b/mht2htmcl.lpr 2024-02-16 11:03:42.096651425 +0100 +@@ -29,7 +29,7 @@ + cthreads, + {$ENDIF}{$ENDIF} + Classes, SysUtils, CustApp, constants, languages, mechanism, +- fileutil ++ fileutil, LazUTF8, LazFileUtils + + { you can add units after this }; + diff --git a/pkgs/mht2htmcl/README.md b/pkgs/mht2htmcl/README.md new file mode 100644 index 0000000..9acb3e4 --- /dev/null +++ b/pkgs/mht2htmcl/README.md @@ -0,0 +1,4 @@ +## mht2htmcl - convert Microsoft Packed HTML files to regular loose file HTML + +- Website: https://pgm.bpalanka.com/mht2htm.html +- Built with Lazarus and Pascal diff --git a/pkgs/mht2htmcl/package.nix b/pkgs/mht2htmcl/package.nix new file mode 100644 index 0000000..b9ad176 --- /dev/null +++ b/pkgs/mht2htmcl/package.nix @@ -0,0 +1,40 @@ +{ stdenv +, fetchzip +, lazarus +, fpc +}: +stdenv.mkDerivation { + pname = "mht2htmcl"; + version = "1.8.1.35"; + + src = fetchzip { + # url = "https://sourceforge.net/settings/mirror_choices?projectname=mht2htm&filename=mht2htm/1.8.1%20%2805.apr.2016%29/mht2htmcl-1.8.1.35_07.apr.2016.source.zip&selected=master"; + url = "mirror://sourceforge/mht2htm/mht2htm/1.8.1%20%2805.apr.2016%29/mht2htmcl-1.8.1.35_07.apr.2016.source.zip"; + hash = "sha256-XtUuCR7j6vE6DoVy1crQAjBj6RpG8yl3gOVKgxPQhmM="; + stripRoot = false; + }; + + nativeBuildInputs = [ lazarus fpc ]; + + patches = [ + ./01-fix-current-lazarus-compat.patch + ]; + + buildPhase = '' + runHook preBuild + + lazbuild --lazarusdir=${lazarus}/share/lazarus \ + mht2htmcl.lpi + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp mht2htmcl $out/bin/ + + runHook postInstall + ''; +} -- cgit v1.2.3