diff options
-rw-r--r-- | default.nix | 2 | ||||
-rw-r--r-- | overlay.nix | 2 | ||||
-rw-r--r-- | pkgs/mht2htmcl/01-fix-current-lazarus-compat.patch | 30 | ||||
-rw-r--r-- | pkgs/mht2htmcl/README.md | 4 | ||||
-rw-r--r-- | pkgs/mht2htmcl/package.nix | 40 |
5 files changed, 77 insertions, 1 deletions
diff --git a/default.nix b/default.nix index d537768..225f552 100644 --- a/default.nix +++ b/default.nix | |||
@@ -13,4 +13,6 @@ rec { | |||
13 | commit-mono = pkgs.callPackage ./pkgs/commit-mono/package.nix {}; | 13 | commit-mono = pkgs.callPackage ./pkgs/commit-mono/package.nix {}; |
14 | 14 | ||
15 | idafree = pkgs.callPackage ./pkgs/idafree/package.nix {}; | 15 | idafree = pkgs.callPackage ./pkgs/idafree/package.nix {}; |
16 | |||
17 | mht2htmcl = pkgs.callPackage ./pkgs/mht2htmcl/package.nix {}; | ||
16 | } | 18 | } |
diff --git a/overlay.nix b/overlay.nix index 54e95c9..537b3e6 100644 --- a/overlay.nix +++ b/overlay.nix | |||
@@ -3,5 +3,5 @@ let | |||
3 | simon = prev.callPackage ./. {}; | 3 | simon = prev.callPackage ./. {}; |
4 | in | 4 | in |
5 | { | 5 | { |
6 | inherit (simon) miasm msynth passwdqc sddm-theme-sugar-light senpai-nightly commit-mono; | 6 | inherit (simon) miasm msynth passwdqc sddm-theme-sugar-light senpai-nightly commit-mono mht2htmcl; |
7 | } | 7 | } |
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 @@ | |||
1 | diff -ruN a/mht2htmcl.lpi b/mht2htmcl.lpi | ||
2 | --- a/mht2htmcl.lpi 2016-04-05 00:37:14.000000000 +0200 | ||
3 | +++ b/mht2htmcl.lpi 2024-02-16 11:03:22.615248368 +0100 | ||
4 | @@ -30,10 +30,13 @@ | ||
5 | <CommandLineParams Value=""c:\Radni\programi\mht2htm\command line\*.mht""/> | ||
6 | </local> | ||
7 | </RunParams> | ||
8 | - <RequiredPackages Count="1"> | ||
9 | + <RequiredPackages Count="2"> | ||
10 | <Item1> | ||
11 | <PackageName Value="LCL"/> | ||
12 | </Item1> | ||
13 | + <Item2> | ||
14 | + <PackageName Value="LazUtils"/> | ||
15 | + </Item2> | ||
16 | </RequiredPackages> | ||
17 | <Units Count="5"> | ||
18 | <Unit0> | ||
19 | diff -ruN a/mht2htmcl.lpr b/mht2htmcl.lpr | ||
20 | --- a/mht2htmcl.lpr 2016-04-07 17:36:48.000000000 +0200 | ||
21 | +++ b/mht2htmcl.lpr 2024-02-16 11:03:42.096651425 +0100 | ||
22 | @@ -29,7 +29,7 @@ | ||
23 | cthreads, | ||
24 | {$ENDIF}{$ENDIF} | ||
25 | Classes, SysUtils, CustApp, constants, languages, mechanism, | ||
26 | - fileutil | ||
27 | + fileutil, LazUTF8, LazFileUtils | ||
28 | |||
29 | { you can add units after this }; | ||
30 | |||
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 @@ | |||
1 | ## mht2htmcl - convert Microsoft Packed HTML files to regular loose file HTML | ||
2 | |||
3 | - Website: https://pgm.bpalanka.com/mht2htm.html | ||
4 | - 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 @@ | |||
1 | { stdenv | ||
2 | , fetchzip | ||
3 | , lazarus | ||
4 | , fpc | ||
5 | }: | ||
6 | stdenv.mkDerivation { | ||
7 | pname = "mht2htmcl"; | ||
8 | version = "1.8.1.35"; | ||
9 | |||
10 | src = fetchzip { | ||
11 | # 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"; | ||
12 | url = "mirror://sourceforge/mht2htm/mht2htm/1.8.1%20%2805.apr.2016%29/mht2htmcl-1.8.1.35_07.apr.2016.source.zip"; | ||
13 | hash = "sha256-XtUuCR7j6vE6DoVy1crQAjBj6RpG8yl3gOVKgxPQhmM="; | ||
14 | stripRoot = false; | ||
15 | }; | ||
16 | |||
17 | nativeBuildInputs = [ lazarus fpc ]; | ||
18 | |||
19 | patches = [ | ||
20 | ./01-fix-current-lazarus-compat.patch | ||
21 | ]; | ||
22 | |||
23 | buildPhase = '' | ||
24 | runHook preBuild | ||
25 | |||
26 | lazbuild --lazarusdir=${lazarus}/share/lazarus \ | ||
27 | mht2htmcl.lpi | ||
28 | |||
29 | runHook postBuild | ||
30 | ''; | ||
31 | |||
32 | installPhase = '' | ||
33 | runHook preInstall | ||
34 | |||
35 | mkdir -p $out/bin | ||
36 | cp mht2htmcl $out/bin/ | ||
37 | |||
38 | runHook postInstall | ||
39 | ''; | ||
40 | } | ||