diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 2547a78f..b8998010 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -10,13 +10,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Setup cachix - uses: cachix/cachix-action@v12 + uses: cachix/cachix-action@v14 with: name: nix-on-droid signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ce46326d..f4d541ec 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,10 +28,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Build docs run: | @@ -50,13 +50,13 @@ jobs: public - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v4 with: path: ./public - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/fakedroid-odt.yml b/.github/workflows/fakedroid-odt.yml index 1e40a4f2..0ff54600 100644 --- a/.github/workflows/fakedroid-odt.yml +++ b/.github/workflows/fakedroid-odt.yml @@ -10,13 +10,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Setup cachix - uses: cachix/cachix-action@v12 + uses: cachix/cachix-action@v14 with: name: nix-on-droid signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" @@ -39,13 +39,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Setup cachix - uses: cachix/cachix-action@v12 + uses: cachix/cachix-action@v14 with: name: nix-on-droid signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 2c8e2a7d..7ca5e25e 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v25 - name: Run nix-formatter-pack-check run: nix build .#checks.x86_64-linux.nix-formatter-pack-check diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f1512b3..42826b7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## Release 23.11 (unreleased) +## Release 24.05 (unreleased) + +## Release 23.11 ### New Options diff --git a/README.md b/README.md index 16004738..2e4b0e1f 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ for example: { environment.packages = [ pkgs.vim ]; - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; } ``` @@ -67,7 +67,7 @@ An alternative location is `~/.config/nixpkgs/config.nix` with the key { environment.packages = [ pkgs.vim ]; - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; }; } ``` @@ -80,7 +80,7 @@ To enable `home-manager` you simply need to follow the instructions already prov 1. Add `home-manager` channel: ```sh - nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager + nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager nix-channel --update ``` 2. Configure `home-manager`: @@ -89,7 +89,7 @@ To enable `home-manager` you simply need to follow the instructions already prov { # Read Nix-on-Droid changelog before changing this value - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # insert Nix-on-Droid config @@ -97,7 +97,7 @@ To enable `home-manager` you simply need to follow the instructions already prov { pkgs, ... }: { # Read home-manager changelog before changing this value - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; # insert home-manager config }; @@ -181,10 +181,10 @@ A minimal example could look like the following: description = "Minimal example of Nix-on-Droid system config."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nix-on-droid = { - url = "github:nix-community/nix-on-droid/release-23.05"; + url = "github:nix-community/nix-on-droid/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/docs/manual.xml b/docs/manual.xml index 083de236..78ccb877 100644 --- a/docs/manual.xml +++ b/docs/manual.xml @@ -1,4 +1,4 @@ - + { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nix-on-droid = { - url = "github:nix-community/nix-on-droid/release-23.05"; + url = "github:nix-community/nix-on-droid/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/flake.lock b/flake.lock index 06a36b79..86a41b78 100644 --- a/flake.lock +++ b/flake.lock @@ -4,15 +4,14 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1663932797, - "narHash": "sha256-IH8ZBW99W2k7wKLS+Sat9HiKX1TPZjFTnsPizK5crok=", + "lastModified": 1709445365, + "narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=", "owner": "nix-community", "repo": "home-manager", - "rev": "de3758e31a3a1bc79d569f5deb5dac39791bf9b6", + "rev": "4de84265d7ec7634a69ba75028696d74de9a44a7", "type": "github" }, "original": { @@ -30,11 +29,11 @@ "nmt": "nmt" }, "locked": { - "lastModified": 1666720474, - "narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=", + "lastModified": 1705252799, + "narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=", "owner": "Gerschtli", "repo": "nix-formatter-pack", - "rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5", + "rev": "2de39dedd79aab14c01b9e2934842051a160ffa5", "type": "github" }, "original": { @@ -45,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1664019863, - "narHash": "sha256-nXRRSPr2Jntx2hdZZMkds1fSDNUyw9N/wMtdcQ8VElU=", + "lastModified": 1708172716, + "narHash": "sha256-3M94oln0b61m3dUmLyECCA9hYAHXZEszM4saE3CmQO4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9c64b91d14268cf20ea07ea7930479a75325af9f", + "rev": "5d874ac46894c896119bce68e758e9e80bdb28f1", "type": "github" }, "original": { @@ -60,17 +59,17 @@ }, "nixpkgs-for-bootstrap": { "locked": { - "lastModified": 1686921029, - "narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=", + "lastModified": 1708105575, + "narHash": "sha256-sS4AItZeUnAei6v8FqxNlm+/27MPlfoGym/TZP0rmH0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04", + "rev": "1d1817869c47682a6bee85b5b0a6537b6c0fba26", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04", + "rev": "1d1817869c47682a6bee85b5b0a6537b6c0fba26", "type": "github" } }, @@ -139,11 +138,11 @@ "scss-reset": { "flake": false, "locked": { - "lastModified": 1683906868, - "narHash": "sha256-cif5Sx8Ca5vxdw/mNAgpulLH15TwmzyJFNM7JURpoaE=", + "lastModified": 1631450058, + "narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=", "owner": "andreymatin", "repo": "scss-reset", - "rev": "5a7bd491ac82441e6283fb0d5d54644b913b30c7", + "rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91", "type": "github" }, "original": { @@ -151,21 +150,6 @@ "repo": "scss-reset", "type": "github" } - }, - "utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index d2e0e661..9f341f1d 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/modules/build/initial-build.nix b/modules/build/initial-build.nix index e3dfba51..79490132 100644 --- a/modules/build/initial-build.nix +++ b/modules/build/initial-build.nix @@ -1,12 +1,12 @@ -# Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, pkgs, ... }: with lib; let - defaultNixpkgsBranch = "nixos-23.05"; - defaultNixOnDroidBranch = "release-23.05"; + defaultNixpkgsBranch = "nixos-23.11"; + defaultNixOnDroidBranch = "release-23.11"; defaultNixpkgsChannel = "https://nixos.org/channels/${defaultNixpkgsBranch}"; defaultNixOnDroidChannel = "https://github.com/nix-community/nix-on-droid/archive/${defaultNixOnDroidBranch}.tar.gz"; diff --git a/modules/environment/login/default.nix b/modules/environment/login/default.nix index e51fa6ce..9409c4cd 100644 --- a/modules/environment/login/default.nix +++ b/modules/environment/login/default.nix @@ -82,7 +82,7 @@ in environment.files = { inherit login loginInner; - prootStatic = "/nix/store/yrrs22jsl1y8niwzs2vvk0vblicr3903-proot-termux-static-aarch64-unknown-linux-android-unstable-2023-05-13"; + prootStatic = "/nix/store/7w09z1kw62wg7nv3q3z2p6kxf1ihk178-proot-termux-static-aarch64-unknown-linux-android-unstable-2023-11-11"; }; }; diff --git a/modules/environment/login/nix-on-droid.nix.default b/modules/environment/login/nix-on-droid.nix.default index 2ae962a8..ecccdf6c 100644 --- a/modules/environment/login/nix-on-droid.nix.default +++ b/modules/environment/login/nix-on-droid.nix.default @@ -28,7 +28,7 @@ environment.etcBackupExtension = ".bak"; # Read the changelog before changing this value - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # Set up nix for flakes #nix.extraOptions = '' @@ -39,7 +39,7 @@ #time.timeZone = "Europe/Berlin"; # After installing home-manager channel like - # nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager + # nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager # nix-channel --update # you can configure home-manager in here like #home-manager = { @@ -49,7 +49,7 @@ # { config, lib, pkgs, ... }: # { # # Read the changelog before changing this value - # home.stateVersion = "23.05"; + # home.stateVersion = "23.11"; # # # insert home-manager config # }; diff --git a/modules/environment/networking.nix b/modules/environment/networking.nix index 1c16b0f3..78206599 100644 --- a/modules/environment/networking.nix +++ b/modules/environment/networking.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. # Inspired by # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/networking.nix @@ -19,9 +19,9 @@ in ###### interface - options = { + options.networking = { - networking.hosts = lib.mkOption { + hosts = lib.mkOption { type = types.attrsOf (types.listOf types.str); default = { }; example = literalExpression '' @@ -35,7 +35,7 @@ in ''; }; - networking.hostFiles = lib.mkOption { + hostFiles = lib.mkOption { type = types.listOf types.path; defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`"; example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]''; @@ -44,7 +44,7 @@ in ''; }; - networking.extraHosts = lib.mkOption { + extraHosts = lib.mkOption { type = types.lines; default = ""; example = "192.168.0.1 lanlocalhost"; diff --git a/modules/home-manager.nix b/modules/home-manager.nix index 21d3f3bc..740c9d3c 100644 --- a/modules/home-manager.nix +++ b/modules/home-manager.nix @@ -7,7 +7,7 @@ with lib; let cfg = config.home-manager; - extendedLib = import (home-manager-path + "/modules/lib/stdlib-extended.nix") pkgs.lib; + extendedLib = import (home-manager-path + "/modules/lib/stdlib-extended.nix") lib; hmModule = types.submoduleWith { specialArgs = { lib = extendedLib; } // cfg.extraSpecialArgs; diff --git a/modules/version.nix b/modules/version.nix index eac575c4..980204d0 100644 --- a/modules/version.nix +++ b/modules/version.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, pkgs, ... }: @@ -21,6 +21,7 @@ with lib; "22.11" "23.05" "23.11" + "24.05" ]; description = '' It is occasionally necessary for Nix-on-Droid to change diff --git a/nix-on-droid/nix-on-droid.sh b/nix-on-droid/nix-on-droid.sh index f1b34fbf..d519ab80 100644 --- a/nix-on-droid/nix-on-droid.sh +++ b/nix-on-droid/nix-on-droid.sh @@ -1,6 +1,6 @@ #!@bash@/bin/bash -# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. PATH=@coreutils@/bin:@nix@/bin:${PATH:+:}$PATH @@ -97,10 +97,16 @@ function doOnDeviceTest() { fi exec "$(nix-instantiate --eval --expr \ - "")" + "")" "$@" } function doSwitch() { + if [[ -e "$HOME/.config/nix-on-droid/flake.nix" && -z "${FLAKE_CONFIG_URI}" ]]; then + echo -n '~/.config/nix-on-droid/flake.nix exists, ' + echo -n "you might've intended to run " + echo '`nix-on-droid switch --flake ~/.config/nix-on-droid`' + fi + echo "Building activation package..." nixActivationPackage build --no-link @@ -180,7 +186,7 @@ while [[ $# -gt 0 ]]; do ;; *) case $COMMAND in - switch-generation) + switch-generation|on-device-test) COMMAND_ARGS+=("$opt") ;; *) @@ -211,7 +217,7 @@ case $COMMAND in doHelp ;; on-device-test) - doOnDeviceTest + doOnDeviceTest "${COMMAND_ARGS[@]}" ;; rollback) if [[ $(readlink $PROFILE_DIRECTORY) =~ ^nix-on-droid-([0-9]+)-link$ ]]; then diff --git a/overlays/lib/nixpkgs.nix b/overlays/lib/nixpkgs.nix index 324f4744..21674d43 100644 --- a/overlays/lib/nixpkgs.nix +++ b/overlays/lib/nixpkgs.nix @@ -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 diff --git a/pkgs/bootstrap.nix b/pkgs/bootstrap.nix index 7e76299f..74c47fa3 100644 --- a/pkgs/bootstrap.nix +++ b/pkgs/bootstrap.nix @@ -1,9 +1,10 @@ -# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. { runCommand, nixDirectory, prootTermux, bash, pkgs, config, initialPackageInfo }: runCommand "bootstrap" { } '' - mkdir --parents $out/{.l2s,bin,dev/shm,etc,nix,root,tmp,usr/{bin,lib}} + mkdir --parents $out/{.l2s,bin,dev/shm,etc,root,tmp,usr/{bin,lib}} + mkdir --parents $out/nix/var/nix/{profiles,gcroots}/per-user/nix-on-droid cp --recursive ${nixDirectory}/store $out/nix/store cp --recursive ${nixDirectory}/var $out/nix/var diff --git a/pkgs/cross-compiling/compiler-rt.patch b/pkgs/cross-compiling/compiler-rt.patch new file mode 100644 index 00000000..a7d9d19b --- /dev/null +++ b/pkgs/cross-compiling/compiler-rt.patch @@ -0,0 +1,16 @@ +diff --git a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix b/pkgs/d +evelopment/compilers/llvm/16/compiler-rt/default.nix +index 0f15a9e12cde..a32533e5285c 100644 +--- a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix ++++ b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix +@@ -130,8 +130,8 @@ stdenv.mkDerivation { + # The presence of crtbegin_shared has been added and removed; it's possible + # people have added/removed it to get it working on their platforms. + # Try each in turn for now. +- ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o +- ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.o ++ #ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o ++ #ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.o + ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o + ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o + '' + lib.optionalString doFakeLibgcc '' diff --git a/pkgs/cross-compiling/cross-pkgs-args.nix b/pkgs/cross-compiling/cross-pkgs-args.nix index 7b134ab6..c0c1bbac 100644 --- a/pkgs/cross-compiling/cross-pkgs-args.nix +++ b/pkgs/cross-compiling/cross-pkgs-args.nix @@ -1,6 +1,6 @@ -# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. -{ config, nixpkgs, system }: +{ config, system }: { inherit system; diff --git a/pkgs/cross-compiling/cross-pkgs.nix b/pkgs/cross-compiling/cross-pkgs.nix new file mode 100644 index 00000000..66c29af3 --- /dev/null +++ b/pkgs/cross-compiling/cross-pkgs.nix @@ -0,0 +1,18 @@ +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. + +{ callPackage, nixpkgs, system }: + +let + args = callPackage ./cross-pkgs-args.nix { }; + pkgsCross-imported = import nixpkgs args; + pkgsCross-patched = pkgsCross-imported.applyPatches { + name = "nixpkgs-crosscompilation-patched"; + src = nixpkgs; + patches = [ + ./compiler-rt.patch + ./libunwind.patch + ]; + }; + pkgsCross = import pkgsCross-patched args; +in +pkgsCross diff --git a/pkgs/cross-compiling/libunwind.patch b/pkgs/cross-compiling/libunwind.patch new file mode 100644 index 00000000..c1746149 --- /dev/null +++ b/pkgs/cross-compiling/libunwind.patch @@ -0,0 +1,13 @@ +diff --git a/pkgs/development/compilers/llvm/16/libunwind/default.nix b/pkgs/development/compilers/llvm/16/libunwind/default.nix +index 1b677a7a2c0d..6c16e869a085 100644 +--- a/pkgs/development/compilers/llvm/16/libunwind/default.nix ++++ b/pkgs/development/compilers/llvm/16/libunwind/default.nix +@@ -49,6 +49,8 @@ stdenv.mkDerivation rec { + + nativeBuildInputs = [ cmake ninja python3 ]; + ++ LDFLAGS = "-unwindlib=none"; ++ + cmakeFlags = [ + "-DLLVM_ENABLE_RUNTIMES=libunwind" + ] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; diff --git a/pkgs/cross-compiling/proot-termux.nix b/pkgs/cross-compiling/proot-termux.nix index 7a441a14..8bbce24f 100644 --- a/pkgs/cross-compiling/proot-termux.nix +++ b/pkgs/cross-compiling/proot-termux.nix @@ -1,9 +1,9 @@ # Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. -{ callPackage, nixpkgs, tallocStatic }: +{ callPackage, tallocStatic }: let - pkgsCross = import nixpkgs (callPackage ./cross-pkgs-args.nix { }); + pkgsCross = callPackage ./cross-pkgs.nix { }; stdenv = pkgsCross.stdenvAdapters.makeStaticBinaries pkgsCross.stdenv; in diff --git a/pkgs/cross-compiling/talloc-static.nix b/pkgs/cross-compiling/talloc-static.nix index ffb8eb37..d8dff547 100644 --- a/pkgs/cross-compiling/talloc-static.nix +++ b/pkgs/cross-compiling/talloc-static.nix @@ -1,7 +1,6 @@ # Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. { callPackage -, nixpkgs , fetchurl , python3 , pkg-config @@ -9,16 +8,16 @@ }: let - pkgsCross = import nixpkgs (callPackage ./cross-pkgs-args.nix { }); + pkgsCross = callPackage ./cross-pkgs.nix { }; in pkgsCross.stdenv.mkDerivation rec { pname = "talloc"; - version = "2.4.0"; + version = "2.4.2"; src = fetchurl { url = "mirror://samba/talloc/${pname}-${version}.tar.gz"; - sha256 = "sha256-bfNoYsQkZu+I82BERROHDvRpNPkBbIQ4PMQAin0MRro="; + sha256 = "sha256-hez55GXiD5j5lQpS6aQR4UMgvFVfolfYdpe356mx2KY="; }; nativeBuildInputs = [ pkg-config python3 wafHook ]; diff --git a/pkgs/default.nix b/pkgs/default.nix index 4e7cf708..d7e77447 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. { nixpkgs , system @@ -35,7 +35,7 @@ let pkgs = pkgs.lib.mkForce pkgs; # to override ./modules/nixpkgs/config.nix }; - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # Fix invoking bash after initial build. user.shell = "${initialPackageInfo.bash}/bin/bash"; diff --git a/pkgs/nix-directory.nix b/pkgs/nix-directory.nix index 99b32468..82c371e5 100644 --- a/pkgs/nix-directory.nix +++ b/pkgs/nix-directory.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. { config, lib, stdenv, closureInfo, prootTermux, proot, pkgsStatic }: @@ -24,8 +24,8 @@ stdenv.mkDerivation { name = "nix-directory"; src = builtins.fetchurl { - url = "https://nixos.org/releases/nix/nix-2.16.1/nix-2.16.1-${config.build.arch}-linux.tar.xz"; - sha256 = "1v7k1cajyxgaq3adrzykaf0a32n5pyrd7njy0rns1fma85y8n944"; + url = "https://nixos.org/releases/nix/nix-2.20.4/nix-2.20.4-${config.build.arch}-linux.tar.xz"; + sha256 = "sha256:10nk5dn5mhlql3842jn8ikvywcidgfjycfqcv7cg9i97lgi12x0q"; }; PROOT_NO_SECCOMP = 1; # see https://github.com/proot-me/PRoot/issues/106 diff --git a/pkgs/proot-termux/default.nix b/pkgs/proot-termux/default.nix index f14c4ef6..06e4b4dd 100644 --- a/pkgs/proot-termux/default.nix +++ b/pkgs/proot-termux/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation { pname = "proot-termux"; - version = "unstable-2023-05-13"; + version = "unstable-2023-11-11"; src = fetchFromGitHub { repo = "proot"; owner = "termux"; - rev = "2d7c70eec7e2688e465c7bfba60c927fad0abfb1"; - sha256 = "sha256-FgK5Rvl95yfH+aqTsJZ8HzSsCYIE3iLiQMFIlw0Z6oc="; + rev = "4af79603dae7a12d8767b61937d9e7e41e517701"; + sha256 = "sha256-7N2szHcjMB76GfzsQbn3eAkpLomd9FKSB2qU9d7L4Uw="; }; # ashmem.h is rather small, our needs are even smaller, so just define these: @@ -23,14 +23,18 @@ stdenv.mkDerivation { mkdir -p fake-ashmem/linux; cat > fake-ashmem/linux/ashmem.h << EOF #include #include + #include #define __ASHMEMIOC 0x77 #define ASHMEM_NAME_LEN 256 #define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN]) #define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t) #define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4) EOF + substituteInPlace src/arch.h --replace \ + '#define HAS_LOADER_32BIT true' \ + "" + ! (grep -F '#define HAS_LOADER_32BIT' src/arch.h) ''; - buildInputs = [ talloc ]; patches = [ ./detranslate-empty.patch ]; makeFlags = [ "-Csrc" "V=1" ]; diff --git a/templates/advanced/flake.nix b/templates/advanced/flake.nix index be3b3cf4..24066d5f 100644 --- a/templates/advanced/flake.nix +++ b/templates/advanced/flake.nix @@ -2,15 +2,15 @@ description = "Advanced example of Nix-on-Droid system config with home-manager."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-on-droid = { - url = "github:nix-community/nix-on-droid/release-23.05"; + url = "github:nix-community/nix-on-droid/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; diff --git a/templates/advanced/home.nix b/templates/advanced/home.nix index 74c24937..958bf39c 100644 --- a/templates/advanced/home.nix +++ b/templates/advanced/home.nix @@ -2,7 +2,7 @@ { # Read the changelog before changing this value - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; # insert home-manager config } diff --git a/templates/advanced/nix-on-droid.nix b/templates/advanced/nix-on-droid.nix index 686d7861..1591d517 100644 --- a/templates/advanced/nix-on-droid.nix +++ b/templates/advanced/nix-on-droid.nix @@ -28,7 +28,7 @@ environment.etcBackupExtension = ".bak"; # Read the changelog before changing this value - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # Set up nix for flakes nix.extraOptions = '' diff --git a/templates/home-manager/flake.nix b/templates/home-manager/flake.nix index 464a1338..eaf07b8f 100644 --- a/templates/home-manager/flake.nix +++ b/templates/home-manager/flake.nix @@ -2,15 +2,15 @@ description = "Minimal example of Nix-on-Droid system config with home-manager."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-on-droid = { - url = "github:nix-community/nix-on-droid/release-23.05"; + url = "github:nix-community/nix-on-droid/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; diff --git a/templates/home-manager/nix-on-droid.nix b/templates/home-manager/nix-on-droid.nix index 9b7d2625..7a53b8e5 100644 --- a/templates/home-manager/nix-on-droid.nix +++ b/templates/home-manager/nix-on-droid.nix @@ -28,7 +28,7 @@ environment.etcBackupExtension = ".bak"; # Read the changelog before changing this value - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # Set up nix for flakes nix.extraOptions = '' @@ -47,7 +47,7 @@ { config, lib, pkgs, ... }: { # Read the changelog before changing this value - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; # insert home-manager config }; diff --git a/templates/minimal/flake.nix b/templates/minimal/flake.nix index cb6444b8..422e4901 100644 --- a/templates/minimal/flake.nix +++ b/templates/minimal/flake.nix @@ -2,10 +2,10 @@ description = "Basic example of Nix-on-Droid system config."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nix-on-droid = { - url = "github:nix-community/nix-on-droid/release-23.05"; + url = "github:nix-community/nix-on-droid/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/templates/minimal/nix-on-droid.nix b/templates/minimal/nix-on-droid.nix index b98b1905..c1bcd1f8 100644 --- a/templates/minimal/nix-on-droid.nix +++ b/templates/minimal/nix-on-droid.nix @@ -28,7 +28,7 @@ environment.etcBackupExtension = ".bak"; # Read the changelog before changing this value - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # Set up nix for flakes nix.extraOptions = '' diff --git a/tests/fakedroid.sh b/tests/fakedroid.sh index f5090341..c85c328e 100644 --- a/tests/fakedroid.sh +++ b/tests/fakedroid.sh @@ -59,7 +59,6 @@ PROOT_ARGS=( "-b" "/dev" "-b" "/proc" "-b" "/sys" - "--link2symlink" ) diff --git a/tests/on-device/.run.sh b/tests/on-device/.run.sh index 9081e488..9de30325 100755 --- a/tests/on-device/.run.sh +++ b/tests/on-device/.run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env nix-shell #! nix-shell -i bash -p bats ncurses -# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. set -ueo pipefail @@ -41,6 +41,6 @@ fi mkdir -p ~/.config/nixpkgs -bats "${SCRIPT_DIR}" --verbose-run --timing --pretty +bats "${SCRIPT_DIR}" --verbose-run --timing --pretty "$@" _cleanup diff --git a/tests/on-device/config-flake-default.nix b/tests/on-device/config-flake-default.nix index 326725f1..52d9f820 100644 --- a/tests/on-device/config-flake-default.nix +++ b/tests/on-device/config-flake-default.nix @@ -2,7 +2,7 @@ description = "Nix-on-Droid configuration"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; nix-on-droid.url = "<>"; nix-on-droid.inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/tests/on-device/config-flake-h-m.cfg.nix b/tests/on-device/config-flake-h-m.cfg.nix index 6f01150f..dfc9c4f3 100644 --- a/tests/on-device/config-flake-h-m.cfg.nix +++ b/tests/on-device/config-flake-h-m.cfg.nix @@ -1,7 +1,7 @@ { pkgs, config, ... }: { - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; # no nixpkgs.overlays defined environment.packages = with pkgs; [ zsh ]; @@ -9,7 +9,7 @@ home-manager.config = { pkgs, ... }: { - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; nixpkgs.overlays = config.nixpkgs.overlays; home.packages = with pkgs; [ dash ]; diff --git a/tests/on-device/config-flake-h-m.flake.nix b/tests/on-device/config-flake-h-m.flake.nix index 8af3a1d2..8a2f3e20 100644 --- a/tests/on-device/config-flake-h-m.flake.nix +++ b/tests/on-device/config-flake-h-m.flake.nix @@ -2,11 +2,13 @@ description = "Nix-on-Droid configuration"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; - home-manager.url = "github:nix-community/home-manager/release-23.05"; - nix-on-droid.url = "<>"; - nix-on-droid.inputs.nixpkgs.follows = "nixpkgs"; - nix-on-droid.inputs.home-manager.follows = "home-manager"; + nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; + home-manager.url = "github:nix-community/home-manager/release-23.11"; + nix-on-droid = { + url = "<>"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; }; outputs = { nix-on-droid, ... }: { diff --git a/tests/on-device/config-flake-hosts-localhost.cfg.nix b/tests/on-device/config-flake-hosts-localhost.cfg.nix index f32e6e88..157308a5 100644 --- a/tests/on-device/config-flake-hosts-localhost.cfg.nix +++ b/tests/on-device/config-flake-hosts-localhost.cfg.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; networking.hosts."127.0.0.2" = [ "localhost" ]; } diff --git a/tests/on-device/config-flake-hosts.cfg.nix b/tests/on-device/config-flake-hosts.cfg.nix index b2f3ad08..a633fa34 100644 --- a/tests/on-device/config-flake-hosts.cfg.nix +++ b/tests/on-device/config-flake-hosts.cfg.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; networking = { hosts."127.0.0.2" = [ "a" "b" ]; diff --git a/tests/on-device/config-flake.nix b/tests/on-device/config-flake.nix index 9be93e28..31bf1f50 100644 --- a/tests/on-device/config-flake.nix +++ b/tests/on-device/config-flake.nix @@ -2,7 +2,7 @@ description = "Nix-on-Droid configuration"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; nix-on-droid.url = "<>"; nix-on-droid.inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/tests/on-device/config-h-m.bats b/tests/on-device/config-h-m.bats index dbc8750e..1ffc00e6 100644 --- a/tests/on-device/config-h-m.bats +++ b/tests/on-device/config-h-m.bats @@ -21,7 +21,7 @@ teardown() { [[ ! -e ~/.config/example ]] # set up / build / activate the configuration - nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager + nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager nix-channel --update cp "$ON_DEVICE_TESTS_DIR/config-h-m.nix" ~/.config/nixpkgs/nix-on-droid.nix nix-on-droid switch diff --git a/tests/on-device/config-h-m.nix b/tests/on-device/config-h-m.nix index 9f23a3ef..be8bd391 100644 --- a/tests/on-device/config-h-m.nix +++ b/tests/on-device/config-h-m.nix @@ -1,12 +1,12 @@ { pkgs, config, ... }: { - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; home-manager.config = { pkgs, lib, ... }: { - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; nixpkgs = { inherit (config.nixpkgs) overlays; }; # example config diff --git a/tests/on-device/config-term-colors.nix b/tests/on-device/config-term-colors.nix index ee266766..ec3d8f4a 100644 --- a/tests/on-device/config-term-colors.nix +++ b/tests/on-device/config-term-colors.nix @@ -1,7 +1,7 @@ _: { - system.stateVersion = "23.05"; + system.stateVersion = "23.11"; terminal.colors = { background = "#FFFFFF"; foreground = "#000000";