nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 rustPlatform, 6 installShellFiles, 7 makeWrapper, 8 pkg-config, 9 python3, 10 libGL, 11 libX11, 12 libXcursor, 13 libXi, 14 libXrandr, 15 libXxf86vm, 16 libxcb, 17 libxkbcommon, 18 wayland, 19}: 20let 21 rpathLibs = [ 22 libGL 23 libX11 24 libXcursor 25 libXi 26 libXrandr 27 libXxf86vm 28 libxcb 29 ] 30 ++ lib.optionals stdenv.hostPlatform.isLinux [ 31 libxkbcommon 32 wayland 33 ]; 34in 35rustPlatform.buildRustPackage rec { 36 pname = "emulsion"; 37 version = "11.0"; 38 39 src = fetchFromGitHub { 40 owner = "ArturKovacs"; 41 repo = "emulsion"; 42 rev = "v${version}"; 43 sha256 = "sha256-0t+MUZu1cvkJSL9Ly9kblH8fMr05KuRpOo+JDn/VUc8="; 44 }; 45 46 cargoHash = "sha256-1s5kCUxn4t1A40QHuygGKaqphLmcl+EYfx++RZQmL00="; 47 48 nativeBuildInputs = [ 49 installShellFiles 50 makeWrapper 51 pkg-config 52 python3 53 ]; 54 55 buildInputs = rpathLibs; 56 57 postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' 58 patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion 59 ''; 60 61 meta = { 62 description = "Fast and minimalistic image viewer"; 63 homepage = "https://arturkovacs.github.io/emulsion-website/"; 64 maintainers = [ lib.maintainers.magnetophon ]; 65 platforms = lib.platforms.unix; 66 license = lib.licenses.mit; 67 mainProgram = "emulsion"; 68 }; 69}