Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkgs/by-name/fr/fractal/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
libseccomp,
glycin-loaders,
libwebp,
libglycin,
}:

stdenv.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -60,6 +61,14 @@ stdenv.mkDerivation (finalAttrs: {
"target_dir / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
'';

preConfigure = ''
# Dirty approach to add patches after cargoSetupPostUnpackHook
# We should eventually use a cargo vendor patch hook instead
pushd ../$(stripHash $cargoDeps)/glycin-3.*
patch -p3 < ${libglycin.passthru.glycin3PathsPatch}
patch -p3 < ${libglycin.passthru.glycin3OptionalUsrPatch}
popd
'';
nativeBuildInputs = [
glib
grass-sass
Expand Down Expand Up @@ -102,7 +111,6 @@ stdenv.mkDerivation (finalAttrs: {
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${glycin-loaders}/share"
--prefix PATH : "${lib.makeBinPath [ bubblewrap ]}"
)
'';

Expand Down
13 changes: 13 additions & 0 deletions pkgs/by-name/li/libglycin/glycin-3-optional-usr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/vendor/glycin/src/sandbox.rs b/vendor/glycin/src/sandbox.rs
index d840674..475d4be 100644
--- a/vendor/glycin/src/sandbox.rs
+++ b/vendor/glycin/src/sandbox.rs
@@ -292,7 +292,7 @@ impl Sandbox {
"--chdir",
"/",
// Make /usr available as read only
- "--ro-bind",
+ "--ro-bind-try",
"/usr",
"/usr",
// Make tmpfs dev available
3 changes: 3 additions & 0 deletions pkgs/by-name/li/libglycin/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: {

postPatch = ''
patch -p2 < ${finalAttrs.passthru.glycin3PathsPatch}
patch -p2 < ${finalAttrs.passthru.glycin3OptionalUsrPatch}

patchShebangs \
build-aux/crates-version.py
Expand Down Expand Up @@ -120,6 +121,8 @@ stdenv.mkDerivation (finalAttrs: {
glycin3PathsPatch = replaceVars ./fix-glycin-3-paths.patch {
bwrap = "${bubblewrap}/bin/bwrap";
};

glycin3OptionalUsrPatch = ./glycin-3-optional-usr.patch;
};

meta = {
Expand Down
1 change: 1 addition & 0 deletions pkgs/by-name/lo/loupe/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
# We should eventually use a cargo vendor patch hook instead
pushd ../$(stripHash $cargoDeps)/glycin-3.*
patch -p3 < ${libglycin.passthru.glycin3PathsPatch}
patch -p3 < ${libglycin.passthru.glycin3OptionalUsrPatch}
popd
'';

Expand Down
2 changes: 2 additions & 0 deletions pkgs/by-name/sn/snapshot/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# Fix paths in glycin library
libglycin.passthru.glycin3PathsPatch
# Make /usr optional in glycin library
libglycin.passthru.glycin3OptionalUsrPatch
];

cargoVendorDir = "vendor";
Expand Down
Loading