diff options
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/code-server/default.nix | 56 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 11 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 12 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/frontend.nix | 7 | ||||
-rwxr-xr-x | pkgs/servers/home-assistant/update.sh | 2 | ||||
-rw-r--r-- | pkgs/servers/sql/patroni/default.nix | 2 |
6 files changed, 69 insertions, 21 deletions
diff --git a/pkgs/servers/code-server/default.nix b/pkgs/servers/code-server/default.nix index c62fc072ecb..60fb8ed5ea5 100644 --- a/pkgs/servers/code-server/default.nix +++ b/pkgs/servers/code-server/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, makeWrapper, runCommand +{ stdenv, fetchFromGitHub, buildGoModule, makeWrapper, runCommand , moreutils, jq, git, zip, rsync, pkgconfig, yarn, python2 , nodejs-12_x, libsecret, xorg, ripgrep, nettools }: @@ -12,17 +12,31 @@ let in stdenv.mkDerivation rec { pname = "code-server"; - version = "3.4.1"; - commit = "d3773c11f147bdd7a4f5acfefdee23c26f069e76"; + version = "3.6.0"; + commit = "a4a03c14922ccaec2a9ff8d1b7b2af8522a4214d"; src = fetchFromGitHub { owner = "cdr"; repo = "code-server"; - rev = version; - sha256 = "PfDD0waloppGZ09zCQ9ggBeVL/Dhfv6QmEs/fs7QLtA="; + rev = "v${version}"; + sha256 = "1c0p1s0bl3az5ysl97mz3gbynyndz6jd2jj7lx2snz6jqqd43y9p"; fetchSubmodules = true; }; + cloudAgent = buildGoModule rec { + pname = "cloud-agent"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "cdr"; + repo = "cloud-agent"; + rev = version; + sha256 = "1p20cvgvs38604km9ixylz0r3k7blkd80lncmma3z05y5n5fqps1"; + }; + + vendorSha256 = "0yky1v1ak3ysykjf3gm1hd7qyj5rm4fw7amga81sb31x0357jlzr"; + }; + yarnCache = stdenv.mkDerivation { name = "${pname}-${version}-${system}-yarn-cache"; inherit src; @@ -45,10 +59,10 @@ in stdenv.mkDerivation rec { outputHashMode = "recursive"; outputHashAlgo = "sha256"; - # to get hash values use nix-build -A code-server.yarnPrefetchCache + # to get hash values use nix-build -A code-server.prefetchYarnCache outputHash = { - x86_64-linux = "Zze2hEm2Np+SyQ0KXy5CZr5wilZbHBYXNYcRJBUUkQo="; - aarch64-linux = "LiIvGuBismWSL2yV2DuKUWDjIzuIQU/VVxtiD4xJ+6Q="; + x86_64-linux = "1443qwkllb714s4qw3b9y1mcc6p2ykgc02pw2k3z2gczvvr0g8qv"; + aarch64-linux = "1443qwkllb714s4qw3b9y1mcc6p2ykgc02pw2k3z2gczvvr0g8qv"; }.${system} or (throw "Unsupported system ${system}"); }; @@ -64,7 +78,7 @@ in stdenv.mkDerivation rec { ]; buildInputs = [ libsecret xorg.libX11 xorg.libxkbfile ]; - patchPhase = '' + postPatch = '' export HOME=$PWD patchShebangs ./ci @@ -76,6 +90,21 @@ in stdenv.mkDerivation rec { substituteInPlace lib/vscode/build/npm/postinstall.js \ --replace '--ignore-optional' '--offline' + # remove unnecessary git config command + substituteInPlace lib/vscode/build/npm/postinstall.js \ + --replace "cp.execSync('git config pull.rebase true');" "" + + # allow offline install for postinstall scripts in extensions + grep -rl "yarn install" --include package.json lib/vscode/extensions \ + | xargs sed -i 's/yarn install/yarn install --offline/g' + + # remove download of coder-cloud agent + sed -i ':a;N;$!ba;s/OS=.*agent//' ci/build/npm-postinstall.sh + + # use offline cache when installing release packages + substituteInPlace ci/build/npm-postinstall.sh \ + --replace 'yarn --production' 'yarn --production --offline' + # fix path to ifconfig, so vscode can get mac address substituteInPlace lib/vscode/src/vs/base/node/macAddress.ts \ --replace '/sbin/ifconfig' '${nettools}/bin/ifconfig' @@ -111,8 +140,14 @@ in stdenv.mkDerivation rec { # set nodedir, so we can build binaries later npm config set nodedir "${nodeSources}" + # link coder-cloud agent from nix store + ln -s "${cloudAgent}/bin/cloud-agent" ./lib/coder-cloud-agent + # skip browser downloads for playwright export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true" + + # skip unnecessary electron download + export ELECTRON_SKIP_BINARY_DOWNLOAD=1 ''; buildPhase = '' @@ -162,6 +197,9 @@ in stdenv.mkDerivation rec { # install only production dependencies yarn --offline --cwd "$out/libexec/code-server" --production + # link coder-cloud agent from nix store + ln -s "${cloudAgent}/bin/cloud-agent" $out/libexec/code-server/lib/coder-cloud-agent + # create wrapper makeWrapper "${nodejs-12_x}/bin/node" "$out/bin/code-server" \ --add-flags "$out/libexec/code-server/out/node/entry.js" diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c60b80e5d7a..220645a0b10 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2020.12.2"; + version = "2021.1.0"; components = { "abode" = ps: with ps; [ abodepy ]; "accuweather" = ps: with ps; [ accuweather ]; @@ -45,7 +45,7 @@ "arcam_fmj" = ps: with ps; [ ]; # missing inputs: arcam-fmj "arduino" = ps: with ps; [ ]; # missing inputs: PyMata "arest" = ps: with ps; [ ]; - "arlo" = ps: with ps; [ ha-ffmpeg ]; # missing inputs: pyarlo + "arlo" = ps: with ps; [ ha-ffmpeg pyarlo ]; "arris_tg2492lg" = ps: with ps; [ ]; # missing inputs: arris-tg2492lg "aruba" = ps: with ps; [ pexpect ]; "arwn" = ps: with ps; [ aiohttp-cors paho-mqtt ]; @@ -60,9 +60,8 @@ "aurora_abb_powerone" = ps: with ps; [ ]; # missing inputs: aurorapy "auth" = ps: with ps; [ aiohttp-cors ]; "automation" = ps: with ps; [ aiohttp-cors ]; - "avea" = ps: with ps; [ ]; # missing inputs: avea + "avea" = ps: with ps; [ avea ]; "avion" = ps: with ps; [ ]; # missing inputs: avion - "avri" = ps: with ps; [ pycountry ]; # missing inputs: avri-api "awair" = ps: with ps; [ ]; # missing inputs: python_awair "aws" = ps: with ps; [ aiobotocore ]; "axis" = ps: with ps; [ aiohttp-cors paho-mqtt ]; # missing inputs: axis @@ -528,7 +527,7 @@ "nad" = ps: with ps; [ ]; # missing inputs: nad_receiver "namecheapdns" = ps: with ps; [ defusedxml ]; "nanoleaf" = ps: with ps; [ pynanoleaf ]; - "neato" = ps: with ps; [ pybotvac ]; + "neato" = ps: with ps; [ aiohttp-cors pybotvac ]; "nederlandse_spoorwegen" = ps: with ps; [ ]; # missing inputs: nsapi "nello" = ps: with ps; [ ]; # missing inputs: pynello "ness_alarm" = ps: with ps; [ ]; # missing inputs: nessclient @@ -624,7 +623,7 @@ "plex" = ps: with ps; [ aiohttp-cors plexapi plexauth plexwebsocket pysonos ]; "plugwise" = ps: with ps; [ ]; # missing inputs: plugwise "plum_lightpad" = ps: with ps; [ ]; # missing inputs: plumlightpad - "pocketcasts" = ps: with ps; [ ]; # missing inputs: pocketcasts + "pocketcasts" = ps: with ps; [ ]; # missing inputs: pycketcasts "point" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pypoint "poolsense" = ps: with ps; [ ]; # missing inputs: poolsense "powerwall" = ps: with ps; [ ]; # missing inputs: tesla-powerwall diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 68d11e85fd2..4f9698c536f 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -62,7 +62,7 @@ let extraBuildInputs = extraPackages py.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2020.12.2"; + hassVersion = "2021.1.0"; in with py.pkgs; buildPythonApplication rec { pname = "homeassistant"; @@ -71,6 +71,9 @@ in with py.pkgs; buildPythonApplication rec { # check REQUIRED_PYTHON_VER in homeassistant/const.py disabled = pythonOlder "3.7.1"; + # don't try and fail to strip 6600+ python files, it takes minutes! + dontStrip = true; + inherit availableComponents; # PyPI tarball is missing tests/ directory @@ -78,7 +81,7 @@ in with py.pkgs; buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - sha256 = "1hd3z0bvscrg0ihy26djm1x9cj1pkdbnsgpzhdy42j8vy80q9bxr"; + sha256 = "14njb2j16h536xq5df4zpna874fxjcd6fqr881y6mq081f00i0r0"; }; # leave this in, so users don't have to constantly update their downstream patch handling @@ -176,6 +179,11 @@ in with py.pkgs; buildPythonApplication rec { "test_cached_event_message" # ValueError: count must be a positive integer (got 0) "test_media_view" + # AssertionError: len(events) == 1 + "test_error_posted_as_event" + # keyring.errors.NoKeyringError: No recommended backend was available. + "test_secrets_from_unrelated_fails" + "test_secrets_credstash" ]; preCheck = '' diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index 36f89dc0069..9606f8645a1 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -4,13 +4,16 @@ buildPythonPackage rec { # the frontend version corresponding to a specific home-assistant version can be found here # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json pname = "home-assistant-frontend"; - version = "20201212.0"; + version = "20201229.1"; src = fetchPypi { inherit pname version; - sha256 = "1nz5f7bpj0xs740af8i6j33idff6yzx7z9vydlah2sxcdgpwmz84"; + sha256 = "sha256-3JMWugAiVDq/NBgX8ft2Bchim2g493jy7wZvvXrX+Ws="; }; + # there is nothing to strip in this package + dontStrip = true; + # no Python tests implemented doCheck = false; diff --git a/pkgs/servers/home-assistant/update.sh b/pkgs/servers/home-assistant/update.sh index 11189cf3577..e80b7acbed0 100755 --- a/pkgs/servers/home-assistant/update.sh +++ b/pkgs/servers/home-assistant/update.sh @@ -31,4 +31,4 @@ sed -i -e "s/hassVersion =.*/hassVersion = \"${TARGET_VERSION}\";/" \ ) git add ./component-packages.nix ./default.nix ./frontend.nix -git commit -m "homeassistant: ${CURRENT_VERSION} -> ${TARGET_VERSION}" +git commit -m "home-assistant: ${CURRENT_VERSION} -> ${TARGET_VERSION}" diff --git a/pkgs/servers/sql/patroni/default.nix b/pkgs/servers/sql/patroni/default.nix index bd06aa2ff7d..682dbe45f7d 100644 --- a/pkgs/servers/sql/patroni/default.nix +++ b/pkgs/servers/sql/patroni/default.nix @@ -52,6 +52,6 @@ pythonPackages.buildPythonApplication rec { description = "A Template for PostgreSQL HA with ZooKeeper, etcd or Consul"; license = licenses.mit; platforms = platforms.linux; - maintainers = [ maintainers.limeytexan ]; + maintainers = teams.deshaw.members; }; } |