-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge staging-next-24.05 into staging-24.05
- Loading branch information
Showing
10 changed files
with
2,863 additions
and
78 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitLab, | ||
writeScript, | ||
appstream-glib, | ||
cargo, | ||
meson, | ||
ninja, | ||
pkg-config, | ||
rustPlatform, | ||
rustc, | ||
wrapGAppsHook4, | ||
cairo, | ||
desktop-file-utils, | ||
gdb, | ||
gdk-pixbuf, | ||
glib, | ||
gtk4, | ||
gtksourceview5, | ||
libadwaita, | ||
libgit2, | ||
libusb1, | ||
openssl, | ||
pango, | ||
vte-gtk4, | ||
zlib, | ||
unstableGitUpdater, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "envision-unwrapped"; | ||
version = "0-unstable-2024-06-25"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "gabmus"; | ||
repo = "envision"; | ||
rev = "b594f75778961c281daca398011914e9ac14b753"; | ||
hash = "sha256-felt9KdgVrXSgoufw/+gDlluqdv8vySDqwskQ0t2JOM="; | ||
}; | ||
|
||
strictDeps = true; | ||
|
||
cargoDeps = rustPlatform.importCargoLock { | ||
lockFile = ./Cargo.lock; | ||
outputHashes = { | ||
"libmonado-rs-0.1.0" = "sha256-PsNgfpgso3HhIMXKky/u6Xw8phk1isRpNXKLhvN1wIE="; | ||
}; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
appstream-glib | ||
desktop-file-utils | ||
cargo | ||
meson | ||
ninja | ||
pkg-config | ||
rustPlatform.cargoSetupHook | ||
rustc | ||
wrapGAppsHook4 | ||
]; | ||
|
||
buildInputs = [ | ||
cairo | ||
gdk-pixbuf | ||
glib | ||
gtk4 | ||
gtksourceview5 | ||
libadwaita | ||
libgit2 | ||
libusb1 | ||
openssl | ||
pango | ||
vte-gtk4 | ||
zlib | ||
]; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/envision \ | ||
--prefix PATH : "${lib.makeBinPath [ gdb ]}" | ||
''; | ||
|
||
passthru.updateScript = writeScript "envision-update" '' | ||
source ${builtins.head (unstableGitUpdater { })} | ||
cp $tmpdir/Cargo.lock ./pkgs/by-name/en/envision-unwrapped/Cargo.lock | ||
''; | ||
|
||
meta = { | ||
description = "UI for building, configuring and running Monado, the open source OpenXR runtime"; | ||
homepage = "https://gitlab.com/gabmus/envision"; | ||
license = lib.licenses.agpl3Only; | ||
mainProgram = "envision"; | ||
maintainers = with lib.maintainers; [ | ||
pandapip1 | ||
Scrumplex | ||
]; | ||
platforms = lib.platforms.linux; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ buildFHSEnv, envision-unwrapped }: | ||
|
||
buildFHSEnv { | ||
name = "envision"; | ||
|
||
extraOutputsToInstall = [ "dev" ]; | ||
|
||
strictDeps = true; | ||
|
||
targetPkgs = | ||
pkgs: | ||
[ pkgs.envision-unwrapped ] | ||
++ (with pkgs; [ | ||
glibc | ||
gcc | ||
]) | ||
++ ( | ||
# OpenHMD dependencies | ||
pkgs.openhmd.buildInputs ++ pkgs.openhmd.nativeBuildInputs | ||
) | ||
++ ( | ||
# OpenComposite dependencies | ||
pkgs.opencomposite.buildInputs ++ pkgs.opencomposite.nativeBuildInputs ++ [ pkgs.boost ] | ||
) | ||
++ ( | ||
# Monado dependencies | ||
( | ||
pkgs.monado.buildInputs | ||
++ pkgs.monado.nativeBuildInputs | ||
++ (with pkgs; [ | ||
# Additional dependencies required by Monado when built using Envision | ||
mesa | ||
shaderc | ||
xorg.libX11 | ||
xorg.libxcb | ||
xorg.libXrandr | ||
xorg.libXrender | ||
xorg.xorgproto | ||
]) | ||
) | ||
) | ||
++ ( | ||
# SteamVR driver dependencies | ||
[ pkgs.zlib ]) | ||
++ ( | ||
# WiVRn dependencies | ||
# TODO: Replace with https://github.com/NixOS/nixpkgs/pull/316975 once merged | ||
(with pkgs; [ | ||
avahi | ||
cmake | ||
cli11 | ||
ffmpeg | ||
git | ||
gst_all_1.gstreamer | ||
gst_all_1.gst-plugins-base | ||
libmd | ||
libdrm | ||
libpulseaudio | ||
libva | ||
ninja | ||
nlohmann_json | ||
openxr-loader | ||
pipewire | ||
systemdLibs # udev | ||
vulkan-loader | ||
vulkan-headers | ||
x264 | ||
]) | ||
++ (with pkgs; [ | ||
android-tools # For adb installing WiVRn APKs | ||
]) | ||
); | ||
|
||
profile = '' | ||
export CMAKE_LIBRARY_PATH=/usr/lib | ||
export CMAKE_INCLUDE_PATH=/usr/include | ||
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig | ||
''; | ||
|
||
extraInstallCommands = '' | ||
mkdir -p $out/share/applications $out/share/metainfo | ||
ln -s ${envision-unwrapped}/share/envision $out/share | ||
ln -s ${envision-unwrapped}/share/icons $out/share | ||
ln -s ${envision-unwrapped}/share/applications/org.gabmus.envision.desktop $out/share/applications | ||
ln -s ${envision-unwrapped}/share/metainfo/org.gabmus.envision.appdata.xml $out/share/metainfo | ||
''; | ||
|
||
runScript = "envision"; | ||
|
||
meta = envision-unwrapped.meta // { | ||
description = "${envision-unwrapped.meta.description} (with build environment)"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc | ||
index c5383bc..50d1abc 100644 | ||
--- a/nix/libstore/build.cc | ||
+++ b/nix/libstore/build.cc | ||
@@ -2312,15 +2312,6 @@ void DerivationGoal::registerOutputs() | ||
Path actualPath = path; | ||
if (useChroot) { | ||
actualPath = chrootRootDir + path; | ||
- if (pathExists(actualPath)) { | ||
- /* Move output paths from the chroot to the store. */ | ||
- if (buildMode == bmRepair) | ||
- replaceValidPath(path, actualPath); | ||
- else | ||
- if (buildMode != bmCheck && rename(actualPath.c_str(), path.c_str()) == -1) | ||
- throw SysError(format("moving build output `%1%' from the chroot to the store") % path); | ||
- } | ||
- if (buildMode != bmCheck) actualPath = path; | ||
} else { | ||
Path redirected = redirectedOutputs[path]; | ||
if (buildMode == bmRepair | ||
@@ -2360,6 +2351,21 @@ void DerivationGoal::registerOutputs() | ||
something like that. */ | ||
canonicalisePathMetaData(actualPath, buildUser.enabled() ? buildUser.getUID() : -1, inodesSeen); | ||
|
||
+ if (useChroot) { | ||
+ if (pathExists(actualPath)) { | ||
+ /* Now that output paths have been canonicalized (in particular | ||
+ there are no setuid files left), move them outside of the | ||
+ chroot and to the store. */ | ||
+ if (buildMode == bmRepair) | ||
+ replaceValidPath(path, actualPath); | ||
+ else | ||
+ if (buildMode != bmCheck && rename(actualPath.c_str(), path.c_str()) == -1) | ||
+ throw SysError(format("moving build output `%1%' from the chroot to the store") % path); | ||
+ } | ||
+ if (buildMode != bmCheck) actualPath = path; | ||
+ } | ||
+ | ||
+ | ||
/* FIXME: this is in-memory. */ | ||
StringSink sink; | ||
dumpPath(actualPath, sink); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.