From 91925679a0a8789b5e776204b5394fcc9b082441 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 25 May 2023 21:31:03 +0200 Subject: [PATCH] feat: Add Nix flake --- .gitignore | 4 ++++ CHANGELOG.md | 4 ++++ flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 48 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index 96486fd..bee6af5 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ migrate_working_dir/ .dart_tool/ .packages build/ + +# Nix +.envrc +.direnv/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b85c11d..fc42c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,3 +14,7 @@ * N/A +## 0.0.5 + +* Exclude the top bar from the keyboard height +* Include the bottom nav bar in the keyboard height diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7ddaa21 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1676076353, + "narHash": "sha256-mdUtE8Tp40cZETwcq5tCwwLqkJVV1ULJQ5GKRtbshag=", + "owner": "AtaraxiaSjel", + "repo": "nixpkgs", + "rev": "5deb99bdccbbb97e7562dee4ba8a3ee3021688e6", + "type": "github" + }, + "original": { + "owner": "AtaraxiaSjel", + "ref": "update/flutter", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1680273054, + "narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..69bd8f0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + description = "keyboard_height_plugin"; + inputs = { + nixpkgs.url = "github:AtaraxiaSjel/nixpkgs/update/flutter"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + config = { + android_sdk.accept_license = true; + allowUnfree = true; + }; + }; + unstable = import nixpkgs-unstable { + inherit system; + }; + android = pkgs.androidenv.composeAndroidPackages { + # TODO: Find a way to pin these + #toolsVersion = "26.1.1"; + #platformToolsVersion = "31.0.3"; + #buildToolsVersions = [ "31.0.0" ]; + #includeEmulator = true; + #emulatorVersion = "30.6.3"; + platformVersions = [ "28" ]; + includeSources = false; + includeSystemImages = true; + systemImageTypes = [ "default" ]; + abiVersions = [ "x86_64" ]; + includeNDK = false; + useGoogleAPIs = false; + useGoogleTVAddOns = false; + }; + pinnedJDK = pkgs.jdk17; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + flutter pinnedJDK android.platform-tools dart # Dart + gitlint # Code hygiene + ripgrep # General utilities + ]; + + JAVA_HOME = pinnedJDK; + }; + }); +}