From 5dc84589bb4d0e2b61195ea4d173b08088c361a0 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Mon, 8 Dec 2025 02:45:55 +0800 Subject: [PATCH] chameleos: init at 0.1.2 --- pkgs/by-name/ch/chameleos/package.nix | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pkgs/by-name/ch/chameleos/package.nix diff --git a/pkgs/by-name/ch/chameleos/package.nix b/pkgs/by-name/ch/chameleos/package.nix new file mode 100644 index 000000000000..d22b623afff9 --- /dev/null +++ b/pkgs/by-name/ch/chameleos/package.nix @@ -0,0 +1,60 @@ +{ + lib, + makeWrapper, + rustPlatform, + fetchFromGitHub, + pkg-config, + wayland, + wayland-protocols, + libGL, + vulkan-loader, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "chameleos"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "Treeniks"; + repo = "chameleos"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zCAYEtDYJm9A+HC9M2XLtz47q+6dcBOVPgh4lmp4z/k="; + }; + + cargoHash = "sha256-zBEu/T17W7dwz8jxnXm2NsHaVZo1wDFSW75yiYfRIoY="; + + postPatch = '' + substituteInPlace build.rs --replace-fail '"git"' '"echo"' + ''; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + buildInputs = [ + wayland + wayland-protocols + libGL + vulkan-loader + ]; + + postInstall = '' + wrapProgram $out/bin/chameleos \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + libGL + vulkan-loader + ] + } + ''; + + meta = { + description = "Screen annotation tool for niri and Hyprland"; + homepage = "https://github.com/Treeniks/chameleos"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ lonerOrz ]; + mainProgram = "chameleos"; + }; +})