Skip to content

Commit

Permalink
feat: add nix flake
Browse files Browse the repository at this point in the history
(cherry picked from commit 71e9e42)
  • Loading branch information
kolaente committed Jun 6, 2024
1 parent 85f79e4 commit b2af1b7
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Miscellaneous
*.class
*.lock
!flake.lock
*.log
*.pyc
*.swp
Expand Down Expand Up @@ -96,3 +97,5 @@ app.*.map.json

# VS Code
.vscode/settings.json

.direnv
59 changes: 59 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
description = "Vikunja Flutter app dev environment";

inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { system = system; config.allowUnfree = true; };
in {
defaultPackage = pkgs.mkShell {
buildInputs = with pkgs; [
# Originally copied from https://github.com/zulip/zulip-flutter/blob/d882f50bf7d917ce7e040d7ee1f66f1d803ef988/shell.nix
clang
cmake
ninja
pkg-config

gtk3 # Curiously `nix-env -i` can't handle this one adequately.
# But `nix-shell` on this shell.nix does fine.
pcre
epoxy

flutter

# This group all seem not strictly necessary -- commands like
# `flutter run -d linux` seem to *work* fine without them, but
# the build does print messages about missing packages, like:
# Package mount was not found in the pkg-config search path.
# Perhaps you should add the directory containing `mount.pc'
# to the PKG_CONFIG_PATH environment variable
# To add to this list on NixOS upgrades, the Nix package
# `nix-index` is handy: then `nix-locate mount.pc`.
libuuid # for mount.pc
xorg.libXdmcp.dev
libsepol.dev
libthai.dev
libdatrie.dev
libxkbcommon.dev
dbus.dev
at-spi2-core.dev
xorg.libXtst.out
pcre2.dev

jdk11
android-studio
android-tools
];
};
});
}

0 comments on commit b2af1b7

Please sign in to comment.