yaak: added darwin support; fix version (#409672)

authored by Aleksana and committed by GitHub a9a7f9af fd2e9003

+40 -19
+40 -19
pkgs/by-name/ya/yaak/package.nix
··· 19 perl, 20 makeWrapper, 21 nix-update-script, 22 }: 23 24 rustPlatform.buildRustPackage (finalAttrs: { ··· 54 makeWrapper 55 ]; 56 57 - buildInputs = [ 58 - glib 59 - gtk3 60 - openssl 61 - webkitgtk_4_1 62 - pango 63 - cairo 64 - pixman 65 - ]; 66 67 env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; 68 69 postPatch = '' 70 substituteInPlace src-tauri/tauri.conf.json \ 71 - --replace-fail '"createUpdaterArtifacts": "v1Compatible"' '"createUpdaterArtifacts": false' 72 substituteInPlace package.json \ 73 --replace-fail '"bootstrap:vendor-node": "node scripts/vendor-node.cjs",' "" \ 74 --replace-fail '"bootstrap:vendor-protoc": "node scripts/vendor-protoc.cjs",' "" 75 ''; 76 77 - preBuild = '' 78 - mkdir -p src-tauri/vendored/node 79 - ln -s ${nodejs}/bin/node src-tauri/vendored/node/yaaknode-x86_64-unknown-linux-gnu 80 - mkdir -p src-tauri/vendored/protoc 81 - ln -s ${protobuf}/bin/protoc src-tauri/vendored/protoc/yaakprotoc-x86_64-unknown-linux-gnu 82 - ln -s ${protobuf}/include src-tauri/vendored/protoc/include 83 - ''; 84 85 # Permission denied (os error 13) 86 # write to src-tauri/vendored/protoc/include ··· 90 91 postInstall = "popd"; 92 93 - postFixup = '' 94 wrapProgram $out/bin/yaak-app \ 95 --inherit-argv0 \ 96 --set-default WEBKIT_DISABLE_DMABUF_RENDERER 1 ··· 105 license = lib.licenses.mit; 106 maintainers = with lib.maintainers; [ redyf ]; 107 mainProgram = "yaak"; 108 - platforms = [ "x86_64-linux" ]; 109 }; 110 })
··· 19 perl, 20 makeWrapper, 21 nix-update-script, 22 + stdenv, 23 }: 24 25 rustPlatform.buildRustPackage (finalAttrs: { ··· 55 makeWrapper 56 ]; 57 58 + buildInputs = 59 + [ 60 + glib 61 + gtk3 62 + openssl 63 + pango 64 + cairo 65 + pixman 66 + ] 67 + ++ lib.optionals stdenv.hostPlatform.isLinux [ 68 + webkitgtk_4_1 69 + ]; 70 71 env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; 72 73 postPatch = '' 74 substituteInPlace src-tauri/tauri.conf.json \ 75 + --replace-fail '"createUpdaterArtifacts": "v1Compatible"' '"createUpdaterArtifacts": false' \ 76 + --replace-fail '"0.0.0"' '"${finalAttrs.version}"' 77 substituteInPlace package.json \ 78 --replace-fail '"bootstrap:vendor-node": "node scripts/vendor-node.cjs",' "" \ 79 --replace-fail '"bootstrap:vendor-protoc": "node scripts/vendor-protoc.cjs",' "" 80 ''; 81 82 + preBuild = 83 + let 84 + archPlatforms = 85 + { 86 + "aarch64-darwin" = "aarch64-apple-darwin"; 87 + "x86_64-darwin" = "x86_64-apple-darwin"; 88 + "aarch64-linux" = "aarch64-unknown-linux-gnu"; 89 + "x86_64-linux" = "x86_64-unknown-linux-gnu"; 90 + } 91 + .${stdenv.hostPlatform.system}; 92 + in 93 + '' 94 + mkdir -p src-tauri/vendored/node 95 + ln -s ${nodejs}/bin/node src-tauri/vendored/node/yaaknode-${archPlatforms} 96 + mkdir -p src-tauri/vendored/protoc 97 + ln -s ${protobuf}/bin/protoc src-tauri/vendored/protoc/yaakprotoc-${archPlatforms} 98 + ln -s ${protobuf}/include src-tauri/vendored/protoc/include 99 + ''; 100 101 # Permission denied (os error 13) 102 # write to src-tauri/vendored/protoc/include ··· 106 107 postInstall = "popd"; 108 109 + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' 110 wrapProgram $out/bin/yaak-app \ 111 --inherit-argv0 \ 112 --set-default WEBKIT_DISABLE_DMABUF_RENDERER 1 ··· 121 license = lib.licenses.mit; 122 maintainers = with lib.maintainers; [ redyf ]; 123 mainProgram = "yaak"; 124 + platforms = [ 125 + "x86_64-linux" 126 + "aarch64-linux" 127 + "x86_64-darwin" 128 + "aarch64-darwin" 129 + ]; 130 }; 131 })