bootstrap: update nixpkgs version

This commit is contained in:
Tobias Happ 2022-12-01 22:47:04 +01:00 committed by Alexander Sosedkin
parent a45761bc87
commit 3dfb9d44b5
5 changed files with 13 additions and 11 deletions

8
flake.lock generated
View file

@ -60,17 +60,17 @@
}, },
"nixpkgs-for-bootstrap": { "nixpkgs-for-bootstrap": {
"locked": { "locked": {
"lastModified": 1656265786, "lastModified": 1669834992,
"narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", "narHash": "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cd90e773eae83ba7733d2377b6cdf84d45558780", "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cd90e773eae83ba7733d2377b6cdf84d45558780", "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502",
"type": "github" "type": "github"
} }
}, },

View file

@ -5,9 +5,9 @@
nixpkgs.url = "github:NixOS/nixpkgs"; nixpkgs.url = "github:NixOS/nixpkgs";
# for bootstrap zip ball creation and proot-termux builds, we use a fixed version of nixpkgs to ease maintanence. # for bootstrap zip ball creation and proot-termux builds, we use a fixed version of nixpkgs to ease maintanence.
# head of nixos-22.05 as of 2022-06-27 # head of nixos-22.11 as of 2022-12-01
# note: when updating nixpkgs-for-bootstrap, update store paths of proot-termux in modules/environment/login/default.nix # 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/cd90e773eae83ba7733d2377b6cdf84d45558780"; nixpkgs-for-bootstrap.url = "github:NixOS/nixpkgs/596a8e828c5dfa504f91918d0fa4152db3ab5502";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";

View file

@ -82,7 +82,7 @@ in
environment.files = { environment.files = {
inherit login loginInner; inherit login loginInner;
prootStatic = "/nix/store/wsgnxpmrdmjy7qrsxvp7r5jandbabzjl-proot-termux-static-aarch64-unknown-linux-android-unstable-2022-05-03"; prootStatic = "/nix/store/8xg8jnaczivjjrd9nq38qvrp9z7avib1-proot-termux-static-aarch64-unknown-linux-android-unstable-2022-05-03";
}; };
}; };

View file

@ -3,12 +3,12 @@
{ super }: { super }:
let let
# head of nixos-22.05 as of 2022-06-27 # head of nixos-22.11 as of 2022-12-01
pinnedPkgsSrc = super.fetchFromGitHub { pinnedPkgsSrc = super.fetchFromGitHub {
owner = "NixOS"; owner = "NixOS";
repo = "nixpkgs"; repo = "nixpkgs";
rev = "cd90e773eae83ba7733d2377b6cdf84d45558780"; rev = "596a8e828c5dfa504f91918d0fa4152db3ab5502";
sha256 = "1b2wn1ncx9x4651vfcgyqrm93pd7ghnrgqjbkf6ckkpidah69m03"; sha256 = "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=";
}; };
in in

View file

@ -8,6 +8,7 @@ let
prootCommand = lib.concatStringsSep " " [ prootCommand = lib.concatStringsSep " " [
"${proot}/bin/proot" "${proot}/bin/proot"
"-b ${pkgsStatic.nix}:/static-nix" "-b ${pkgsStatic.nix}:/static-nix"
"-b /proc:/proc" # needed because tries to access /proc/self/exe
"-r ${buildRootDirectory}" "-r ${buildRootDirectory}"
"-w /" "-w /"
]; ];
@ -30,7 +31,8 @@ stdenv.mkDerivation {
PROOT_NO_SECCOMP = 1; # see https://github.com/proot-me/PRoot/issues/106 PROOT_NO_SECCOMP = 1; # see https://github.com/proot-me/PRoot/issues/106
buildPhase = '' buildPhase = ''
mkdir --parents ${buildRootDirectory}/nix # create nix state directory to satisfy nix heuristics to recognize the manual create /nix directory as valid nix store
mkdir --parents ${buildRootDirectory}/nix/var/nix/db
cp --recursive store ${buildRootDirectory}/nix/store cp --recursive store ${buildRootDirectory}/nix/store
CACERT=$(find ${buildRootDirectory}/nix/store -path '*-nss-cacert-*/ca-bundle.crt' | sed 's,^${buildRootDirectory},,') CACERT=$(find ${buildRootDirectory}/nix/store -path '*-nss-cacert-*/ca-bundle.crt' | sed 's,^${buildRootDirectory},,')