diff --git a/flake.nix b/flake.nix index 14ee8e1ad..397cf0eb8 100644 --- a/flake.nix +++ b/flake.nix @@ -140,10 +140,11 @@ config.permittedInsecurePackages = [ "nix-2.13.6" ]; }; stdenvs = forAllStdenvs (make-pkgs null); + static-stdenvs = forAllStdenvs (name: (make-pkgs null name).pkgsStatic); native = stdenvs.stdenvPackages; in { - inherit stdenvs native; + inherit stdenvs native static-stdenvs; static = native.pkgsStatic; cross = forAllCrossSystems (crossSystem: make-pkgs crossSystem "stdenv"); } @@ -288,6 +289,22 @@ ); }; + # Running a static build in CI for every CL is too expensive for us right now... + # But we can at least make sure it configures successfuly, which is cheap and where + # a good chunk of issues show up. + configure-static = forAvailableSystems ( + system: + let + staticConfigure = self.packages.${system}.nix-static.overrideAttrs { + dontBuild = true; + installPhase = '' + mkdir -p "$out" + ''; + }; + in + lib.optionalAttrs (self.packages.${system} ? nix-static) staticConfigure + ); + pre-commit = forAvailableSystems ( system: let @@ -316,6 +333,9 @@ // (lib.optionalAttrs (builtins.elem system linux64BitSystems)) { dockerImage = self.hydraJobs.dockerImage.${system}; } + // (lib.optionalAttrs (self.hydraJobs.configure-static ? "${system}")) { + configure-static = self.hydraJobs.configure-static.${system}; + } ); packages = forAllSystems (