Commit Graph

88458 Commits

Author SHA1 Message Date
sternenseemann
9d6cac3e53 mesonEmulatorHook: fix canExecute safety assertion
Currently the throw codepath will never be hit. Specifically it doesn't
guard against a misuse of the hook:

    pkgsCross.aarch64-multiplatform.mesonEmulatorHook # this should fail
    pkgsCross.aarch64-multiplatform.buildPackages.mesonEmulatorHook # this should (and does) succeed

The check sort of worked to guard against use in situations where the
hook wasn't misplaced between nativeBuildInputs and buildInputs, but
the build platform was actually able to execute binaries built for the
host platform.

This worked because nativeBuildInputs would first of all need to
evaluate pkgsHostTarget.mesonEmulatorHook in order to access the spliced
derivation it wants, pkgsBuildHost.mesonEmulatorHook. For this, you'd
need to pass the if expression, at which point buildPlatform and
targetPlatform would match the build and target platform of the
derivation that uses the hook. Consequently the check is “correct”,
since it is its build platform that needs not to be able execute stuff
built for its host platform.

The target platform is technically wrong here, but it works out
since (at least currently) in nixpkgs either build and host or host and
target platform are equal. When doing the check in pkgsHostTarget,
target and host platform are equal.

However, this is a kind of incomprehensible rube goldberg machine, let's
some mistakes slip through the cracks and relies on implementation
details of splicing.

To alleviate this, we do the following:

- We move the check _into_ the derivation. By doing the check when
  obtaining the file for the setup hook and not before calling
  `makeSetupHook`. This means that we can force `mesonEmulatorHook`
  even if forcing `mesonEmulatorHook.outPath` would throw. This ensures
  that splicing can work even if the some of the derivation variants
  would fail to evaluate.

- Since splicing works now, we can no longer have to do the check
  “globally” before splicing happens. This means we can use the setup
  hook derivation's own platforms. buildPlatform is irrelevant here,
  since this is only the platform on which the shell script is put
  together. hostPlatform matters, since it is were the setup hook is
  executed later (i.e. the using derivation's build platform). target
  platform is the platform the adjacent meson builds executables for,
  i.e. the platform we may need to emulate for.

To verify this change, I have evaluated all derivations using
mesonEmulatorHook in `pkgsCross.aarch64-multiplatform` before and after
this change. The hashes don't change.
2023-08-08 16:49:20 +02:00
Janik
31ad272060
Merge pull request #247896 from NetaliDev/python-django-bootstrap5 2023-08-08 16:20:57 +02:00
Mario Rodas
7f60434172
Merge pull request #209548 from felipeqq2/init/storj-uplink
storj-uplink: init at 1.68.2
2023-08-08 08:29:16 -05:00
Jennifer Graul
c58635a1fa
python3Packages.django-bootstrap5: init at 23.3 2023-08-08 15:25:52 +02:00
Janik
777fcd15e2
Merge pull request #245677 from fsagbuya/linux-gpib 2023-08-08 14:52:14 +02:00
Pol Dellaiera
f971f35f7d
Merge pull request #246426 from dit7ya/sqld
sqld: init at 0.17.2
2023-08-08 10:57:36 +02:00
Pol Dellaiera
cb3da14d11
Merge pull request #247731 from dit7ya/mw
mw: init at unstable-2023-08-04
2023-08-08 10:57:15 +02:00
Pol Dellaiera
d90ede3a27
Merge pull request #247733 from dit7ya/keymapper
keymapper: init at 2.6.2
2023-08-08 10:57:02 +02:00
OTABI Tomoya
4411bd4ee5
Merge pull request #242851 from totoroot/init/pythonPackages.mkdocs-git-revision-date-localized
python3Packages.mkdocs-git-revision-date-localized-plugin: init at 1.2.0
2023-08-08 17:52:29 +09:00
OTABI Tomoya
8f1e7a5db5
Merge pull request #247019 from tjni/dvc-app-and-library
python3.pkgs.dvc, dvc, dvc-with-remotes: move to python-modules since dvclive depends on it
2023-08-08 17:29:15 +09:00
OTABI Tomoya
44b6fb57ff
Merge pull request #242122 from Janik-Haag/zsh-fzf-history-search
zsh-fzf-history-search: init at unstable-23-03-08
2023-08-08 17:20:59 +09:00
Nick Cao
b98f6d9072
Merge pull request #246712 from NickCao/jax-rework
python3Packages.{jax,jaxlib}: update to 0.4.14
2023-08-08 01:58:03 -06:00
happysalada
0ece6cc4c4 op-geth: init 1.101106.0 2023-08-08 15:46:32 +08:00
happysalada
41cfe07375 optimism: init at 1.1.1 2023-08-08 15:46:32 +08:00
Doron Behar
5fa3ab255c
Merge pull request #224850 from orthros/upspin
upspin: init at unstable-2023-02-05
2023-08-08 06:31:22 +00:00
Vladimír Čunát
41c7605718
Merge #245935: staging-next 2023-07-28 2023-08-08 07:33:42 +02:00
Vladimír Čunát
3280523398
Merge #247843: perlPackages.locallib: 2.000024 -> 2.000029
...into staging-next
2023-08-08 07:15:36 +02:00
Vladimír Čunát
3858a9b87a
Merge #247379: dt-schema: handle jsonschema incompatibility
...into staging-next
2023-08-08 07:12:21 +02:00
Franz Pletz
96920fb7b2
Merge pull request #247794 from dotlambda/diebahn-init 2023-08-08 05:57:19 +02:00
Franz Pletz
844ffa82bb
Merge pull request #239293 from Misaka13514/init-johnny 2023-08-08 05:07:33 +02:00
Stig Palmquist
82d528c168
perlPackages.locallib: 2.000024 -> 2.000029 2023-08-08 03:45:42 +02:00
Pol Dellaiera
e943801b93
Merge pull request #226625 from mxkrsv/chayang
chayang: init at 0.1.0
2023-08-08 03:36:31 +02:00
Andrew Miloradovsky
ea34c2d977 planner: init at 0.14.91
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
2023-08-08 01:22:19 +00:00
github-actions[bot]
4507a6bd1f
Merge master into staging-next 2023-08-08 00:01:49 +00:00
Mostly Void
4650390d63
sqld: init at 0.17.2 2023-08-08 01:03:17 +03:00
Pol Dellaiera
ef21087c24
Merge pull request #246439 from dit7ya/kraftkit
kraft: init at 0.6.4
2023-08-08 00:02:52 +02:00
Pol Dellaiera
dbfab5b1dd
Merge pull request #194560 from dit7ya/bonk
bonk: init at 0.3.2
2023-08-08 00:02:38 +02:00
Mostly Void
c91052f6ea
mw: init at unstable-2023-08-04 2023-08-08 01:01:31 +03:00
Mostly Void
9d5724088a
keymapper: init at 2.6.2 2023-08-08 00:53:18 +03:00
Robert Schütz
242d458f25 Merge branch 'master' into staging-next 2023-08-07 12:40:10 -07:00
Robert Schütz
596edc6d3c
Merge pull request #244209 from dotlambda/jupyterlab-4.0.3
python310Packages.jupyterlab: 3.6.3 -> 4.0.3
2023-08-07 19:07:59 +00:00
Robert Schütz
3784f9b15e diebahn: init at 1.5.0 2023-08-07 11:35:43 -07:00
github-actions[bot]
462b4c7567
Merge master into staging-next 2023-08-07 18:01:16 +00:00
Stig
f7985a0c98
Merge pull request #247624 from dotlambda/tirex-fix
perlPackages.Tirex: fix build
2023-08-07 18:54:54 +02:00
Maxim Karasev
47851fa30f chayang: init at 0.1.0 2023-08-07 19:49:26 +03:00
Janik
7a1ae91492
Merge pull request #236515 from donovanglover/hyprland-autoname-workspaces 2023-08-07 17:51:02 +02:00
Colin Nelson
819cbe1699
upspin: init at unstable-2023-02-05 2023-08-07 08:29:23 -07:00
Vladimír Čunát
2d99077c50
Merge #247408: libgit2_1_6: init at 1.6.4
...into staging-next
2023-08-07 16:35:13 +02:00
figsoda
3013bd06cb
Merge pull request #247577 from figsoda/risor 2023-08-07 10:21:47 -04:00
Mario Rodas
117f8ff0c5
Merge pull request #247570 from fabaff/sure-fix
python311Packages.sure: 2.0.0 -> 2.0.1, python310Packages.rednose: remove
2023-08-07 09:10:39 -05:00
Mostly Void
d8bd15f428
kraft: init at 0.6.4 2023-08-07 15:52:34 +03:00
Mostly Void
75c8b4cf28
bonk: init at 0.3.2 2023-08-07 15:42:38 +03:00
Pierre Bourdon
fba6ccf2e8
Merge pull request #244680 from emilytrau/avalonia-ilspy-source
avalonia-ilspy: build from source
2023-08-07 14:02:20 +02:00
github-actions[bot]
dd48ee46cf
Merge master into staging-next 2023-08-07 12:00:52 +00:00
Donovan Glover
172e757451
hyprland-autoname-workspaces: init at 1.1.7 2023-08-07 07:21:12 -04:00
figsoda
c91024273f poop: init at 0.4.0 2023-08-07 10:25:02 +00:00
Naïm Favier
c2596b396c
Merge pull request #247499 from ncfavier/1lab
agdaPackages._1lab: init at unstable-2023-03-07
2023-08-07 11:13:23 +02:00
Frederik Rietdijk
65a8bb46e3
Merge pull request #246900 from tjni/cx-freeze
python3.pkgs.cx-freeze: switch to pyproject and rename
2023-08-07 09:22:25 +02:00
Theodore Ni
3dfe8ff2b9
python3.pkgs.oldest-supported-numpy: init at 2023.8.3 (#247073)
The main purpose of this package is to be used as a dependency in
projects that depend upon it without having to patch their build
dependency requirements.
2023-08-07 09:19:06 +02:00
github-actions[bot]
529e3475fc
Merge master into staging-next 2023-08-07 06:01:04 +00:00