From eec5c7c1070f4c111bb97e996728ec3726c9a685 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 25 Apr 2026 06:15:24 +0900 Subject: [PATCH] flake.nix: fix flutter :bruh: --- flake.lock | 6 +++--- flake.nix | 13 +++++++++++-- nix/package.nix | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 7344ad5..0ca9fe6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1776548001, - "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=", + "lastModified": 1776877367, + "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc", + "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6c9f555..26c877c 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ devShells = forAllSystems (_: pkgs: { default = pkgs.mkShell { packages = with pkgs; [ - flutter338 + flutter341 # https://github.com/NixOS/nixpkgs/issues/341147 pkg-config @@ -41,7 +41,16 @@ (baseName == "flake.nix" && type == "regular") (baseName == "module.nix" && type == "regular") ])) ./.; - flutter = pkgs.flutter338; + + # Flutter is kinda brokey at the time of writing this, seemingly not all executables + # are marked as executable, and this only affects weird build artifacts like the web output + # which isn't really used within nixpkgs. ¯\_(ツ)_/¯ + flutter = pkgs.flutter341.overrideAttrs (prev: { + postInstall = prev.postInstall or "" + '' + chmod +x "$out"/bin/cache/artifacts/engine/linux-x64/font-subset + ''; + }); + in { default = self.packages.${system}.linux; linux = pkgs.callPackage ./nix/package.nix { diff --git a/nix/package.nix b/nix/package.nix index 9d7458d..daa1a10 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -9,7 +9,7 @@ isDebug ? false, }: -flutter.buildFlutterApplication { +(flutter.buildFlutterApplication.override { inherit flutter; }) { pname = let variant = if isWeb && isWasm then "wasm" else if isWeb then "web"