Skip to content

Commit 95c683b

Browse files
committed
Pin go version via nixpkgs
There's a bug in >= go1.22.5 that breaks gio apps on android: golang/go#68285 Pin to nixpkgs with go.1.22.3 until there is a released fix for this. The rev here has an existing hydra build available
1 parent 34c4dc5 commit 95c683b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/psanford/android-media-backup
22

3-
go 1.21
4-
5-
toolchain go1.22.8
3+
go 1.22.3
64

75
require (
86
gioui.org v0.7.1

shell.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ with import <nixpkgs> {
66
};
77

88
let
9+
pinPkgsFetch = pkgs.fetchFromGitHub {
10+
owner = "NixOS";
11+
repo = "nixpkgs";
12+
rev = "a9858885e197f984d92d7fe64e9fff6b2e488d40";
13+
# Hash obtained using `nix-prefetch-url --unpack --unpack https://github.com/nixos/nixpkgs/archive/<rev>.tar.gz`
14+
sha256 = "0a55lp827bfx102czy0bp5d6pbp5lh6l0ysp3zs0m1gyniy2jck9";
15+
};
16+
pinPkgs = import pinPkgsFetch {
17+
config.android_sdk.accept_license = true;
18+
config.allowUnfree = true;
19+
};
20+
921
buildToolsVersion = "33.0.2";
1022
androidComposition = androidenv.composeAndroidPackages {
1123
platformVersions = [ "30" "33" ];
@@ -18,7 +30,7 @@ pkgs.mkShell {
1830
nativeBuildInputs = with pkgs.buildPackages; [
1931
openjdk17
2032
androidComposition.androidsdk
21-
go
33+
pinPkgs.go_1_22
2234
];
2335

2436
shellHook = ''

0 commit comments

Comments
 (0)