Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.0 kB · 51 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152{ pkgs, haskellPackages }:
let # This can be regenerated by running `cabal2nix ./src` in the current directory. pkgDef = { mkDerivation, base, lib, }: mkDerivation { pname = "haskell-setBuildTarget"; version = "0.1.0.0"; src = ./src; isLibrary = false; isExecutable = true; executableHaskellDepends = [ base ]; license = "unknown"; };
drv = haskellPackages.callPackage pkgDef { };
test = target: excluded: let only = pkgs.haskell.lib.compose.setBuildTarget target drv; in '' if [[ ! -f "${only}/bin/${target}" ]]; then echo "${target} was not built" exit 1 fi
if [[ -f "${only}/bin/${excluded}" ]]; then echo "${excluded} was built, when it should not have been" exit 1 fi '';
inpkgs.runCommand "test haskell.lib.compose.setBuildTarget" { meta = { inherit (drv.meta) platforms; }; } '' ${test "foo" "bar"} ${test "bar" "foo"} touch "$out" ''