-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
positron-bin: 2024.11.0-116 -> 2025.02.0-137 #373551
positron-bin: 2024.11.0-116 -> 2025.02.0-137 #373551
Conversation
f89fba7
to
30e620c
Compare
|
30e620c
to
f54da43
Compare
|
f54da43
to
9c5696c
Compare
cb35c3c
to
9c5696c
Compare
9c5696c
to
c8a7c8f
Compare
Hi! I tried to overlay this PR on top of nixos-unstable but I get this error when switching: I am not well-versed in nix (learning!) so I would be grateful for any pointers. Or is this a NixOS-specific problem? EDIT: this is the relevant config I wrote:
|
I'm unsure the best way to pull a PR directly into a nix configuration. Maybe someone else has a good solution for that. I would either checkout the PR with { lib, config, pkgs, ... }:
{
options = {
positron.enable = lib.mkEnableOption "positron IDE";
};
config = lib.mkIf config.positron.enable {
home.packages = with pkgs; [
(positron-bin.overrideAttrs(attrs: {
src = fetchurl {
url = "https://github.com/posit-dev/positron/releases/download/2025.02.0-137/Positron-2025.02.0-137-x64.deb";
hash = "sha256-Q4dDx4c3nNjoZPtoIkVAlisGShqtz4pIKXVh+5fngaI=";
};
installPhase = ''
runHook preInstall
mkdir -p "$out/share"
cp -r usr/share/pixmaps "$out/share/pixmaps"
cp -r usr/share/positron "$out/share/positron"
mkdir -p "$out/share/applications"
install -m 444 -D usr/share/applications/positron.desktop "$out/share/applications/positron.desktop"
substituteInPlace "$out/share/applications/positron.desktop" \
--replace-fail \
"Icon=co.posit.positron" \
"Icon=$out/share/pixmaps/co.posit.positron.png" \
--replace-fail \
"Exec=/usr/share/positron/positron %F" \
"Exec=$out/share/positron/.positron-wrapped %F" \
--replace-fail \
"/usr/share/positron/positron --new-window %F" \
"$out/share/positron/.positron-wrapped --new-window %F"
# Fix libGL.so not found errors.
wrapProgram "$out/share/positron/positron" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libglvnd ]}"
mkdir -p "$out/bin"
ln -s "$out/share/positron/positron" "$out/bin/positron"
runHook postInstall
'';
}))
];
};
} Edit: an easier way to run this would be:
|
@detroyejr both options work really well thank you! Yeah I find the methods of overlaying PRs on nixpkgs quite tricky. Once again thanks for helping out. Everything is working smoothly both directly through NixOS config/home manager as well as inside a devenv project. |
c8a7c8f
to
bb9f954
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed today that I can't save files in the editor on NixOS. Instead of opening up a file browser pop-up, the program crashes with the error: "No GSettings schemas are installed on the system." The fix seems to be just to add wrapGAppsHook
to nativeBuildInputs
.
diff --git a/pkgs/by-name/po/positron-bin/package.nix b/pkgs/by-name/po/positron-bin/package.nix
index 0e4b9f0a1283..ccf62f2e88a3 100644
--- a/pkgs/by-name/po/positron-bin/package.nix
+++ b/pkgs/by-name/po/positron-bin/package.nix
@@ -17,6 +17,7 @@
patchelf,
stdenv,
systemd,
+ wrapGAppsHook,
xorg,
}:
let
@@ -64,6 +65,7 @@ stdenv.mkDerivation {
lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
dpkg
+ wrapGAppsHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
_7zz
bb9f954
to
920f50d
Compare
thanks, done! |
920f50d
to
9fbfaf5
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/2255 |
The bin suffix should be removed |
Here's why we included the suffix previously:
But, I'm fine with making that change. |
Does that really apply? Why do we need a binary build if we have a source build? Also we have meta.sourceProvenance to lets people know if binaries are build from source or binaries. |
I had to change the update script because the url got changed.
fyi @detroyejr
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.