mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Formatting
This commit is contained in:
parent
4055239936
commit
6c61d0ab8c
2 changed files with 122 additions and 121 deletions
59
flake.nix
59
flake.nix
|
@ -34,7 +34,9 @@
|
||||||
|
|
||||||
officialRelease = true;
|
officialRelease = true;
|
||||||
|
|
||||||
linux32BitSystems = [ /* "i686-linux" */ ];
|
linux32BitSystems = [
|
||||||
|
# "i686-linux"
|
||||||
|
];
|
||||||
linux64BitSystems = [
|
linux64BitSystems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -345,7 +347,7 @@
|
||||||
# These attributes go right into `packages.<system>`.
|
# These attributes go right into `packages.<system>`.
|
||||||
"${pkgName}" = nixpkgsFor.${system}.native.nixComponents.${pkgName};
|
"${pkgName}" = nixpkgsFor.${system}.native.nixComponents.${pkgName};
|
||||||
#"${pkgName}-static" = nixpkgsFor.${system}.static.nixComponents.${pkgName};
|
#"${pkgName}-static" = nixpkgsFor.${system}.static.nixComponents.${pkgName};
|
||||||
"${pkgName}-llvm" = nixpkgsFor.${system}.llvm.nixComponents.${pkgName};
|
#"${pkgName}-llvm" = nixpkgsFor.${system}.llvm.nixComponents.${pkgName};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs supportsCross (
|
// lib.optionalAttrs supportsCross (
|
||||||
flatMapAttrs (lib.genAttrs crossSystems (_: { })) (
|
flatMapAttrs (lib.genAttrs crossSystems (_: { })) (
|
||||||
|
@ -402,35 +404,34 @@
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// lib.optionalAttrs (!nixpkgsFor.${system}.native.stdenv.isDarwin) (
|
/*
|
||||||
/*
|
// lib.optionalAttrs (!nixpkgsFor.${system}.native.stdenv.isDarwin) (
|
||||||
prefixAttrs "static" (
|
prefixAttrs "static" (
|
||||||
forAllStdenvs (
|
forAllStdenvs (
|
||||||
stdenvName:
|
stdenvName:
|
||||||
makeShell {
|
makeShell {
|
||||||
pkgs = nixpkgsFor.${system}.stdenvs."${stdenvName}Packages".pkgsStatic;
|
pkgs = nixpkgsFor.${system}.stdenvs."${stdenvName}Packages".pkgsStatic;
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
// prefixAttrs "llvm" (
|
||||||
|
forAllStdenvs (
|
||||||
|
stdenvName:
|
||||||
|
makeShell {
|
||||||
|
pkgs = nixpkgsFor.${system}.stdenvs."${stdenvName}Packages".pkgsLLVM;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
// prefixAttrs "cross" (
|
||||||
|
forAllCrossSystems (
|
||||||
|
crossSystem:
|
||||||
|
makeShell {
|
||||||
|
pkgs = nixpkgsFor.${system}.cross.${crossSystem};
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
//
|
*/
|
||||||
*/
|
|
||||||
prefixAttrs "llvm" (
|
|
||||||
forAllStdenvs (
|
|
||||||
stdenvName:
|
|
||||||
makeShell {
|
|
||||||
pkgs = nixpkgsFor.${system}.stdenvs."${stdenvName}Packages".pkgsLLVM;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
// prefixAttrs "cross" (
|
|
||||||
forAllCrossSystems (
|
|
||||||
crossSystem:
|
|
||||||
makeShell {
|
|
||||||
pkgs = nixpkgsFor.${system}.cross.${crossSystem};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
// {
|
// {
|
||||||
default = self.devShells.${system}.native-stdenvPackages;
|
default = self.devShells.${system}.native-stdenvPackages;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,62 +66,62 @@ in
|
||||||
)) [ "i686-linux" ];
|
)) [ "i686-linux" ];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
buildStatic = forAllPackages (
|
buildStatic = forAllPackages (
|
||||||
pkgName:
|
pkgName:
|
||||||
lib.genAttrs linux64BitSystems (system: nixpkgsFor.${system}.static.nixComponents.${pkgName})
|
lib.genAttrs linux64BitSystems (system: nixpkgsFor.${system}.static.nixComponents.${pkgName})
|
||||||
);
|
);
|
||||||
|
|
||||||
buildCross = forAllPackages (
|
buildCross = forAllPackages (
|
||||||
pkgName:
|
pkgName:
|
||||||
# Hack to avoid non-evaling package
|
# Hack to avoid non-evaling package
|
||||||
(
|
|
||||||
if pkgName == "nix-functional-tests" then
|
|
||||||
lib.flip builtins.removeAttrs [ "x86_64-w64-mingw32" ]
|
|
||||||
else
|
|
||||||
lib.id
|
|
||||||
)
|
|
||||||
(
|
(
|
||||||
forAllCrossSystems (
|
if pkgName == "nix-functional-tests" then
|
||||||
crossSystem:
|
lib.flip builtins.removeAttrs [ "x86_64-w64-mingw32" ]
|
||||||
lib.genAttrs [ "x86_64-linux" ] (
|
else
|
||||||
system: nixpkgsFor.${system}.cross.${crossSystem}.nixComponents.${pkgName}
|
lib.id
|
||||||
|
)
|
||||||
|
(
|
||||||
|
forAllCrossSystems (
|
||||||
|
crossSystem:
|
||||||
|
lib.genAttrs [ "x86_64-linux" ] (
|
||||||
|
system: nixpkgsFor.${system}.cross.${crossSystem}.nixComponents.${pkgName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
);
|
||||||
);
|
|
||||||
|
|
||||||
buildNoGc =
|
buildNoGc =
|
||||||
let
|
let
|
||||||
components = forAllSystems (
|
components = forAllSystems (
|
||||||
system:
|
system:
|
||||||
nixpkgsFor.${system}.native.nixComponents.overrideScope (
|
nixpkgsFor.${system}.native.nixComponents.overrideScope (
|
||||||
self: super: {
|
self: super: {
|
||||||
nix-expr = super.nix-expr.override { enableGC = false; };
|
nix-expr = super.nix-expr.override { enableGC = false; };
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName}));
|
forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName}));
|
||||||
|
|
||||||
buildNoTests = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.nix-cli);
|
buildNoTests = forAllSystems (system: nixpkgsFor.${system}.native.nixComponents.nix-cli);
|
||||||
|
|
||||||
# Toggles some settings for better coverage. Windows needs these
|
# Toggles some settings for better coverage. Windows needs these
|
||||||
# library combinations, and Debian build Nix with GNU readline too.
|
# library combinations, and Debian build Nix with GNU readline too.
|
||||||
buildReadlineNoMarkdown =
|
buildReadlineNoMarkdown =
|
||||||
let
|
let
|
||||||
components = forAllSystems (
|
components = forAllSystems (
|
||||||
system:
|
system:
|
||||||
nixpkgsFor.${system}.native.nixComponents.overrideScope (
|
nixpkgsFor.${system}.native.nixComponents.overrideScope (
|
||||||
self: super: {
|
self: super: {
|
||||||
nix-cmd = super.nix-cmd.override {
|
nix-cmd = super.nix-cmd.override {
|
||||||
enableMarkdown = false;
|
enableMarkdown = false;
|
||||||
readlineFlavor = "readline";
|
readlineFlavor = "readline";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName}));
|
forAllPackages (pkgName: forAllSystems (system: components.${system}.${pkgName}));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# Perl bindings for various platforms.
|
# Perl bindings for various platforms.
|
||||||
|
@ -135,31 +135,31 @@ in
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
binaryTarballCross = lib.genAttrs [ "x86_64-linux" ] (
|
binaryTarballCross = lib.genAttrs [ "x86_64-linux" ] (
|
||||||
system:
|
system:
|
||||||
forAllCrossSystems (
|
forAllCrossSystems (
|
||||||
crossSystem:
|
crossSystem:
|
||||||
binaryTarball nixpkgsFor.${system}.cross.${crossSystem}.nix
|
binaryTarball nixpkgsFor.${system}.cross.${crossSystem}.nix
|
||||||
nixpkgsFor.${system}.cross.${crossSystem}
|
nixpkgsFor.${system}.cross.${crossSystem}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
# The first half of the installation script. This is uploaded
|
# The first half of the installation script. This is uploaded
|
||||||
# to https://nixos.org/nix/install. It downloads the binary
|
# to https://nixos.org/nix/install. It downloads the binary
|
||||||
# tarball for the user's system and calls the second half of the
|
# tarball for the user's system and calls the second half of the
|
||||||
# installation script.
|
# installation script.
|
||||||
installerScript = installScriptFor [
|
installerScript = installScriptFor [
|
||||||
# Native
|
# Native
|
||||||
self.hydraJobs.binaryTarball."x86_64-linux"
|
self.hydraJobs.binaryTarball."x86_64-linux"
|
||||||
self.hydraJobs.binaryTarball."i686-linux"
|
self.hydraJobs.binaryTarball."i686-linux"
|
||||||
self.hydraJobs.binaryTarball."aarch64-linux"
|
self.hydraJobs.binaryTarball."aarch64-linux"
|
||||||
self.hydraJobs.binaryTarball."x86_64-darwin"
|
self.hydraJobs.binaryTarball."x86_64-darwin"
|
||||||
self.hydraJobs.binaryTarball."aarch64-darwin"
|
self.hydraJobs.binaryTarball."aarch64-darwin"
|
||||||
# Cross
|
# Cross
|
||||||
self.hydraJobs.binaryTarballCross."x86_64-linux"."armv6l-unknown-linux-gnueabihf"
|
self.hydraJobs.binaryTarballCross."x86_64-linux"."armv6l-unknown-linux-gnueabihf"
|
||||||
self.hydraJobs.binaryTarballCross."x86_64-linux"."armv7l-unknown-linux-gnueabihf"
|
self.hydraJobs.binaryTarballCross."x86_64-linux"."armv7l-unknown-linux-gnueabihf"
|
||||||
self.hydraJobs.binaryTarballCross."x86_64-linux"."riscv64-unknown-linux-gnu"
|
self.hydraJobs.binaryTarballCross."x86_64-linux"."riscv64-unknown-linux-gnu"
|
||||||
];
|
];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
installerScriptForGHA = forAllSystems (
|
installerScriptForGHA = forAllSystems (
|
||||||
|
@ -232,25 +232,25 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
installTests = forAllSystems (
|
installTests = forAllSystems (
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system}.native;
|
pkgs = nixpkgsFor.${system}.native;
|
||||||
in
|
in
|
||||||
pkgs.runCommand "install-tests" {
|
pkgs.runCommand "install-tests" {
|
||||||
againstSelf = testNixVersions pkgs pkgs.nix;
|
againstSelf = testNixVersions pkgs pkgs.nix;
|
||||||
againstCurrentLatest =
|
againstCurrentLatest =
|
||||||
# FIXME: temporarily disable this on macOS because of #3605.
|
# FIXME: temporarily disable this on macOS because of #3605.
|
||||||
if system == "x86_64-linux" then testNixVersions pkgs pkgs.nixVersions.latest else null;
|
if system == "x86_64-linux" then testNixVersions pkgs pkgs.nixVersions.latest else null;
|
||||||
# Disabled because the latest stable version doesn't handle
|
# Disabled because the latest stable version doesn't handle
|
||||||
# `NIX_DAEMON_SOCKET_PATH` which is required for the tests to work
|
# `NIX_DAEMON_SOCKET_PATH` which is required for the tests to work
|
||||||
# againstLatestStable = testNixVersions pkgs pkgs.nixStable;
|
# againstLatestStable = testNixVersions pkgs pkgs.nixStable;
|
||||||
} "touch $out"
|
} "touch $out"
|
||||||
);
|
);
|
||||||
|
|
||||||
installerTests = import ../tests/installer {
|
installerTests = import ../tests/installer {
|
||||||
binaryTarballs = self.hydraJobs.binaryTarball;
|
binaryTarballs = self.hydraJobs.binaryTarball;
|
||||||
inherit nixpkgsFor;
|
inherit nixpkgsFor;
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue