git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107831 from magnetophon/emulsion

emulsion: init at 7.2

commitc868414fcf290e98b2a5e167388a3db1fe54d5e9 authorAnderson Torres <torres.anderson.85@protonmail.com> dateFri 1 Jan 2021, 09:46 (6 years ago) parent9fbcb14b4a9a5a
2 files changed+89
pkgs/applications/graphics/emulsion/default.nix+85 pkgs/top-level/all-packages.nix+4
pkgs/applications/graphics/emulsion/default.nixnew file+85
@@ -0,0 +1,85 @@
1+{ stdenv
2+, lib
3+, fetchFromGitHub
4+, rustPlatform
5+, installShellFiles
6+, makeWrapper
7+, pkg-config
8+, python3
9+, libGL
10+, libX11
11+, libXcursor
12+, libXi
13+, libXrandr
14+, libXxf86vm
15+, libxcb
16+, libxkbcommon
17+, wayland
18+, xdg_utils
19+, AppKit
20+, CoreGraphics
21+, CoreServices
22+, Foundation
23+, OpenGL
24+}:
25+let
26+ rpathLibs = [
27+ libGL
28+ libX11
29+ libXcursor
30+ libXi
31+ libXrandr
32+ libXxf86vm
33+ libxcb
34+ ] ++ lib.optionals stdenv.isLinux [
35+ libxkbcommon
36+ wayland
37+ ];
38+in
39+rustPlatform.buildRustPackage rec {
40+ pname = "emulsion";
41+ version = "7.2";
42+
43+ src = fetchFromGitHub {
44+ owner = "ArturKovacs";
45+ repo = pname;
46+ rev = "v${version}";
47+ sha256 = "1king04p5j4gsvprrfppwaxa5jn4ga4nc0v63wl6fvq2ngwnkg4g";
48+ };
49+
50+ cargoSha256 = "19vb2q5w3063l7349p1b8q40n97a4hxdvc7h7qsx1iiwp75knbd0";
51+
52+ nativeBuildInputs = [
53+ installShellFiles
54+ makeWrapper
55+ pkg-config
56+ python3
57+ ];
58+
59+ buildInputs = rpathLibs ++ lib.optionals stdenv.isDarwin [
60+ AppKit
61+ CoreGraphics
62+ CoreServices
63+ Foundation
64+ OpenGL
65+ ];
66+
67+ installPhase = ''
68+ runHook preInstall
69+ install -D $releaseDir/emulsion $out/bin/emulsion
70+ '' + lib.optionalString stdenv.isLinux ''
71+ patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion
72+ '' + ''
73+ runHook postInstall
74+ '';
75+
76+ dontPatchELF = true;
77+
78+ meta = with lib; {
79+ description = "A fast and minimalistic image viewer";
80+ homepage = "https://arturkovacs.github.io/emulsion-website/";
81+ maintainers = [ maintainers.magnetophon ];
82+ platforms = platforms.unix;
83+ license = licenses.mit;
84+ };
85+}
pkgs/top-level/all-packages.nix+4
@@ -3765,6 +3765,10 @@ in
37653765
37663766 emem = callPackage ../applications/misc/emem { };
37673767
3768+ emulsion = callPackage ../applications/graphics/emulsion {
3769+ inherit (darwin.apple_sdk.frameworks) AppKit CoreGraphics CoreServices Foundation OpenGL;
3770+ };
3771+
37683772 emv = callPackage ../tools/misc/emv { };
37693773
37703774 enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { };