diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-24 02:07:31 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-26 12:38:09 +0100 |
commit | 371d81422ab11deb332524846d1f5bed05743347 (patch) | |
tree | 7b3c9a463ccd1b541a361229bc80825e92d7fab4 /release/checks/default.nix | |
parent | 1af0080f06f746f263204b6e659fa918427c70d2 (diff) | |
download | spectrum-371d81422ab11deb332524846d1f5bed05743347.tar spectrum-371d81422ab11deb332524846d1f5bed05743347.tar.gz spectrum-371d81422ab11deb332524846d1f5bed05743347.tar.bz2 spectrum-371d81422ab11deb332524846d1f5bed05743347.tar.lz spectrum-371d81422ab11deb332524846d1f5bed05743347.tar.xz spectrum-371d81422ab11deb332524846d1f5bed05743347.tar.zst spectrum-371d81422ab11deb332524846d1f5bed05743347.zip |
lib: adjust interface for Nix files
This moves every directly-buildable Nix file in Spectrum from the old eval-config.nix interface to a new callPackage-based interface. This moves us in the direction of stopping files from directly importing each other, in favor of having a global package set that contains the Spectrum-specific packages. Aside from consistency with packages from Nixpkgs, the main advantage to this is that the packages will be correctly spliced, and so e.g. lseek being in nativeBuildInputs will now do the right thing. This is implemented using a scope, so the Spectrum packages are invisible to Nixpkgs, and are applied on top afterwards, in contrast to if an overlay was used. Having a customised package set also paves the way for bringing modifications to upstream packages (e.g. the Cloud Hypervisor virtio-gpu patches) into the Spectrum repository, allowing us to use an unmodified upstream Nixpkgs. Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'release/checks/default.nix')
-rw-r--r-- | release/checks/default.nix | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/release/checks/default.nix b/release/checks/default.nix index bb871ec..c200293 100644 --- a/release/checks/default.nix +++ b/release/checks/default.nix @@ -1,26 +1,26 @@ # SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is> -import ../../lib/eval-config.nix ({ ... } @ args: +import ../../lib/call-package.nix ({ callSpectrumPackage }: { recurseForDerivations = true; - doc-links = import ./doc-links.nix args; + doc-links = callSpectrumPackage ./doc-links.nix {}; - doc-anchors = import ./doc-anchors.nix args; + doc-anchors = callSpectrumPackage ./doc-anchors.nix {}; - pkg-tests = import ./pkg-tests.nix args; + pkg-tests = callSpectrumPackage ./pkg-tests.nix {}; - no-roothash = import ./no-roothash.nix args; + no-roothash = callSpectrumPackage ./no-roothash.nix {}; - reuse = import ./reuse.nix args; + reuse = callSpectrumPackage ./reuse.nix {}; - rustfmt = import ./rustfmt.nix args; + rustfmt = callSpectrumPackage ./rustfmt.nix {}; - shellcheck = import ./shellcheck.nix args; + shellcheck = callSpectrumPackage ./shellcheck.nix {}; - try = import ./try.nix args; + try = callSpectrumPackage ./try.nix {}; - wayland = import ./wayland args; -}) + wayland = callSpectrumPackage ./wayland {}; +}) (_: {}) |