Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 16, 2024
2 parents edb0803 + a31f38a commit f80693a
Show file tree
Hide file tree
Showing 100 changed files with 1,323 additions and 610 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24515,6 +24515,12 @@
github = "peterablehmann";
githubId = 36541313;
};
xiaoxiangmoe = {
name = "ZHAO JinXiang";
email = "[email protected]";
github = "xiaoxiangmoe";
githubId = 8111351;
};
xinyangli = {
email = "[email protected]";
matrix = "@me:xinyang.life";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/tageditor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

stdenv.mkDerivation rec {
pname = "tageditor";
version = "3.9.3";
version = "3.9.4";

src = fetchFromGitHub {
owner = "martchus";
repo = pname;
rev = "v${version}";
hash = "sha256-KAtOnTf3foOILDfTjVpkCOG6jsyS5fv0/Wv9Zcut2oE=";
hash = "sha256-VRQV4bTPG4VFhRHFJamUnYd04ZCaNpaxU27Jcl6Chc4=";
};

nativeBuildInputs = [
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/editors/vscode/extensions/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3246,8 +3246,8 @@ let
mktplcRef = {
name = "compare-folders";
publisher = "moshfeu";
version = "0.24.3";
hash = "sha256-eaumF2BIqEYoyL7LQ0Wx3+gkkFGpWKQoN3AisI8wTQY=";
version = "0.25.1";
hash = "sha256-axNTdnSkMkFs7LSZCc7VinjbrDncsRHlRtDG9+eh2qQ=";
};

meta = {
Expand Down Expand Up @@ -5333,8 +5333,8 @@ let
mktplcRef = {
name = "vscode-icons";
publisher = "vscode-icons-team";
version = "12.9.0";
hash = "sha256-ULjZlbGcVbPiokfnx7d4z7cmVVEfy2d+SUch80rZRA4=";
version = "12.10.0";
hash = "sha256-GNDLuszuJN3P0V25F4gm7yUJsFEQgFMMPMTFLWLIvSo=";
};
meta = {
description = "Bring real icons to your Visual Studio Code";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/qutebrowser/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let
stripRoot = false;
};

version = "3.3.1";
version = "3.4.0";
in

python3.pkgs.buildPythonApplication {
Expand All @@ -46,7 +46,7 @@ python3.pkgs.buildPythonApplication {

src = fetchurl {
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/qutebrowser-${version}.tar.gz";
hash = "sha256-qttkrMxzC8mhXONByaBYCx82OD7Uh09U0xzh2r6U4Xo=";
hash = "sha256-gUEkwO0zdDDmE6HaNm1eOJBMsgSa+xUFlxRWylymIj4=";
};

# Needs tox
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/helm/plugins/helm-dt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
}:
buildGoModule rec {
pname = "helm-dt";
version = "0.4.1";
version = "0.4.3";

src = fetchFromGitHub {
owner = "vmware-labs";
repo = "distribution-tooling-for-helm";
rev = "refs/tags/v${version}";
hash = "sha256-KrQAlB0ORNzKIG2vxych3gVBytTh3Hhnjsyn1ia1ZQM=";
hash = "sha256-m+XTR+LYTXeDTqo/deFAIQjbUqGn6yD/n5cQvJ+jKPc=";
};

vendorHash = "sha256-T8Kk+9NAhYOvSq94HOEE53BT7Xh9tU1gJ420o/tiVEo=";
vendorHash = "sha256-rovAY4G4ew6JhehyXMz7cDKSEsHu0IQwaNYvClDog2s=";

ldflags = [
"-s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage {
inherit version src;
sourceRoot = "${src.name}/coolercontrol-ui/src-tauri";

cargoHash = "sha256-nS67ABuI2/C08X+TWWoOx7bptIPF1fsvBC1Ucoky1/4=";
cargoHash = "sha256-gjR54dZjVonyznfBGb3iNNdmPalE+a53MmkOEZj3+sY=";

buildFeatures = [ "custom-protocol" ];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildNpmPackage {
inherit version src;
sourceRoot = "${src.name}/coolercontrol-ui";

npmDepsHash = "sha256-j+bGOGIG9H/1z0dN8BfvWSi6gPvYmCV7l0ZNH8h3yeU=";
npmDepsHash = "sha256-t+QShKaXpQuEzeeu/ljBBEzeYsxqvMpx5waDZ2gyPAI=";

preBuild = ''
autoPatchelf node_modules/sass-embedded-linux-x64/dart-sass/src/dart
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/system/coolercontrol/coolercontrold.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage {
sourceRoot = "${src.name}/coolercontrold";

useFetchCargoVendor = true;
cargoHash = "sha256-ZAjaegUgNkKygXqskyeUkWpcqi1Jt7pE8GtqWlaP6/I=";
cargoHash = "sha256-5gqtSZs/unFobEl1MHec2uhGDrWnO6ITlYbB78VasZg=";

buildInputs = [ libdrm ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/system/coolercontrol/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}:

let
version = "1.4.4";
version = "1.4.5";

src = fetchFromGitLab {
owner = "coolercontrol";
repo = "coolercontrol";
rev = version;
hash = "sha256-9l10X4uDv3KJz582QQMhqh38bwDtQVHm9HdAVNC6Kfg=";
hash = "sha256-lRw5IcSrLM6aUajt2Ny1IUuGYcAjY1oUDZENyz0wVJI=";
};

meta = {
Expand Down
32 changes: 8 additions & 24 deletions pkgs/build-support/node/fetch-npm-deps/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use anyhow::bail;
use backoff::{retry, ExponentialBackoff};
use data_encoding::BASE64;
use digest::Digest;
use isahc::{
config::{CaCertificate, Configurable, RedirectPolicy, SslOption},
Body, Request, RequestExt,
};
use log::info;
use nix_nar::{Encoder, NarError};
use serde_json::{Map, Value};
use sha2::Sha256;
Expand All @@ -17,7 +15,7 @@ use std::{
};
use url::Url;

pub fn get_url(url: &Url) -> Result<Body, anyhow::Error> {
pub fn get_url(url: &Url) -> Result<Body, isahc::Error> {
let mut request = Request::get(url.as_str()).redirect_policy(RedirectPolicy::Limit(10));

// Respect SSL_CERT_FILE if environment variable exists
Expand All @@ -39,27 +37,16 @@ pub fn get_url(url: &Url) -> Result<Body, anyhow::Error> {
if let Ok(npm_tokens) = env::var("NIX_NPM_TOKENS") {
if let Ok(tokens) = serde_json::from_str::<Map<String, Value>>(&npm_tokens) {
if let Some(token) = tokens.get(host).and_then(serde_json::Value::as_str) {
info!("Found NPM token for {}. Adding authorization header to request.", host);
request = request.header("Authorization", format!("Bearer {token}"));
}
}
}
}

let res = request.body(())?.send()?;
if !res.status().is_success() {
if res.status().is_client_error() {
bail!("Client error: {}", res.status());
}
if res.status().is_server_error() {
bail!("Server error: {}", res.status());
}
bail!("{}", res.status());
}
Ok(res.into_body())
Ok(request.body(())?.send()?.into_body())
}

pub fn get_url_body_with_retry(url: &Url) -> Result<Vec<u8>, anyhow::Error> {
pub fn get_url_body_with_retry(url: &Url) -> Result<Vec<u8>, isahc::Error> {
retry(ExponentialBackoff::default(), || {
get_url(url)
.and_then(|mut body| {
Expand All @@ -69,15 +56,12 @@ pub fn get_url_body_with_retry(url: &Url) -> Result<Vec<u8>, anyhow::Error> {

Ok(buf)
})
.map_err(|err| match err.downcast_ref::<isahc::Error>() {
Some(isahc_err) => {
if isahc_err.is_network() || isahc_err.is_timeout() {
backoff::Error::transient(err)
} else {
backoff::Error::permanent(err)
}
.map_err(|err| {
if err.is_network() || err.is_timeout() {
backoff::Error::transient(err)
} else {
backoff::Error::permanent(err)
}
None => backoff::Error::permanent(err),
})
})
.map_err(|backoff_err| match backoff_err {
Expand Down
144 changes: 144 additions & 0 deletions pkgs/by-name/af/affine-bin/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
copyDesktopItems,
electron,
fetchFromGitHub,
fetchurl,
lib,
makeDesktopItem,
makeWrapper,
stdenvNoCC,
unzip,
buildType ? "stable",
commandLineArgs ? "",
}:
let
hostPlatform = stdenvNoCC.hostPlatform;
nodePlatform = hostPlatform.parsed.kernel.name; # nodejs's `process.platform`
nodeArch = # nodejs's `process.arch`
{
"x86_64" = "x64";
"aarch64" = "arm64";
}
.${hostPlatform.parsed.cpu.name}
or (throw "affine-bin(${buildType}): unsupported CPU family ${hostPlatform.parsed.cpu.name}");
in
stdenvNoCC.mkDerivation (
finalAttrs:
(
{
# https://github.com/toeverything/AFFiNE/releases/tag/v0.18.1
version = "0.18.1";
githubSourceCode = fetchFromGitHub {
owner = "toeverything";
repo = "AFFiNE";
rev = "8b066a4b398aace25a20508a8e3c1a381721971f";
hash = "sha256-TWwojG3lqQlQFX3BKoFjJ27a3T/SawXgNDO6fP6gW4k=";
};
productName = if buildType == "stable" then "AFFiNE" else "AFFiNE-" + buildType;
binName = lib.toLower finalAttrs.productName;
pname = "${finalAttrs.binName}-bin";
meta =
{
description = "Workspace with fully merged docs, whiteboards and databases";
longDescription = ''
AFFiNE is an open-source, all-in-one workspace and an operating
system for all the building blocks that assemble your knowledge
base and much more -- wiki, knowledge management, presentation
and digital assets
'';
homepage = "https://affine.pro/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
richar
redyf
xiaoxiangmoe
];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
}
// lib.optionalAttrs hostPlatform.isLinux {
mainProgram = finalAttrs.binName;
};

src = (
let
inherit (finalAttrs) version;
affinePrebuiltBinariesHashes = {
darwin-arm64 = "I8lOO97MNLkha0utWPAP4EKv9HiPMWpLi2ibvXjzjhdl7abgSPmMKbv1dGHxMzgMzGbDzhzKqzhYtJI+0Asfzw==";
darwin-x64 = "LZdd7yHJx9Hx0Po8NQgeDp0BhIyXGr0QsbF6bWP5pS08c4fdtE9UzNPfJGfzz/snTkWfKMQZop0Ea4fYGosr1Q==";
linux-x64 = "+impaFLuvcfpj4QjHwjZ06+fUpsxxRlk4eWO6+E4xkBMrV43gwZGeSeAw2pMgXogRGb/Oy6XUoA7o8tTQt9J6A==";
};
platform = if hostPlatform.isLinux then "linux" else "macos";
in
fetchurl {
# example: https://github.com/toeverything/AFFiNE/releases/download/v0.18.1/affine-0.18.1-stable-darwin-arm64.zip
url = "https://github.com/toeverything/AFFiNE/releases/download/v${version}/affine-${version}-${buildType}-${platform}-${nodeArch}.zip";
sha512 = affinePrebuiltBinariesHashes."${nodePlatform}-${nodeArch}";
}
);

nativeBuildInputs =
[
unzip
]
++ lib.optionals hostPlatform.isLinux [
copyDesktopItems
makeWrapper
];

installPhase =
let
inherit (finalAttrs) binName productName;
in
if hostPlatform.isDarwin then
''
runHook preInstall
mkdir -p $out/Applications
cd ..
mv ${productName}.app $out/Applications
runHook postInstall
''
else
''
runHook preInstall
mkdir --parents $out/lib/${binName}/
mv ./{resources,LICENSE*} $out/lib/${binName}/
install -Dm644 "${finalAttrs.githubSourceCode}/packages/frontend/apps/electron/resources/icons/icon_${buildType}_64x64.png" $out/share/icons/hicolor/64x64/apps/${binName}.png
makeWrapper "${electron}/bin/electron" $out/bin/${binName} \
--inherit-argv0 \
--add-flags $out/lib/${binName}/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}
runHook postInstall
'';
}
// lib.optionalAttrs hostPlatform.isLinux {
desktopItems =
let
inherit (finalAttrs) binName productName;
in
[
(makeDesktopItem {
name = binName;
desktopName = productName;
comment = "AFFiNE Desktop App";
exec = "${binName} %U";
terminal = false;
icon = binName;
startupWMClass = binName;
categories = [ "Utility" ];
mimeTypes = [ "x-scheme-handler/${binName}" ];
})
];
}
)
)
Loading

0 comments on commit f80693a

Please sign in to comment.