diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2021-01-01 09:46:26 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 09:46:26 -0300 |
commit | c868414fcf290e98b2a5e167388a3db1fe54d5e9 (patch) | |
tree | effa16b76b46f4f9ea92ffa4afaa897273f6fa47 | |
parent | 9fbcb14780cab86d7beb4b7798cb78fa078b5b45 (diff) | |
parent | b4a9a5ad71e728c2254228cb75b79b96b4ec5aed (diff) | |
download | nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar.gz nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar.bz2 nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar.lz nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar.xz nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.tar.zst nixlib-c868414fcf290e98b2a5e167388a3db1fe54d5e9.zip |
Merge pull request #107831 from magnetophon/emulsion
emulsion: init at 7.2
-rw-r--r-- | pkgs/applications/graphics/emulsion/default.nix | 85 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 89 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/emulsion/default.nix b/pkgs/applications/graphics/emulsion/default.nix new file mode 100644 index 000000000000..ba7ebfcfdff6 --- /dev/null +++ b/pkgs/applications/graphics/emulsion/default.nix @@ -0,0 +1,85 @@ +{ stdenv +, lib +, fetchFromGitHub +, rustPlatform +, installShellFiles +, makeWrapper +, pkg-config +, python3 +, libGL +, libX11 +, libXcursor +, libXi +, libXrandr +, libXxf86vm +, libxcb +, libxkbcommon +, wayland +, xdg_utils +, AppKit +, CoreGraphics +, CoreServices +, Foundation +, OpenGL +}: +let + rpathLibs = [ + libGL + libX11 + libXcursor + libXi + libXrandr + libXxf86vm + libxcb + ] ++ lib.optionals stdenv.isLinux [ + libxkbcommon + wayland + ]; +in +rustPlatform.buildRustPackage rec { + pname = "emulsion"; + version = "7.2"; + + src = fetchFromGitHub { + owner = "ArturKovacs"; + repo = pname; + rev = "v${version}"; + sha256 = "1king04p5j4gsvprrfppwaxa5jn4ga4nc0v63wl6fvq2ngwnkg4g"; + }; + + cargoSha256 = "19vb2q5w3063l7349p1b8q40n97a4hxdvc7h7qsx1iiwp75knbd0"; + + nativeBuildInputs = [ + installShellFiles + makeWrapper + pkg-config + python3 + ]; + + buildInputs = rpathLibs ++ lib.optionals stdenv.isDarwin [ + AppKit + CoreGraphics + CoreServices + Foundation + OpenGL + ]; + + installPhase = '' + runHook preInstall + install -D $releaseDir/emulsion $out/bin/emulsion + '' + lib.optionalString stdenv.isLinux '' + patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion + '' + '' + runHook postInstall + ''; + + dontPatchELF = true; + + meta = with lib; { + description = "A fast and minimalistic image viewer"; + homepage = "https://arturkovacs.github.io/emulsion-website/"; + maintainers = [ maintainers.magnetophon ]; + platforms = platforms.unix; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1aa7de51af69..0fc29503fa41 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3765,6 +3765,10 @@ in emem = callPackage ../applications/misc/emem { }; + emulsion = callPackage ../applications/graphics/emulsion { + inherit (darwin.apple_sdk.frameworks) AppKit CoreGraphics CoreServices Foundation OpenGL; + }; + emv = callPackage ../tools/misc/emv { }; enblend-enfuse = callPackage ../tools/graphics/enblend-enfuse { }; |