From e6e1808c6984fa2f102dd387ebce1076a20b4669 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Wed, 26 Feb 2025 11:23:46 +0100 Subject: [PATCH 1/3] positron-bin: fixed update script --- pkgs/by-name/po/positron-bin/update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/po/positron-bin/update.sh b/pkgs/by-name/po/positron-bin/update.sh index a024b382ec96..3e3966a356e9 100755 --- a/pkgs/by-name/po/positron-bin/update.sh +++ b/pkgs/by-name/po/positron-bin/update.sh @@ -18,22 +18,22 @@ fi # Update Darwin hash. current_hash=$(nix store prefetch-file --json --hash-type sha256 \ - "https://github.com/posit-dev/positron/releases/download/${current_version}/Positron-${current_version}.dmg" \ + "https://cdn.posit.co/positron/dailies/mac/universal/Positron-${current_version}.dmg" \ | jq -r .hash) new_hash=$(nix store prefetch-file --json --hash-type sha256 \ - "https://github.com/posit-dev/positron/releases/download/${new_version}/Positron-${new_version}.dmg" \ + "https://cdn.posit.co/positron/dailies/mac/universal/Positron-${new_version}.dmg" \ | jq -r .hash) sed -i "s|$current_hash|$new_hash|g" $positron_nix # Update Linux hash. current_hash=$(nix store prefetch-file --json --hash-type sha256 \ - "https://github.com/posit-dev/positron/releases/download/${current_version}/Positron-${current_version}-x64.deb" \ + "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${current_version}-x64.deb" \ | jq -r .hash) new_hash=$(nix store prefetch-file --json --hash-type sha256 \ - "https://github.com/posit-dev/positron/releases/download/${new_version}/Positron-${new_version}-x64.deb" \ + "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${new_version}-x64.deb" \ | jq -r .hash) sed -i "s|$current_hash|$new_hash|g" $positron_nix From 98495214f9763296c0be73b21d8341db8b2cf52d Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Wed, 26 Feb 2025 11:27:56 +0100 Subject: [PATCH 2/3] positron-bin: 2025.02.0-171 -> 2025.04.0-64 --- pkgs/by-name/po/positron-bin/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/po/positron-bin/package.nix b/pkgs/by-name/po/positron-bin/package.nix index e06e1c8e3f96..92139dbfa021 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.02.0-171"; + version = "2025.04.0-64"; in stdenv.mkDerivation { inherit version pname; @@ -30,13 +30,13 @@ stdenv.mkDerivation { src = if stdenv.hostPlatform.isDarwin then fetchurl { - url = "https://github.com/posit-dev/positron/releases/download/${version}/Positron-${version}.dmg"; - hash = "sha256-b5o1+UXt5JAuHkm1K1jrMLV+7PHfKJTOff4aTk8xm2I="; + url = "https://cdn.posit.co/positron/dailies/mac/universal/Positron-${version}.dmg"; + hash = "sha256-MmLc2YFmWIcmsRp4swKYJdQHAWfSIsW23D5ZLfyb4b4="; } else fetchurl { - url = "https://github.com/posit-dev/positron/releases/download/${version}/Positron-${version}-x64.deb"; - hash = "sha256-TjQc/Y4Sa2MlLslbygYVFbIk3raArMvYstSiSEYzfo0="; + url = "https://cdn.posit.co/positron/dailies/deb/x86_64/Positron-${version}-x64.deb"; + hash = "sha256-d1HjnMGpKg68EW0wXWvgXL0VEepn1vFJWuAN0HD2IPs="; }; buildInputs = From d7e5704dee184b3bda2fa86b9b4e745584fa225a Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Wed, 26 Feb 2025 20:58:45 +0100 Subject: [PATCH 3/3] positron-bin: disable automatic updates --- pkgs/by-name/po/positron-bin/package.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/po/positron-bin/package.nix b/pkgs/by-name/po/positron-bin/package.nix index 92139dbfa021..86d3647a9cbd 100644 --- a/pkgs/by-name/po/positron-bin/package.nix +++ b/pkgs/by-name/po/positron-bin/package.nix @@ -85,7 +85,8 @@ stdenv.mkDerivation { # Positron will use the system version of BLAS if we don't provide the nix version. wrapProgram "$out/Applications/Positron.app/Contents/Resources/app/bin/code" \ - --prefix DYLD_INSERT_LIBRARIES : "${lib.makeLibraryPath [ blas ]}/libblas.dylib" + --prefix DYLD_INSERT_LIBRARIES : "${lib.makeLibraryPath [ blas ]}/libblas.dylib" \ + --add-flags "--disable-updates" ln -s "$out/Applications/Positron.app/Contents/Resources/app/bin/code" "$out/bin/positron" runHook postInstall @@ -112,7 +113,9 @@ stdenv.mkDerivation { # Fix libGL.so not found errors. wrapProgram "$out/share/positron/positron" \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libglvnd ]}" + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libglvnd ]}" \ + --add-flags "--disable-updates" + mkdir -p "$out/bin" ln -s "$out/share/positron/positron" "$out/bin/positron"