Skip to content

Commit

Permalink
BROKEN: update nixpkgs; bumped into nixpkgs!269077
Browse files Browse the repository at this point in the history
  • Loading branch information
t184256 committed Feb 17, 2024
1 parent 45272c7 commit a2317de
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 13 deletions.
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
nixpkgs.url = "github:NixOS/nixpkgs";

# for bootstrap zip ball creation and proot-termux builds, we use a fixed version of nixpkgs to ease maintanence.
# head of nixos-23.05 as of 2023-06-18
# head of nixos-23.11 as of 2024-02-17
# note: when updating nixpkgs-for-bootstrap, update store paths of proot-termux in modules/environment/login/default.nix
nixpkgs-for-bootstrap.url = "github:NixOS/nixpkgs/c7ff1b9b95620ce8728c0d7bd501c458e6da9e04";
nixpkgs-for-bootstrap.url = "github:NixOS/nixpkgs/1d1817869c47682a6bee85b5b0a6537b6c0fba26";

home-manager = {
url = "github:nix-community/home-manager";
Expand Down
6 changes: 3 additions & 3 deletions overlays/lib/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
{ super }:

let
# head of nixos-23.05 as of 2023-06-18
# head of nixos-23.11 as of 2024-02-17
pinnedPkgsSrc = super.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04";
sha256 = "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=";
rev = "1d1817869c47682a6bee85b5b0a6537b6c0fba26";
sha256 = "sha256-sS4AItZeUnAei6v8FqxNlm+/27MPlfoGym/TZP0rmH0=";
};
in

Expand Down
51 changes: 50 additions & 1 deletion pkgs/cross-compiling/cross-pkgs-args.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,64 @@

{ config, nixpkgs, system }:

let
# lifted from
# https://gist.github.com/rrbutani/3721f17caa74e9d2851c4e698c9df449
#
# llvmPackages is a bit weird; it's two disjoint overridable sets that
# reference each other through `buildLlvmTools` and `targetLlvmLibraries`.
#
# properly overriding packages in these requires a little bit of ceremony:
modifyLlvmPackages = base:
{ toolsFunc ? final: prev: {}
, libsFunc ? final: prev: {}
}:
let
tools = base.tools.extend toolsFunc;
libraries = base.libraries.extend libsFunc;
in
{
inherit (base) release_version;
inherit tools libraries;
} // tools // libraries;
in
{
inherit system;

crossSystem = {
config = "${config.build.arch}-unknown-linux-android";
sdkVer = "32";
sdkVer = "34";
libc = "bionic";
useAndroidPrebuilt = false;
useLLVM = true;
isStatic = true;
};

# https://github.com/NixOS/nixpkgs/issues/269077
overlays = [
(_: prev: {
llvmPackages = modifyLlvmPackages prev.llvmPackages {
libsFunc = final: prev: {
inherit (prev.llvmPackages) libcxx libcxxabi;
inherit (prev.llvmPackages) libunwind openmp;
# FIXME: Neither of the overrides below work!
compiler-rt = assert false; prev.llvmPackages.compiler-rt.overrideAttrs(_: {
postPatch = "";
});
compiler-rt-libc = assert false; prev.llvmPackages.compiler-rt-libc.overrideAttrs(_: {
postPatch = "";
});
compiler-rt-no-libc = assert false; prev.llvmPackages.compiler-rt-no-libc.overrideAttrs(_: {
postPatch = "";
});
};
};
#llvmPackages_16 = prev.llvmPackages_16.override {
# targetLlvmLibraries = prev.targetPackages.llvmPackages_16.libraries.
# compiler-rt = prev.llvmPackages_16.compiler-rt.overrideAttrs(_: {
# postPatch = "";
# });
#};
})
];
}

0 comments on commit a2317de

Please sign in to comment.