From 5929286397e5f0df55275602969b9b5affb07447 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 3 Oct 2022 01:40:52 -0700 Subject: [PATCH] update nixpkgs: 2022-09-30 -> 2022-10-02 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit have to add nixpkgs stable to pin electrum to a buildable version ``` • Updated input 'mobile-nixos': 'github:nixos/mobile-nixos/42a30393b5eccaf7f73104fc39a71f0801340f5f' (2022-10-01) → 'github:nixos/mobile-nixos/efa5b5fae930370753d2e09361b38d10f0e0a00d' (2022-10-03) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/10ecda252ce1b3b1d6403caeadbcc8f30d5ab796' (2022-09-30) → 'github:NixOS/nixpkgs/59d2991d4256cdca1c0cda45d876c80a0fe45c31' (2022-10-02) ``` --- flake.lock | 28 ++++++++++++++++++++++------ flake.nix | 10 +++++++--- machines/moby/kernel.nix | 2 +- nixpatches/10-flutter-arm64.patch | 2 +- nixpatches/list.nix | 17 ++++++++--------- 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index e3316763..3ce36cd6 100644 --- a/flake.lock +++ b/flake.lock @@ -39,11 +39,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1664594671, - "narHash": "sha256-45uQc6ssGkFW8xjWn3pcrPPpCoAZdwFL6dkTRgXokFg=", + "lastModified": 1664761265, + "narHash": "sha256-2noCNHb6oqvrWIEx6xG50E4hjmenxMnMTtfneRvGRTI=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "42a30393b5eccaf7f73104fc39a71f0801340f5f", + "rev": "efa5b5fae930370753d2e09361b38d10f0e0a00d", "type": "github" }, "original": { @@ -54,11 +54,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1664538465, - "narHash": "sha256-EnlC7dDKX7X1wlnXkB1gmn9rBZQ0J9+biVTZHw//8us=", + "lastModified": 1664687381, + "narHash": "sha256-9czSuDzS+OGGwq2kC4KXBLXWfYaup+oLB+AA1Md25U4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "10ecda252ce1b3b1d6403caeadbcc8f30d5ab796", + "rev": "59d2991d4256cdca1c0cda45d876c80a0fe45c31", "type": "github" }, "original": { @@ -83,6 +83,21 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1664594436, + "narHash": "sha256-YHowMADGzdi7fKnGlg47qe0PIljq+11VqLarmXDuKxQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9cac45850280978a21a3eb67b15a18f34cbffa2d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.05", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1664177230, @@ -105,6 +120,7 @@ "impermanence": "impermanence", "mobile-nixos": "mobile-nixos", "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index 5dae8b1e..6f177ecf 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ { inputs = { - # nixpkgs.url = "nixpkgs/nixos-22.05"; + nixpkgs-stable.url = "nixpkgs/nixos-22.05"; nixpkgs.url = "nixpkgs/nixos-unstable"; mobile-nixos = { url = "github:nixos/mobile-nixos"; @@ -14,11 +14,12 @@ url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + # TODO: set these up to follow our nixpkgs? sops-nix.url = "github:Mic92/sops-nix"; impermanence.url = "github:nix-community/impermanence"; }; - outputs = { self, nixpkgs, mobile-nixos, home-manager, sops-nix, impermanence }: + outputs = { self, nixpkgs, nixpkgs-stable, mobile-nixos, home-manager, sops-nix, impermanence }: let patchedPkgs = system: nixpkgs.legacyPackages.${system}.applyPatches { name = "nixpkgs-patched-uninsane"; @@ -49,11 +50,14 @@ nixpkgs.overlays = [ (import "${mobile-nixos}/overlay/overlay.nix") (import ./pkgs/overlay.nix) - (next: prev: { + (next: prev: rec { # non-emulated packages build *from* local *for* target. # for large packages like the linux kernel which are expensive to build under emulation, # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. cross = (nixpkgsFor local target) // (customPackagesFor local target); + stable = import nixpkgs-stable { system = target; }; + # pinned packages: + electrum = stable.electrum; }) ]; } diff --git a/machines/moby/kernel.nix b/machines/moby/kernel.nix index c959fa9d..e73b83f4 100644 --- a/machines/moby/kernel.nix +++ b/machines/moby/kernel.nix @@ -114,7 +114,7 @@ in # - phone rotation sensor is off by 90 degrees # - ambient light sensor causes screen brightness to be shakey # - phosh greeter may not appear after wake from sleep - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.cross.linux-megous; + boot.kernelPackages = pkgs.cross.linuxPackagesFor pkgs.cross.linux-megous; boot.kernelPatches = [ (patchDefconfig (kernelConfig // diff --git a/nixpatches/10-flutter-arm64.patch b/nixpatches/10-flutter-arm64.patch index a63cff67..b97e9499 100644 --- a/nixpatches/10-flutter-arm64.patch +++ b/nixpatches/10-flutter-arm64.patch @@ -11,7 +11,7 @@ index 565c44f72e9..f20a3d4e9be 100644 +let vendorHashes = { + x86_64-linux = "sha256-p5EJP2zSvWyRV1uyTHw0EpFsEwAGtX5B9WVjpLmnVew="; -+ aarch64-linux = "sha256-DVMVPCab+7tSNRKwioQXi0WZnlpvm5tIhO/l1vFX3J8="; ++ aarch64-linux = "sha256-Ps0HmDI6BFxHrLRq3KWNk4hw0qneq5hqB/Mp99f+hO4="; +}; +in flutter.mkFlutterApp rec { diff --git a/nixpatches/list.nix b/nixpatches/list.nix index cba780da..bb82a719 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -37,14 +37,6 @@ fetchpatch: [ sha256 = "sha256-GtpYSii1c/Kw1NEQ4sVR1nO/kvSa/CSIxuXxL00oBGw="; }) - # element-desktop: upgrade electron 19 -> 20 - # merged 2022/10/01 - (fetchpatch { - # url = "https://git.uninsane.org/colin/nixpkgs/commit/7e6a47b3904f5d8f2a37c35ff2d12772524727a9.diff"; - url = "https://github.com/NixOS/nixpkgs/pull/193799.diff"; - sha256 = "sha256-OcqDIoBcphGZfeeOzaS7Ip1khocpkYrpG6tMGExa3S4="; - }) - # phosh-mobile-settings: init at 0.21.1 (fetchpatch { url = "http://git.uninsane.org/colin/nixpkgs/commit/0c1a7e8504291eb0076bbee3f8ebf693f4641112.diff"; @@ -53,5 +45,12 @@ fetchpatch: [ }) # fix electrum build: https://github.com/NixOS/nixpkgs/issues/193997 - ./11-electrum-protobuf-fix.patch + # ./11-electrum-protobuf-fix.patch + # alternative fix + # electrum: make compatible with protobuf 4+ (fixes electrum build) + # both of these fail on aarch64, unclear exactly why. + (fetchpatch { + url = "https://github.com/NixOS/nixpkgs/pull/194112.diff"; + sha256 = "sha256-Nmvu1U5HBT0YQ5aTE2gf0aaglq/1WpgacCbpqP7F+Qc="; + }) ]