From 11c47b7f75526c413f7aeca46e0cbc0e8e4d56f4 Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:18:44 -0400 Subject: [PATCH] drl: only build on old macOS runner --- .github/workflows/build.yml | 2 +- ci.nix | 3 ++- default.nix | 37 +++++++++++-------------------------- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51c1987..8bd39fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: -I $PWD - name: Build nix packages # run: nix shell -f '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs - run: nix shell -f '.' nix-build-uncached-logging -c nix-build-uncached ci.nix ${{ matrix.qemuSystem && format('--argstr platform {0}', matrix.qemuSystem)}} -A cacheOutputs + run: nix shell -f '.' nix-build-uncached-logging -c nix-build-uncached ci.nix ${{ matrix.runner == 'macos-12' && '--arg includeDRL true' || '' }} ${{ matrix.qemuSystem && format('--argstr platform {0}', matrix.qemuSystem) }} -A cacheOutputs - name: Upload debug info if: '!cancelled()' uses: actions/upload-artifact@v4 diff --git a/ci.nix b/ci.nix index 2d799db..680089d 100644 --- a/ci.nix +++ b/ci.nix @@ -12,6 +12,7 @@ { platform ? null, + includeDRL ? false, pkgs ? import (if platform != null then { localSystem = platform; packageOverrides = pkgs: { @@ -52,7 +53,7 @@ let outputsOf = p: map (o: p.${o}) p.outputs; - nurAttrs' = import ./default.nix { inherit pkgs; }; + nurAttrs' = import ./default.nix { inherit pkgs includeDRL; }; nurAttrs = nurAttrs' // lib.optionalAttrs (nurAttrs'?_ciOnly) { _ciOnly = lib.recurseIntoAttrs nurAttrs'._ciOnly; }; diff --git a/default.nix b/default.nix index e1cd874..533da5f 100644 --- a/default.nix +++ b/default.nix @@ -6,7 +6,7 @@ # commands such as: # nix-build -A mypackage -{ pkgs ? import {} }: +{ pkgs ? import {}, includeDRL ? false }: let result = pkgs.lib.makeScope pkgs.newScope (self: let inherit (self) callPackage; @@ -117,31 +117,16 @@ in { }; }); - drl-hq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-hq; }; - drl-lq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-lq; }; - drl = self.drl-hq; - drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {}; - drl-audio-hq = callPackage ./pkgs/drl/audio.nix { audioQuality = "hq"; }; - drl-audio-lq = callPackage ./pkgs/drl/audio.nix { audioQuality = "lq"; }; - drl-audio = self.drl-audio-hq; - _ciOnly.drl-dev = pkgs.lib.optionalAttrs (pkgs.hostPlatform.system == "x86_64-linux") (pkgs.lib.recurseIntoAttrs { - makewad = self.drl-unwrapped.overrideAttrs (old: { - pname = "drl-makewad-test"; - buildPhase = '' - runHook preBuild - mkdir tmp - lua makefile.lua bin/makewad - runHook postBuild - ''; - installPhase = '' - runHook preInstall - install -D bin/makewad "$out"/bin/makewad - runHook postInstall - ''; - meta = {}; - }); - }) // pkgs.lib.optionalAttrs (pkgs.hostPlatform.system == "x86_64-darwin") (pkgs.lib.recurseIntoAttrs { - env = self.drl-unwrapped.overrideAttrs (old: { + # drl-hq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-hq; }; + # drl-lq = callPackage ./pkgs/drl { drl-audio = self.drl-audio-lq; }; + # drl = self.drl-hq; + # drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {}; + # drl-audio-hq = callPackage ./pkgs/drl/audio.nix { audioQuality = "hq"; }; + # drl-audio-lq = callPackage ./pkgs/drl/audio.nix { audioQuality = "lq"; }; + # drl-audio = self.drl-audio-hq; + _ciOnly.drl-dev = pkgs.lib.optionalAttrs (includeDRL && pkgs.hostPlatform.system == "x86_64-darwin") (pkgs.lib.recurseIntoAttrs rec { + drl-unwrapped = callPackage ./pkgs/drl/unwrapped.nix {}; + env = /*self.*/drl-unwrapped.overrideAttrs (old: { pname = "drl-env-test"; buildPhase = '' runHook preBuild