File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,9 +108,12 @@ jobs:
108108 - name : Check if nix files changed
109109 if : github.event_name == 'pull_request'
110110 id : nix-files
111+ env :
112+ GH_TOKEN : ${{ github.token }}
111113 run : |
112- git fetch origin ${{ github.base_ref }} --depth=1
113- if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qE '^(flake\.(nix|lock)|\.nix/|bun\.lock|src-tauri/(Cargo\.(toml|lock)|tauri\.conf\.json|build\.rs))'; then
114+ if gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files \
115+ --paginate --jq '.[].filename' | \
116+ grep -qE '^(flake\.(nix|lock)|\.nix/|bun\.lock|src-tauri/(Cargo\.(toml|lock)|tauri\.conf\.json|build\.rs))'; then
114117 echo "changed=true" >> "$GITHUB_OUTPUT"
115118 fi
116119
Original file line number Diff line number Diff line change 6767 GST_PLUGIN_SYSTEM_PATH_1_0 = "${ lib . makeSearchPathOutput "lib" "lib/gstreamer-1.0" ( gstPlugins pkgs ) } " ;
6868 } ;
6969
70- # TODO: Remove this overlay once nixpkgs ships onnxruntime ≥ 1.24.
71- # Tracking PR: https://github.com/NixOS/nixpkgs/pull/499389
72- # ort-sys 2.0.0-rc.12 requires ONNX Runtime 1.24 (API v24);
73- # nixpkgs only ships 1.23.2, so use MS prebuilt binaries.
74- onnxruntimeOverlay = ( final : prev : {
75- onnxruntime = let
76- onnxVersion = "1.24.2" ;
77- platform = {
78- x86_64-linux = { name = "linux-x64" ; hash = "sha256-Q3JUdLpWY2QuF2hHF5Rmk4UOIAXvvXJKxy2ieP6tJeY=" ; } ;
79- aarch64-linux = { name = "linux-aarch64" ; hash = "sha256-spla8PQ3xOAi/YAcV/tcJf0f5mDNM9JutHGUSQpbRsQ=" ; } ;
80- } . ${ final . system } ;
81- in prev . stdenv . mkDerivation {
82- pname = "onnxruntime" ;
83- version = onnxVersion ;
84- src = prev . fetchurl {
85- url = "https://github.com/microsoft/onnxruntime/releases/download/v${ onnxVersion } /onnxruntime-${ platform . name } -${ onnxVersion } .tgz" ;
86- hash = platform . hash ;
87- } ;
88- sourceRoot = "onnxruntime-${ platform . name } -${ onnxVersion } " ;
89- nativeBuildInputs = [ prev . autoPatchelfHook ] ;
90- buildInputs = [ prev . stdenv . cc . cc . lib ] ;
91- installPhase = ''
92- runHook preInstall
93- mkdir -p $out/lib $out/include
94- cp -r lib/* $out/lib/
95- cp -r include/* $out/include/
96- runHook postInstall
97- '' ;
98- meta = prev . onnxruntime . meta // {
99- description = "ONNX Runtime ${ onnxVersion } (prebuilt by Microsoft)" ;
100- } ;
101- } ;
102- } ) ;
10370 in
10471 {
10572 packages = forAllSystems (
10976 inherit system ;
11077 overlays = [
11178 bun2nix . overlays . default
112- onnxruntimeOverlay
11379 ] ;
11480 } ;
11581 lib = pkgs . lib ;
257223 let
258224 pkgs = import nixpkgs {
259225 inherit system ;
260- overlays = [ onnxruntimeOverlay ] ;
261226 } ;
262227 in
263228 {
You can’t perform that action at this time.
0 commit comments