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
code-server: 3.6.0 -> 3.8.0 #110652
code-server: 3.6.0 -> 3.8.0 #110652
Conversation
14c2695
to
af19299
Compare
5804fab
to
9650850
Compare
@dguenther yes, definitely interested, thanks for pushing for 3.8.0! |
pkgs/servers/code-server/default.nix
Outdated
@@ -1,6 +1,6 @@ | |||
{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper, runCommand | |||
, moreutils, jq, git, zip, rsync, pkg-config, yarn, python2 | |||
, nodejs-12_x, libsecret, xorg, ripgrep, nettools }: | |||
, nodejs-12_x, libsecret, xorg, ripgrep, darwin}: |
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.
Please do not input darwin directly but inherit the frameworks and packages you need.
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.
Definitely, would you mind sharing an example of how to make it work? I'm pretty new to building packages on Darwin. When I did the following, then ran nix-build ~/repos/nixpkgs -A code-server
, it errored with error: anonymous function at /Users/derek/repos/nixpkgs/pkgs/servers/code-server/default.nix:1:1 called without required argument 'AppKit'
.
, nodejs-12_x, libsecret, xorg, ripgrep, darwin}: | |
, nodejs-12_x, libsecret, xorg, ripgrep, AppKit, Cocoa, Security, cctools}: |
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.
You need to add the following between the two {} in the call Package call in all-packages:
inherit (darwin.apple_sdk.frameworks AppKit
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.
Never mind, I think I got it 🤦 Rebuilding to test now, then will push up an update
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.
This has been updated now, thanks for the help!
9650850
to
330f0c5
Compare
pkgs/servers/code-server/default.nix
Outdated
@@ -220,6 +230,6 @@ in stdenv.mkDerivation rec { | |||
homepage = "https://github.com/cdr/code-server"; | |||
license = licenses.mit; | |||
maintainers = with maintainers; [ offline ]; | |||
platforms = ["x86_64-linux"]; | |||
platforms = [ "x86_64-linux" "x86_64-darwin" ]; |
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.
aarch64 is missing in platforms
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.
👍 It looks like aarch64 hasn't been in platforms
so far. I'll try adding it, but if the build fails, I may take out aarch64
from the yarn package hashes, since I don't currently have a way to work on aarch64
packages.
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.
Looks like it built successfully, excellent
@@ -129,6 +130,9 @@ in stdenv.mkDerivation rec { | |||
''; | |||
|
|||
configurePhase = '' | |||
# run yarn offline by default | |||
echo '--install.offline true' >> .yarnrc |
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.
can you use yarn config set
here?
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.
As far as I can tell, this flag is only available in .yarnrc
, not in the config -- I tried using yarn config set
instead, but it seemed to have no effect.
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.
ok
330f0c5
to
907fe96
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.
looks good to me
pkgs/servers/code-server/default.nix
Outdated
}; | ||
|
||
cloudAgent = buildGoModule rec { | ||
pname = "cloud-agent"; | ||
version = "0.1.0"; | ||
version = "0.2.1"; | ||
commit = "5beac91dd5feab9c745d58fda8118a0efaa1ef74"; |
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.
Why do we need this? I seems to be unused.
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.
👍 Deleted this
pkgs/servers/code-server/default.nix
Outdated
] | ||
; |
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.
] | |
; | |
]; |
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.
Fixed
6fbf227
to
c841fa4
Compare
Squashed the commits down, thanks all for the review! |
This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 1 package built:
|
Motivation for this change
Updates code-server to 3.8.0.
3.8.0 removes the need to run VSCode patches and fetch submodules, which simplifies the script a bit.
I added support for Darwin, tested on macOS 10.15.7 -- It required patching the install scripts of a few packages that aren't needed at runtime. I used
patch
for this rather thansed
because it seemed easier to review the changes, but let me know if one or the other is preferred and I can switch it out if necessary.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)