Loading flake.nix +12 −9 Original line number Diff line number Diff line Loading @@ -5,14 +5,15 @@ outputs = { self }: let jobs = import ./pkgs/top-level/release.nix { nixpkgs = self; }; libVersionInfoOverlay = import ./lib/flake-version-info.nix self; lib = (import ./lib).extend libVersionInfoOverlay; forAllSystems = lib.genAttrs lib.systems.flakeExposed; jobs = forAllSystems (system: import ./pkgs/top-level/release.nix { nixpkgs = self; inherit system; }); in { lib = lib.extend (final: prev: { Loading Loading @@ -43,12 +44,14 @@ ); }); checks.x86_64-linux = { tarball = jobs.tarball; checks = forAllSystems (system: { tarball = jobs.${system}.tarball; } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.isLinux) { # Test that ensures that the nixosSystem function can accept a lib argument # Note: prefer not to extend or modify `lib`, especially if you want to share reusable modules # alternatives include: `import` a file, or put a custom library in an option or in `_module.args.<libname>` nixosSystemAcceptsLib = (self.lib.nixosSystem { pkgs = self.legacyPackages.${system}; lib = self.lib.extend (final: prev: { ifThisFunctionIsMissingTheTestFails = final.id; }); Loading @@ -64,13 +67,13 @@ }) ]; }).config.system.build.toplevel; }; }); htmlDocs = { nixpkgsManual = jobs.manual; nixpkgsManual = builtins.mapAttrs (_: jobSet: jobSet.manual) jobs; nixosManual = (import ./nixos/release-small.nix { nixpkgs = self; }).nixos.manual.x86_64-linux; }).nixos.manual; }; # The "legacy" in `legacyPackages` doesn't imply that the packages exposed Loading lib/tests/release.nix +3 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ in # # https://github.com/NixOS/nixpkgs/issues/272591 # [(import ../../pkgs/test/release {})] [(import ../../pkgs/test/release { inherit pkgs lib nix; })] ; } pkgs/top-level/release-lib.nix +2 −1 Original line number Diff line number Diff line { supportedSystems , system ? builtins.currentSystem , packageSet ? (import ../..) , scrubJobs ? true , # Attributes passed to nixpkgs. Don't build packages marked as unfree. Loading Loading @@ -33,7 +34,7 @@ let systems ; pkgs = packageSet (recursiveUpdate { system = "x86_64-linux"; config.allowUnsupportedSystem = true; } nixpkgsArgs); pkgs = packageSet (recursiveUpdate { inherit system; config.allowUnsupportedSystem = true; } nixpkgsArgs); hydraJob' = if scrubJobs then hydraJob else id; Loading pkgs/top-level/release.nix +2 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux */ { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } , system ? builtins.currentSystem , officialRelease ? false # The platform doubles for which we build Nixpkgs. , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] Loading Loading @@ -54,7 +55,7 @@ let release-lib = import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; inherit supportedSystems scrubJobs nixpkgsArgs system; }; inherit (release-lib) mapTestOn pkgs; Loading Loading
flake.nix +12 −9 Original line number Diff line number Diff line Loading @@ -5,14 +5,15 @@ outputs = { self }: let jobs = import ./pkgs/top-level/release.nix { nixpkgs = self; }; libVersionInfoOverlay = import ./lib/flake-version-info.nix self; lib = (import ./lib).extend libVersionInfoOverlay; forAllSystems = lib.genAttrs lib.systems.flakeExposed; jobs = forAllSystems (system: import ./pkgs/top-level/release.nix { nixpkgs = self; inherit system; }); in { lib = lib.extend (final: prev: { Loading Loading @@ -43,12 +44,14 @@ ); }); checks.x86_64-linux = { tarball = jobs.tarball; checks = forAllSystems (system: { tarball = jobs.${system}.tarball; } // lib.optionalAttrs (self.legacyPackages.${system}.stdenv.isLinux) { # Test that ensures that the nixosSystem function can accept a lib argument # Note: prefer not to extend or modify `lib`, especially if you want to share reusable modules # alternatives include: `import` a file, or put a custom library in an option or in `_module.args.<libname>` nixosSystemAcceptsLib = (self.lib.nixosSystem { pkgs = self.legacyPackages.${system}; lib = self.lib.extend (final: prev: { ifThisFunctionIsMissingTheTestFails = final.id; }); Loading @@ -64,13 +67,13 @@ }) ]; }).config.system.build.toplevel; }; }); htmlDocs = { nixpkgsManual = jobs.manual; nixpkgsManual = builtins.mapAttrs (_: jobSet: jobSet.manual) jobs; nixosManual = (import ./nixos/release-small.nix { nixpkgs = self; }).nixos.manual.x86_64-linux; }).nixos.manual; }; # The "legacy" in `legacyPackages` doesn't imply that the packages exposed Loading
lib/tests/release.nix +3 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ in # # https://github.com/NixOS/nixpkgs/issues/272591 # [(import ../../pkgs/test/release {})] [(import ../../pkgs/test/release { inherit pkgs lib nix; })] ; }
pkgs/top-level/release-lib.nix +2 −1 Original line number Diff line number Diff line { supportedSystems , system ? builtins.currentSystem , packageSet ? (import ../..) , scrubJobs ? true , # Attributes passed to nixpkgs. Don't build packages marked as unfree. Loading Loading @@ -33,7 +34,7 @@ let systems ; pkgs = packageSet (recursiveUpdate { system = "x86_64-linux"; config.allowUnsupportedSystem = true; } nixpkgsArgs); pkgs = packageSet (recursiveUpdate { inherit system; config.allowUnsupportedSystem = true; } nixpkgsArgs); hydraJob' = if scrubJobs then hydraJob else id; Loading
pkgs/top-level/release.nix +2 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux */ { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } , system ? builtins.currentSystem , officialRelease ? false # The platform doubles for which we build Nixpkgs. , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] Loading Loading @@ -54,7 +55,7 @@ let release-lib = import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; inherit supportedSystems scrubJobs nixpkgsArgs system; }; inherit (release-lib) mapTestOn pkgs; Loading