nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.2 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 pkg-config, 6 fontconfig, 7 wayland, 8 libxkbcommon, 9 libglvnd, 10 versionCheckHook, 11 nix-update-script, 12}: 13 14rustPlatform.buildRustPackage (finalAttrs: { 15 pname = "miro"; 16 version = "0.7.3"; 17 18 src = fetchFromGitHub { 19 owner = "vincent-uden"; 20 repo = "miro"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-HSI6sAXy+PtZdla2GMuWFwoClUIf3E4rc3NHh7Wz1BE="; 23 }; 24 25 cargoHash = "sha256-yYpHB7LwGxBy5r16vzXflqaygJmibEV4XteD0BV0HoA="; 26 27 nativeBuildInputs = [ 28 rustPlatform.bindgenHook 29 pkg-config 30 ]; 31 32 buildInputs = [ 33 wayland 34 fontconfig 35 libxkbcommon 36 libglvnd 37 ]; 38 39 env.RUSTFLAGS = toString ( 40 map (a: "-C link-arg=${a}") [ 41 "-Wl,--push-state,--no-as-needed" 42 "-lEGL" 43 "-lwayland-client" 44 "-lxkbcommon" 45 "-Wl,--pop-state" 46 ] 47 ); 48 49 doInstallCheck = true; 50 nativeInstallCheckInputs = [ versionCheckHook ]; 51 52 passthru.updateScript = nix-update-script { }; 53 54 meta = { 55 description = "Native PDF viewer (Wayland/X11) with configurable keybindings"; 56 homepage = "https://github.com/vincent-uden/miro"; 57 license = lib.licenses.agpl3Only; 58 maintainers = with lib.maintainers; [ yiyu ]; 59 mainProgram = "miro-pdf"; 60 }; 61})