Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv: fix missing dependencies in __sandboxProfile and __impureHostDeps #291456

Merged
merged 1 commit into from
Apr 21, 2024
Merged
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
5 changes: 0 additions & 5 deletions pkgs/applications/audio/musescore/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ in stdenv'.mkDerivation (finalAttrs: {
"--set-default QT_QPA_PLATFORM xcb"
];

# HACK `propagatedSandboxProfile` does not appear to actually propagate the
# sandbox profile from `qtbase`, see:
# https://github.com/NixOS/nixpkgs/issues/237458
sandboxProfile = toString qtbase.__propagatedSandboxProfile or null;

nativeBuildInputs = [
wrapQtAppsHook
cmake
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/misc/qtpass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ qmake qttools wrapQtAppsHook ];

# HACK `propagatedSandboxProfile` does not appear to actually propagate the sandbox profile from `qt5.qtbase`
sandboxProfile = toString qtbase.__propagatedSandboxProfile;

qmakeFlags = [
# setup hook only sets QMAKE_LRELEASE, set QMAKE_LUPDATE too:
"QMAKE_LUPDATE=${qttools.dev}/bin/lupdate"
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/libraries/qtkeychain/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ stdenv.mkDerivation rec {

dontWrapQtApps = true;

# HACK `propagatedSandboxProfile` does not appear to actually propagate the sandbox profile from `qtbase`
sandboxProfile = toString qtbase.__propagatedSandboxProfile or null;

cmakeFlags = [
"-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}"
"-DQT_TRANSLATIONS_DIR=share/qt/translations"
Expand Down
11 changes: 7 additions & 4 deletions pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -413,25 +413,28 @@ else let
requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ];
} // optionalAttrs (stdenv.buildPlatform.isDarwin) (
let
allDependencies = concatLists (concatLists dependencies);
allPropagatedDependencies = concatLists (concatLists propagatedDependencies);

computedSandboxProfile =
concatMap (input: input.__propagatedSandboxProfile or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ concatLists dependencies);
++ allDependencies);

computedPropagatedSandboxProfile =
concatMap (input: input.__propagatedSandboxProfile or [])
(concatLists propagatedDependencies);
allPropagatedDependencies;

computedImpureHostDeps =
unique (concatMap (input: input.__propagatedImpureHostDeps or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ concatLists dependencies));
++ allDependencies));

computedPropagatedImpureHostDeps =
unique (concatMap (input: input.__propagatedImpureHostDeps or [])
(concatLists propagatedDependencies));
allPropagatedDependencies);
in {
inherit __darwinAllowLocalNetworking;
# TODO: remove `unique` once nix has a list canonicalization primitive
Expand Down