commit 62b697cfc30ee1a0dbd57d925d30e1976c4d0f84
parent 31ca90d9f7898bd8ea94238dff8129414529b178
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sat, 8 Jan 2022 03:17:35 +0300
Add qoiview
Diffstat:
2 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -288,6 +288,7 @@ lib.makeScope newScope (
ptunnel = callPackage ./misc/ptunnel { };
pvs-studio = callPackage ./misc/pvs-studio { };
qasync = callPackage ./misc/qasync { };
+ qoiview = callPackage ./misc/qoiview { };
repolocli = callPackage ./misc/repolocli { };
sdorfehs = callPackage ./misc/sdorfehs { };
taskcoach = callPackage ./misc/taskcoach { };
diff --git a/pkgs/misc/qoiview/default.nix b/pkgs/misc/qoiview/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, cmake, xorg, libglvnd }:
+
+stdenv.mkDerivation rec {
+ pname = "qoiview";
+ version = "2021-12-22";
+
+ src = fetchFromGitHub {
+ owner = "floooh";
+ repo = pname;
+ rev = "ccc7ae1fa1b80716f243115d3855aba7a49aa6b8";
+ hash = "sha256-8QIDEBlzUSKPdOhmzbSwhfgy/A2QceWeinIQQe3J7h4=";
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ NIX_CFLAGS_COMPILE = lib.optionals stdenv.isLinux (with xorg; [
+ "-I${libX11.dev}/include"
+ "-I${xorgproto}/include"
+ "-I${libXi.dev}/include"
+ "-I${libXext.dev}/include"
+ "-I${libXfixes.dev}/include"
+ "-I${libXcursor.dev}/include"
+ "-I${libglvnd.dev}/include"
+ ]);
+
+ NIX_LDFLAGS = lib.optionals stdenv.isLinux (with xorg; [
+ "-L${libX11}/lib"
+ "-L${libXi}/lib"
+ "-L${libXcursor}/lib"
+ "-L${libglvnd}/lib"
+ ]);
+
+ installPhase = ''
+ install -Dm755 qoiview -t $out/bin
+ '';
+
+ meta = with lib; {
+ description = "QOI image viewer on top of the Sokol headers";
+ inherit (src.meta) homepage;
+ license = licenses.free;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.linux;
+ skip.ci = stdenv.isDarwin;
+ };
+}