about summary refs log tree commit diff stats
path: root/pkgs/by-name/ct
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/ct/ctpv-64-types/allow-up-to-64-types.patch (renamed from pkgs/by-name/ct/ctpv/allow-up-to-64-types.patch)0
-rw-r--r--pkgs/by-name/ct/ctpv-64-types/package.nix15
-rw-r--r--pkgs/by-name/ct/ctpv/package.nix45
3 files changed, 15 insertions, 45 deletions
diff --git a/pkgs/by-name/ct/ctpv/allow-up-to-64-types.patch b/pkgs/by-name/ct/ctpv-64-types/allow-up-to-64-types.patch
index fdecb754..fdecb754 100644
--- a/pkgs/by-name/ct/ctpv/allow-up-to-64-types.patch
+++ b/pkgs/by-name/ct/ctpv-64-types/allow-up-to-64-types.patch
diff --git a/pkgs/by-name/ct/ctpv-64-types/package.nix b/pkgs/by-name/ct/ctpv-64-types/package.nix
new file mode 100644
index 00000000..763b0325
--- /dev/null
+++ b/pkgs/by-name/ct/ctpv-64-types/package.nix
@@ -0,0 +1,15 @@
+{ctpv}:
+ctpv.overrideAttrs (finalAttrs: previousAttrs: {
+  pname = previousAttrs.pname + "-64-types";
+  patches =
+    (previousAttrs.patches or [])
+    ++ [
+      ./allow-up-to-64-types.patch
+    ];
+
+  preFixup = ''
+    wrapProgram $out/bin/ctpv --set PATH "";
+  '';
+
+  meta.mainProgram = "ctpv";
+})
diff --git a/pkgs/by-name/ct/ctpv/package.nix b/pkgs/by-name/ct/ctpv/package.nix
deleted file mode 100644
index 905366bf..00000000
--- a/pkgs/by-name/ct/ctpv/package.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  lib,
-  stdenv,
-  fetchFromGitHub,
-  makeWrapper,
-  file,
-  openssl,
-}:
-stdenv.mkDerivation rec {
-  pname = "ctpv";
-  version = "1.1-unstable-2024-11-24";
-
-  src = fetchFromGitHub {
-    owner = "NikitaIvanovV";
-    repo = pname;
-    rev = "4efa0f976eaf8cb814e0aba4f4f1a1d12ee9262e";
-    hash = "sha256-tFBXCUey1lsNAg1mB0iQjDoH70qL8aytE6h9rhHlBe4=";
-  };
-
-  nativeBuildInputs = [makeWrapper];
-
-  buildInputs = [
-    file # libmagic
-    openssl
-  ];
-
-  patches = [
-    ./allow-up-to-64-types.patch
-  ];
-
-  makeFlags = ["PREFIX=$(out)"];
-
-  preFixup = ''
-    wrapProgram $out/bin/ctpv \
-      --set PATH "${lib.makeBinPath []}";
-  '';
-
-  meta = with lib; {
-    description = "File previewer for a terminal";
-    homepage = "https://github.com/NikitaIvanovV/ctpv";
-    license = licenses.mit;
-    platforms = platforms.linux;
-    maintainers = [maintainers.wesleyjrz];
-  };
-}