Skip to content

Commit

Permalink
Remove support for i686-linux (#1093)
Browse files Browse the repository at this point in the history
For more information, see our blog post on the topic:
https://determinate.systems/posts/nix-installer-i686-linux/
  • Loading branch information
cole-h authored Aug 16, 2024
1 parent b2d36bb commit 2345a10
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 29 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ The `nix-installer` has successfully completed over 2,000,000 installs in a numb
| WSL2 (x86_64 & aarch64) | ✓ (via [systemd]) || Stable |
| Podman Linux Containers | ✓ (via [systemd]) || Stable |
| Docker Containers | || Stable |
| Linux (i686) | ✓ (via [systemd]) || Unstable |

> [!NOTE]
> On **MacOS only**, removing users and/or groups may fail if there are no users who are logged in graphically.
Expand Down
13 changes: 1 addition & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
, ...
} @ inputs:
let
supportedSystems = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
systemsSupportedByDeterminateNixd = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];

forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: (forSystem system f));
Expand All @@ -65,8 +65,6 @@
stable.rust-src
] ++ nixpkgs.lib.optionals (system == "x86_64-linux") [
targets.x86_64-unknown-linux-musl.stable.rust-std
] ++ nixpkgs.lib.optionals (system == "i686-linux") [
targets.i686-unknown-linux-musl.stable.rust-std
] ++ nixpkgs.lib.optionals (system == "aarch64-linux") [
targets.aarch64-unknown-linux-musl.stable.rust-std
]);
Expand Down Expand Up @@ -149,12 +147,6 @@
(sharedAttrs // {
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
});
} // nixpkgs.lib.optionalAttrs (prev.stdenv.system == "i686-linux") rec {
default = nix-installer-static;
nix-installer-static = naerskLib.buildPackage
(sharedAttrs // {
CARGO_BUILD_TARGET = "i686-unknown-linux-musl";
});
} // nixpkgs.lib.optionalAttrs (prev.stdenv.system == "aarch64-linux") rec {
default = nix-installer-static;
nix-installer-static = naerskLib.buildPackage
Expand Down Expand Up @@ -241,9 +233,6 @@
} // nixpkgs.lib.optionalAttrs (system == "x86_64-linux") {
inherit (pkgs) nix-installer-static;
default = pkgs.nix-installer-static;
} // nixpkgs.lib.optionalAttrs (system == "i686-linux") {
inherit (pkgs) nix-installer-static;
default = pkgs.nix-installer-static;
} // nixpkgs.lib.optionalAttrs (system == "aarch64-linux") {
inherit (pkgs) nix-installer-static;
default = pkgs.nix-installer-static;
Expand Down
4 changes: 0 additions & 4 deletions nix-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ get_architecture() {
_cputype=x86_64
;;

i686)
_cputype=i686
;;

*)
err "unknown CPU type: $_cputype"
;;
Expand Down
2 changes: 0 additions & 2 deletions src/self_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ impl Shell {

#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
const SYSTEM: &str = "x86_64-linux";
#[cfg(all(target_os = "linux", target_arch = "x86"))]
const SYSTEM: &str = "x86-linux";
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
const SYSTEM: &str = "aarch64-linux";
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
Expand Down
12 changes: 2 additions & 10 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,14 @@ pub const NIX_TARBALL_PATH: &str = env!("NIX_INSTALLER_TARBALL_PATH");
/// in the resulting binary.
pub const NIX_TARBALL: &[u8] = include_bytes!(env!("NIX_INSTALLER_TARBALL_PATH"));

#[cfg(all(
feature = "determinate-nix",
// Determinate Nix is available on everything but i686-linux, so set the bytes
not(all(target_os = "linux", target_arch = "x86"))
))]
#[cfg(feature = "determinate-nix")]
/// The DETERMINATE_NIXD_BINARY_PATH environment variable should point to a target-appropriate
/// static build of the Determinate Nixd binary. The contents are embedded in the resulting
/// binary if the determinate-nix feature is turned on.
pub const DETERMINATE_NIXD_BINARY: Option<&[u8]> =
Some(include_bytes!(env!("DETERMINATE_NIXD_BINARY_PATH")));

#[cfg(not(all(
feature = "determinate-nix",
// Determinate Nix is not available on i686-linux, so default it to None
not(all(target_os = "linux", target_arch = "x86"))
)))]
#[cfg(not(feature = "determinate-nix"))]
/// The DETERMINATE_NIXD_BINARY_PATH environment variable should point to a target-appropriate
/// static build of the Determinate Nixd binary. The contents are embedded in the resulting
/// binary if the determinate-nix feature is turned on.
Expand Down

0 comments on commit 2345a10

Please sign in to comment.