about summary refs log tree commit diff
path: root/pkgs/by-name/cl
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/cl')
-rw-r--r--pkgs/by-name/cl/clatd/package.nix63
-rw-r--r--pkgs/by-name/cl/clipcat/package.nix17
2 files changed, 76 insertions, 4 deletions
diff --git a/pkgs/by-name/cl/clatd/package.nix b/pkgs/by-name/cl/clatd/package.nix
new file mode 100644
index 0000000000000..dff8ce4261a93
--- /dev/null
+++ b/pkgs/by-name/cl/clatd/package.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, perl
+, perlPackages
+, tayga
+, iproute2
+, iptables
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clatd";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner = "toreanderson";
+    repo = "clatd";
+    rev = "v${version}";
+    hash = "sha256-ZUGWQTXXgATy539NQxkZSvQA7HIWkIPsw1NJrz0xKEg=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    makeWrapper
+    perl # for pod2man
+  ];
+
+  buildInputs = with perlPackages; [
+    perl
+    NetIP
+    NetDNS
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  preBuild = ''
+    mkdir -p $out/{sbin,share/man/man8}
+  '';
+
+  postFixup = ''
+    patchShebangs $out/bin/clatd
+    wrapProgram $out/bin/clatd \
+      --set PERL5LIB $PERL5LIB \
+      --prefix PATH : ${
+        lib.makeBinPath [
+          tayga
+          iproute2
+          iptables
+        ]
+      }
+  '';
+
+  meta = with lib; {
+    description = "A 464XLAT CLAT implementation for Linux";
+    homepage = "https://github.com/toreanderson/clatd";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jmbaur ];
+    mainProgram = "clatd";
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/by-name/cl/clipcat/package.nix b/pkgs/by-name/cl/clipcat/package.nix
index fdf91c96f8d99..68e6744bd1752 100644
--- a/pkgs/by-name/cl/clipcat/package.nix
+++ b/pkgs/by-name/cl/clipcat/package.nix
@@ -1,25 +1,34 @@
 { lib
+, stdenv
 , fetchFromGitHub
 , rustPlatform
 , protobuf
 , installShellFiles
+, darwin
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "clipcat";
-  version = "0.16.6";
+  version = "0.17.0";
 
   src = fetchFromGitHub {
     owner = "xrelkd";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-FSgBTQGl8LSLdv+SOAgQWLWiqFY+PRQBFYYdbmCttcY=";
+    hash = "sha256-e95h8YBVLcy9vubdJpfmeystT2Qw0Y8kap9IbTJW+s8=";
   };
 
-  cargoHash = "sha256-TrzHmWUDAe4gbwm+VoTOuC50CWWnFsF99zscM85ammo=";
+  cargoHash = "sha256-+73vnGcdCDRMrav/Pi4Z37IlbArJ/SlYishz9KhF4x0=";
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Cocoa
+    darwin.apple_sdk.frameworks.Security
+    darwin.apple_sdk.frameworks.SystemConfiguration
+  ];
 
   nativeBuildInputs = [
     protobuf
+
     installShellFiles
   ];
 
@@ -42,7 +51,7 @@ rustPlatform.buildRustPackage rec {
     description = "Clipboard Manager written in Rust Programming Language";
     homepage = "https://github.com/xrelkd/clipcat";
     license = licenses.gpl3Only;
-    platforms = platforms.linux;
+    platforms = platforms.linux ++ platforms.darwin;
     maintainers = with maintainers; [ xrelkd ];
     mainProgram = "clipcatd";
   };