-
-
Save samueldr/56971b019bf23f235bee27da9a5d85c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
test-dependency = { stdenv }: | |
stdenv.mkDerivation { | |
name = "test-dependency"; | |
# This will be overriden using `.overrideAttrs` | |
buildInputs = [ (throw "Should not throw") ]; | |
installPhase = '' | |
echo ok > $out | |
''; | |
unpackPhase = ":"; | |
} | |
; | |
test-dependency-too = { runCommandNoCC }: | |
runCommandNoCC "test-dependency-too" { | |
# This will be overriden using `.overrideAttrs` | |
buildInputs = [ (throw "Should not throw") ]; | |
} '' | |
echo ok > $out | |
'' | |
; | |
pkgs = import ./. { | |
overlays = [ | |
(self: super: { | |
test-dependency = self.callPackage test-dependency {}; | |
test-dependency-too = self.callPackage test-dependency-too {}; | |
}) | |
]; | |
}; | |
in | |
{ | |
# a_ = pkgs.test-dependency | |
# .overrideAttrs(_: { /* verify it fails as expected */ }) | |
# ; | |
aa = pkgs.test-dependency | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
ab = pkgs.pkgsCross.aarch64-multiplatform.test-dependency | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
/* | |
# Why is this failing? | |
ac = pkgs.pkgsStatic.test-dependency | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
/* */ | |
# b_ = pkgs.test-dependency-too | |
# .overrideAttrs(_: { /* verify it fails as expected */ }) | |
# ; | |
ba = pkgs.test-dependency-too | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
bb = pkgs.pkgsCross.aarch64-multiplatform.test-dependency-too | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
# And why is this one not failing? | |
bc = pkgs.pkgsStatic.test-dependency-too | |
.overrideAttrs(_: { buildInputs = []; }) | |
; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment