Merge branch 'master' into staging-next

This commit is contained in:
Weijia Wang
2023-10-14 00:22:03 +02:00
19 changed files with 184 additions and 96 deletions
+1 -1
View File
@@ -424,7 +424,7 @@ in {
ksm = handleTest ./ksm.nix {};
kthxbye = handleTest ./kthxbye.nix {};
kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {};
kubo = runTest ./kubo.nix;
kubo = import ./kubo { inherit recurseIntoAttrs runTest; };
ladybird = handleTest ./ladybird.nix {};
languagetool = handleTest ./languagetool.nix {};
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
+5
View File
@@ -0,0 +1,5 @@
{ recurseIntoAttrs, runTest }:
recurseIntoAttrs {
kubo = runTest ./kubo.nix;
kubo-fuse = runTest ./kubo-fuse.nix;
}
+42
View File
@@ -0,0 +1,42 @@
{ lib, ...} : {
name = "kubo-fuse";
meta = with lib.maintainers; {
maintainers = [ mguentner Luflosi ];
};
nodes.machine = { config, ... }: {
services.kubo = {
enable = true;
autoMount = true;
};
users.users.alice = {
isNormalUser = true;
extraGroups = [ config.services.kubo.group ];
};
users.users.bob = {
isNormalUser = true;
};
};
testScript = ''
start_all()
with subtest("FUSE mountpoint"):
machine.fail("echo a | su bob -l -c 'ipfs add --quieter'")
# The FUSE mount functionality is broken as of v0.13.0 and v0.17.0.
# See https://github.com/ipfs/kubo/issues/9044.
# Workaround: using CID Version 1 avoids that.
ipfs_hash = machine.succeed(
"echo fnord3 | su alice -l -c 'ipfs add --quieter --cid-version=1'"
).strip()
machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
with subtest("Unmounting of /ipns and /ipfs"):
# Force Kubo to crash and wait for it to restart
machine.systemctl("kill --signal=SIGKILL ipfs.service")
machine.wait_for_unit("ipfs.service", timeout = 30)
machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
'';
}
@@ -18,20 +18,6 @@
};
};
nodes.fuse = { config, ... }: {
services.kubo = {
enable = true;
autoMount = true;
};
users.users.alice = {
isNormalUser = true;
extraGroups = [ config.services.kubo.group ];
};
users.users.bob = {
isNormalUser = true;
};
};
testScript = ''
start_all()
@@ -63,23 +49,5 @@
with subtest("Setting dataDir works properly with the hardened systemd unit"):
machine.succeed("test -e /mnt/ipfs/config")
machine.succeed("test ! -e /var/lib/ipfs/")
with subtest("FUSE mountpoint"):
fuse.fail("echo a | su bob -l -c 'ipfs add --quieter'")
# The FUSE mount functionality is broken as of v0.13.0 and v0.17.0.
# See https://github.com/ipfs/kubo/issues/9044.
# Workaround: using CID Version 1 avoids that.
ipfs_hash = fuse.succeed(
"echo fnord3 | su alice -l -c 'ipfs add --quieter --cid-version=1'"
).strip()
fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
with subtest("Unmounting of /ipns and /ipfs"):
# Force Kubo to crash and wait for it to restart
fuse.systemctl("kill --signal=SIGKILL ipfs.service")
fuse.wait_for_unit("ipfs.service", timeout = 30)
fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
'';
}
+22 -11
View File
@@ -7,7 +7,6 @@
, gdb
, zlib
, python3
, icu
, lldb
, dotnet-sdk_7
, maven
@@ -17,6 +16,7 @@
, openssl
, expat
, libxcrypt-legacy
, fontconfig
, vmopts ? null
}:
@@ -252,8 +252,6 @@ let
(mkJetBrainsProduct {
inherit pname version src wmClass jdk buildNumber;
product = "Rider";
# icu is required by Rider.Backend
extraLdPath = [ icu ];
meta = with lib; {
homepage = "https://www.jetbrains.com/rider/";
inherit description license platforms;
@@ -268,15 +266,28 @@ let
maintainers = with maintainers; [ raphaelr ];
};
}).overrideAttrs (attrs: {
postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
patchelf --set-interpreter $interp \
lib/ReSharperHost/linux-x64/Rider.Backend \
plugins/dotCommon/DotFiles/linux-x64/JetBrains.Profiler.PdbServer
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
autoPatchelfHook
];
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
stdenv.cc.cc
zlib
fontconfig # plugins/dotTrace/DotFiles/linux-x64/libSkiaSharp.so
];
dontAutoPatchelf = true;
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
(
cd $out/rider
rm -rf lib/ReSharperHost/linux-x64/dotnet
ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-x64/dotnet
'');
# Remove dotnet copy first so it's not considered by autoPatchElf
rm -rf lib/ReSharperHost/linux-x64/dotnet
autoPatchelf \
lib/ReSharperHost/linux-x64/ \
plugins/dotCommon/DotFiles/linux-x64/ \
plugins/dotTrace/DotFiles/linux-x64/
ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-x64/dotnet
)
'';
});
buildRubyMine = { pname, version, src, license, description, wmClass, buildNumber, ... }:
+16 -8
View File
@@ -89,6 +89,21 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
if [ -d "plugins/remote-dev-server" ]; then
patch -p1 < ${./JetbrainsRemoteDev.patch}
fi
vmopts_file=bin/linux/${vmoptsName}
if [[ ! -f $vmopts_file ]]; then
vmopts_file=bin/${vmoptsName}
if [[ ! -f $vmopts_file ]]; then
echo "ERROR: $vmopts_file not found"
exit 1
fi
fi
echo -Djna.library.path=${lib.makeLibraryPath ([
libsecret e2fsprogs libnotify
# Required for Help -> Collect Logs
# in at least rider and goland
udev
])} >> $vmopts_file
'';
installPhase = ''
@@ -106,14 +121,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
wrapProgram "$out/$pname/bin/${loName}.sh" \
--prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git python3 ]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret e2fsprogs
libnotify
# Required for Help -> Collect Logs
# in at least rider and goland
udev
] ++ extraLdPath)}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLdPath}" \
${lib.concatStringsSep " " extraWrapperArgs} \
--set-default JDK_HOME "$jdk" \
--set-default ANDROID_JAVA_HOME "$jdk" \
@@ -108,10 +108,10 @@
"rust-rover": {
"update-channel": "RustRover EAP",
"url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}.tar.gz",
"version": "2023.2 EAP",
"sha256": "1f67e1a82f5cbb7c84382c7f251ae06b1e2699fa7d2fa4129e23ec2e43251687",
"url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62.tar.gz",
"build_number": "232.9921.62"
"version": "2023.3 EAP",
"sha256": "3dd8e99b066164efc11e86e3289e444c5238dfce8e9142fe2d3a8c340eeeb175",
"url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22.tar.gz",
"build_number": "233.8264.22"
},
"webstorm": {
"update-channel": "WebStorm RELEASE",
@@ -231,10 +231,10 @@
"rust-rover": {
"update-channel": "RustRover EAP",
"url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}.dmg",
"version": "2023.2 EAP",
"sha256": "dfde444bff011783cb4a5aa2aafae8ea989874c19535b01da8214df5eb3174fb",
"url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62.dmg",
"build_number": "232.9921.62"
"version": "2023.3 EAP",
"sha256": "889ed748efbd44b76da03186efac063baf36c2208d919550dd97cf2dae8f40e3",
"url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22.dmg",
"build_number": "233.8264.22"
},
"webstorm": {
"update-channel": "WebStorm RELEASE",
@@ -355,9 +355,9 @@
"update-channel": "RustRover EAP",
"url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}-aarch64.dmg",
"version": "2023.2 EAP",
"sha256": "35d44a4f72c027283843aaa6409de701d14274cdc5a614c3fdc53121383f9389",
"url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62-aarch64.dmg",
"build_number": "232.9921.62"
"sha256": "9c4f26089697f6cb394e971dac8ef4fe974b5ecffd63311fcf0be66d4b4aec59",
"url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22-aarch64.dmg",
"build_number": "233.8264.22-aarch64"
},
"webstorm": {
"update-channel": "WebStorm RELEASE",
@@ -4,13 +4,13 @@
buildGoModule rec {
pname = "orbiton";
version = "2.65.1";
version = "2.65.2";
src = fetchFromGitHub {
owner = "xyproto";
repo = "orbiton";
rev = "v${version}";
hash = "sha256-ebtzhir6nBnIawkJJq+BgXv/5CbXtbhujXkMBzQEsNY=";
hash = "sha256-wuRbn3zQlyqba21tKLVCRfs8QgreWQ+FBFDw6myoYbk=";
};
vendorHash = null;
@@ -4,6 +4,7 @@
, rustPlatform
, pkg-config
, openssl
, CoreServices
, Security
}:
@@ -27,6 +28,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
CoreServices
Security
];
@@ -2,6 +2,7 @@
, buildGoModule
, fetchurl
, nixosTests
, callPackage
}:
buildGoModule rec {
@@ -29,7 +30,10 @@ buildGoModule rec {
subPackages = [ "cmd/ipfs" ];
passthru.tests.kubo = nixosTests.kubo;
passthru.tests = {
inherit (nixosTests) kubo;
repoVersion = callPackage ./test-repoVersion.nix {};
};
vendorHash = null;
@@ -0,0 +1,13 @@
{ runCommand, kubo }:
runCommand "kubo-test-repoVersion" { } ''
export IPFS_PATH="$TMPDIR"
"${kubo}/bin/ipfs" init --empty-repo
declared_repo_version='${kubo.repoVersion}'
actual_repo_version="$(cat "$IPFS_PATH/version")"
if [ "$declared_repo_version" != "$actual_repo_version" ]; then
echo "kubo.repoVersion is not set correctly. It should be $actual_repo_version but is $declared_repo_version."
exit 1
fi
touch "$out"
''
@@ -27,6 +27,13 @@
, udev
}:
let
arch = {
"aarch64-linux" = "aarch64";
"x86_64-linux" = "x64";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
cpu = stdenv.hostPlatform.parsed.cpu.name;
in
openjdk17.overrideAttrs (oldAttrs: rec {
pname = "jetbrains-jdk-jcef";
javaVersion = "17.0.7";
@@ -57,22 +64,22 @@ openjdk17.overrideAttrs (oldAttrs: rec {
buildPhase = ''
runHook preBuild
mkdir -p jcef_linux_x64/jmods
cp ${jetbrains.jcef}/* jcef_linux_x64/jmods
mkdir -p jcef_linux_${arch}/jmods
cp ${jetbrains.jcef}/* jcef_linux_${arch}/jmods
sed \
-e "s/OPENJDK_TAG=.*/OPENJDK_TAG=${openjdkTag}/" \
-e "s/SOURCE_DATE_EPOCH=.*//" \
-e "s/export SOURCE_DATE_EPOCH//" \
-i jb/project/tools/common/scripts/common.sh
sed -i "s/STATIC_CONF_ARGS/STATIC_CONF_ARGS \$configureFlags/" jb/project/tools/linux/scripts/mkimages_x64.sh
sed -i "s/STATIC_CONF_ARGS/STATIC_CONF_ARGS \$configureFlags/" jb/project/tools/linux/scripts/mkimages_${arch}.sh
sed \
-e "s/create_image_bundle \"jb/#/" \
-e "s/echo Creating /exit 0 #/" \
-i jb/project/tools/linux/scripts/mkimages_x64.sh
-i jb/project/tools/linux/scripts/mkimages_${arch}.sh
patchShebangs .
./jb/project/tools/linux/scripts/mkimages_x64.sh ${build} ${if debugBuild then "fd" else "jcef"}
./jb/project/tools/linux/scripts/mkimages_${arch}.sh ${build} ${if debugBuild then "fd" else "jcef"}
runHook postBuild
'';
@@ -84,9 +91,9 @@ openjdk17.overrideAttrs (oldAttrs: rec {
in ''
runHook preInstall
mv build/linux-x86_64-server-${buildType}/images/jdk/man build/linux-x86_64-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-x64${debugSuffix}-b${build}
rm -rf build/linux-x86_64-server-${buildType}/images/jdk
mv build/linux-x86_64-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-x64${debugSuffix}-b${build} build/linux-x86_64-server-${buildType}/images/jdk
mv build/linux-${cpu}-server-${buildType}/images/jdk/man build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build}
rm -rf build/linux-${cpu}-server-${buildType}/images/jdk
mv build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} build/linux-${cpu}-server-${buildType}/images/jdk
'' + oldAttrs.installPhase + "runHook postInstall";
postInstall = ''
@@ -73,6 +73,23 @@ let rpath = lib.makeLibraryPath [
];
buildType = if debugBuild then "Debug" else "Release";
platform = {
"aarch64-linux" = "linuxarm64";
"x86_64-linux" = "linux64";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
arches = {
"linuxarm64" = {
depsArch = "arm64";
projectArch = "arm64";
targetArch = "arm64";
};
"linux64" = {
depsArch = "amd64";
projectArch = "x86_64";
targetArch = "x86_64";
};
}.${platform};
inherit (arches) depsArch projectArch targetArch;
in stdenv.mkDerivation rec {
pname = "jcef-jetbrains";
@@ -92,12 +109,15 @@ in stdenv.mkDerivation rec {
hash = "sha256-3HuW8upR/bZoK8euVti2KpCZh9xxfqgyHmgoG1NjxOI=";
};
cef-bin = let
fileName = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_linux64_minimal";
urlName = builtins.replaceStrings ["+"] ["%2B"] fileName;
in fetchzip rec {
name = fileName;
name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal";
hash = {
"linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs=";
"linux64" = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw=";
}.${platform};
urlName = builtins.replaceStrings ["+"] ["%2B"] name;
in fetchzip {
url = "https://cef-builds.spotifycdn.com/${urlName}.tar.bz2";
hash = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw=";
inherit name hash;
};
clang-fmt = fetchurl {
url = "https://storage.googleapis.com/chromium-clang-format/dd736afb28430c9782750fc0fd5f0ed497399263";
@@ -128,7 +148,7 @@ in stdenv.mkDerivation rec {
mkdir jcef_build
cd jcef_build
cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=${buildType} ..
cmake -G "Ninja" -DPROJECT_ARCH="${projectArch}" -DCMAKE_BUILD_TYPE=${buildType} ..
runHook postConfigure
'';
@@ -137,7 +157,7 @@ in stdenv.mkDerivation rec {
postBuild = ''
export JCEF_ROOT_DIR=$(realpath ..)
../tools/compile.sh linux64 Release
../tools/compile.sh ${platform} Release
'';
# Mostly taken from jb/tools/common/create_modules.sh
@@ -148,8 +168,8 @@ in stdenv.mkDerivation rec {
export OUT_NATIVE_DIR=$JCEF_ROOT_DIR/jcef_build/native/${buildType}
export JB_TOOLS_DIR=$(realpath ../jb/tools)
export JB_TOOLS_OS_DIR=$JB_TOOLS_DIR/linux
export OUT_CLS_DIR=$(realpath ../out/linux64)
export TARGET_ARCH=x86_64 DEPS_ARCH=amd64
export OUT_CLS_DIR=$(realpath ../out/${platform})
export TARGET_ARCH=${targetArch} DEPS_ARCH=${depsArch}
export OS=linux
export JOGAMP_DIR="$JCEF_ROOT_DIR"/third_party/jogamp/jar
@@ -183,7 +203,11 @@ in stdenv.mkDerivation rec {
jar uf gluegen-rt.jar module-info.class
rm module-info.class module-info.java
mkdir lib
''
# see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec
+ lib.optionalString (platform != "linuxarm64") ''
extract_jar "$JOGAMP_DIR"/gluegen-rt-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH"
'' + ''
cd ../jogl
cp "$JOGAMP_DIR"/gluegen-rt.jar .
@@ -193,7 +217,11 @@ in stdenv.mkDerivation rec {
jar uf jogl-all.jar module-info.class
rm module-info.class module-info.java
mkdir lib
''
# see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec
+ lib.optionalString (platform != "linuxarm64") ''
extract_jar "$JOGAMP_DIR"/jogl-all-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH"
'' + ''
cd ../jcef
cp "$OUT_CLS_DIR"/jcef.jar .
@@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "huggingface-hub";
version = "0.17.0";
version = "0.17.3";
format = "setuptools";
disabled = pythonOlder "3.8";
@@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "huggingface";
repo = "huggingface_hub";
rev = "refs/tags/v${version}";
hash = "sha256-xtonZVaUVjxUNCl2jJnBlP8wh4s92VeD958x9dZM19U=";
hash = "sha256-zoZIxp9+4FVPLCiikKussC34rwWBQzWMDlZx9S7NnqQ=";
};
propagatedBuildInputs = [
@@ -4,11 +4,11 @@
buildPythonPackage rec {
pname = "mpi4py";
version = "3.1.4";
version = "3.1.5";
src = fetchPypi {
inherit pname version;
hash = "sha256-F4WPLrxiMiDQEg0fqNQo0DPd50nEvDWzPYGmatf5NIA=";
hash = "sha256-pwbnbbklUTXC+10e9Uy097DkrZ4zy62n3idiYgXyoVM=";
};
passthru = {
@@ -11,14 +11,14 @@
rustPlatform.buildRustPackage rec {
pname = "probe-rs";
version = "0.21.0";
version = "0.21.1";
src = fetchCrate {
inherit pname version;
hash = "sha256-3L4dvEIPxbNYh+Z5G1iccqLLYi13RTRaFnOD4U/zNtE=";
hash = "sha256-UmQwz9Ejb5+epwGKsglV3QdWGqOEH/3DRqvKtfm14kg=";
};
cargoHash = "sha256-peCXG9TrsnBqQOy+pgRNGstn0bwKNCdWQ3Jn5r0fcOI=";
cargoHash = "sha256-awa84xvIRrEhuPm4N2xt5bsYy2wbLjJokrKoAxCYvR4=";
cargoBuildFlags = [ "--features=cli" ];
+3 -3
View File
@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "althttpd";
version = "unstable-2022-08-12";
version = "unstable-2023-08-12";
src = fetchfossil {
url = "https://sqlite.org/althttpd/";
rev = "823a1d985d4bacaa";
sha256 = "sha256-yfVsOfqtHw9ftnK5B4RWeRR/ygfsTEDm7fFSaVxsCas=";
rev = "c0bdc68e6c56ef25";
sha256 = "sha256-VoDR5MlVlvar9wYA0kUhvDQVjxDwsZlqrNR3u4Tqw5c=";
};
buildInputs = [ openssl ];
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "wlr-randr";
version = "0.3.0";
version = "0.3.1";
src = fetchFromSourcehut {
owner = "~emersion";
repo = pname;
rev = "v${version}";
sha256 = "sha256-iJSHCQbom+V0TrtEYrjMrMkdc6PoZrjhtcgebZYjQjI=";
hash = "sha256-u5fsM+DCefPTXEg+ByTs0wyOlEfCj5OUeJydX6RRvo4=";
};
strictDeps = true;
+1 -1
View File
@@ -6978,7 +6978,7 @@ with pkgs;
keymapper = callPackage ../tools/inputmethods/keymapper { };
twitch-tui = callPackage ../applications/networking/instant-messengers/twitch-tui {
inherit (darwin.apple_sdk.frameworks) Security;
inherit (darwin.apple_sdk_11_0.frameworks) Security CoreServices;
};
gebaar-libinput = callPackage ../tools/inputmethods/gebaar-libinput { stdenv = gcc10StdenvCompat; };