From b506721d1213b9dfd0409bf44e4a799252eec6c3 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Wed, 28 May 2025 08:07:59 +0200 Subject: [PATCH 1/2] positron-bin: add aarch64-linux platform --- pkgs/by-name/po/positron-bin/package.nix | 10 +++++++++- pkgs/by-name/po/positron-bin/update.sh | 25 ++++++++++++------------ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/po/positron-bin/package.nix b/pkgs/by-name/po/positron-bin/package.nix index dded8d345ea4..ac8ca6889b2d 100644 --- a/pkgs/by-name/po/positron-bin/package.nix +++ b/pkgs/by-name/po/positron-bin/package.nix @@ -33,6 +33,11 @@ stdenv.mkDerivation { url = "https://cdn.posit.co/positron/dailies/mac/universal/Positron-${version}.dmg"; hash = "sha256-dmRYKysQJYrNWyGvH9DsNIC0tIHYNix7QWagVtuGx1g="; } + else if stdenv.hostPlatform.system == "aarch64-linux" then + fetchurl { + url = "https://cdn.posit.co/positron/dailies/deb/arm64/Positron-${version}-arm64.deb"; + hash = "sha256-RPSQONl6Oj9UgFD2EIqGcbiCtuNJug1I+xaKiWeOyls="; + } else fetchurl { url = "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${version}-x64.deb"; @@ -133,6 +138,9 @@ stdenv.mkDerivation { detroyejr ]; mainProgram = "positron"; - platforms = [ "x86_64-linux" ] ++ platforms.darwin; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ] ++ platforms.darwin; }; } diff --git a/pkgs/by-name/po/positron-bin/update.sh b/pkgs/by-name/po/positron-bin/update.sh index 3e3966a356e9..76c16930fc01 100755 --- a/pkgs/by-name/po/positron-bin/update.sh +++ b/pkgs/by-name/po/positron-bin/update.sh @@ -27,7 +27,7 @@ new_hash=$(nix store prefetch-file --json --hash-type sha256 \ sed -i "s|$current_hash|$new_hash|g" $positron_nix -# Update Linux hash. +# Update Linux x86_64 hash. current_hash=$(nix store prefetch-file --json --hash-type sha256 \ "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${current_version}-x64.deb" \ | jq -r .hash) @@ -38,17 +38,16 @@ new_hash=$(nix store prefetch-file --json --hash-type sha256 \ sed -i "s|$current_hash|$new_hash|g" $positron_nix +# Update Linux aarch64 hash. +current_hash=$(nix store prefetch-file --json --hash-type sha256 \ + "https://cdn.posit.co/positron/dailies/deb/arm64/Positron-${current_version}-arm64.deb" \ + | jq -r .hash) + +new_hash=$(nix store prefetch-file --json --hash-type sha256 \ + "https://cdn.posit.co/positron/dailies/deb/arm64/Positron-${new_version}-arm64.deb" \ + | jq -r .hash) + +sed -i "s|$current_hash|$new_hash|g" $positron_nix + # Update version sed -i "s|$current_version|$new_version|g" $positron_nix - -# Attempt to build. -export NIXPKGS_ALLOW_UNFREE=1 - -if ! nix-build -A positron-bin "$nixpkgs"; then - echo "The updated positron-bin failed to build." - exit 1 -fi - -# Commit changes -git add "$positron_nix" -git commit -m "positron-bin: ${current_version} -> ${new_version}" From cb0b6d57a584b0f6cafed12d6e7cb199ae9a7a22 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Wed, 28 May 2025 08:36:09 +0200 Subject: [PATCH 2/2] positron-bin:2025.05.0-75 -> 2025.06.0-146 --- pkgs/by-name/po/positron-bin/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/po/positron-bin/package.nix b/pkgs/by-name/po/positron-bin/package.nix index ac8ca6889b2d..b165b93dac47 100644 --- a/pkgs/by-name/po/positron-bin/package.nix +++ b/pkgs/by-name/po/positron-bin/package.nix @@ -22,7 +22,7 @@ }: let pname = "positron-bin"; - version = "2025.05.0-75"; + version = "2025.06.0-146"; in stdenv.mkDerivation { inherit version pname; @@ -31,17 +31,17 @@ stdenv.mkDerivation { if stdenv.hostPlatform.isDarwin then fetchurl { url = "https://cdn.posit.co/positron/dailies/mac/universal/Positron-${version}.dmg"; - hash = "sha256-dmRYKysQJYrNWyGvH9DsNIC0tIHYNix7QWagVtuGx1g="; + hash = "sha256-V9ADtOskxEbGZryXD/6aiUDeTvqPzoY372f/Vo5195s="; } else if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl { url = "https://cdn.posit.co/positron/dailies/deb/arm64/Positron-${version}-arm64.deb"; - hash = "sha256-RPSQONl6Oj9UgFD2EIqGcbiCtuNJug1I+xaKiWeOyls="; + hash = "sha256-FiCTF5Bmfp4id9HXuB4luSGT9A7OoquaRW/QIh0A3ZY="; } else fetchurl { url = "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${version}-x64.deb"; - hash = "sha256-dmJrDE3g44aoCsVBvSDDFLt38uIqxzaXPBhcmu/U5Oo="; + hash = "sha256-FnNoLV9uqgUeumYpHtRJuHrFA6mL65KI4jru7Ebq0/o="; }; buildInputs =