about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorMostly Void <7rat13@gmail.com>2022-12-31 00:03:39 +0530
committerMostly Void <7rat13@gmail.com>2023-01-06 20:22:42 +0530
commit2e59fd5ffc1a15f5a71d1593a8969f9608edca0b (patch)
tree89da9b6b597fc5c182f193df91c4f066814cd841 /pkgs/applications/graphics
parentcc1bb678f4205ad1c4db34c20b4327cb2cc89a93 (diff)
oculante: init at 0.6.38
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/oculante/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/oculante/default.nix b/pkgs/applications/graphics/oculante/default.nix
new file mode 100644
index 0000000000000..65300df69048c
--- /dev/null
+++ b/pkgs/applications/graphics/oculante/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, cmake
+, pkg-config
+, openssl
+, fontconfig
+, nasm
+, libX11
+, libXcursor
+, libXrandr
+, libXi
+, libGL
+, stdenv
+, gtk3
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "oculante";
+  version = "0.6.38";
+
+  src = fetchFromGitHub {
+    owner = "woelper";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-0msPeW0FoBzHBDfX2iFH4HzAknaGPNThuCLi2vhdK08=";
+  };
+
+  cargoSha256 = "sha256-eKRn8MC4/jjPRoajhwrtXsa8n9bGO5MAKjDuwHWs7Oc=";
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    nasm
+  ];
+
+  checkFlagsArray = [ "--skip=tests::net" ]; # requires network access
+
+  buildInputs = [
+    openssl
+    fontconfig
+  ] ++ lib.optionals stdenv.isLinux [
+    libX11
+    libXcursor
+    libXi
+    libXrandr
+    libGL
+    gtk3
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.libobjc
+  ];
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    patchelf $out/bin/oculante --add-rpath ${lib.makeLibraryPath [ libGL ]}
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A minimalistic crossplatform image viewer written in Rust";
+    homepage = "https://github.com/woelper/oculante";
+    changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dit7ya ];
+  };
+}