Files
subtracks/flake.nix
T
austinried 592c522244 tidy the integration harness and its comments
Trim the explanatory comments to short quirk notes, drop the module headers, and fail cleanly: navidrome/gonic now kill their process if they never become ready and the entrypoint always tears down. The prune test waits for the removal to appear in the album list rather than for the scan flag. Correct the AGENTS token-auth note (lms answers 42, Nextcloud 41) and give CI more headroom.
2026-10-04 00:30:05 +00:00

91 lines
2.5 KiB
Nix

{
description = "Subtracks - Kotlin/Jetpack Compose Android development shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# lms 3.80 (unstable) segfaults at startup with wt 4.14.3; stable ships a working 3.78.
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-26.05";
};
outputs =
{
nixpkgs,
nixpkgs-stable,
...
}:
let
systems = [ "x86_64-linux" ];
forEachSystem = nixpkgs.lib.genAttrs systems;
in
{
devShells = forEachSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
servers = import nixpkgs-stable { inherit system; };
android = pkgs.androidenv.composeAndroidPackages {
platformVersions = [ "37" ];
buildToolsVersions = [ "37.0.0" ];
platformToolsVersion = "37.0.1";
includeEmulator = false;
includeSystemImages = false;
includeNDK = false;
includeSources = false;
includeCmake = false;
};
androidSdk = android.androidsdk;
basePackages = [
pkgs.jdk21
pkgs.gradle_9
pkgs.git
pkgs.curl
pkgs.unzip
pkgs.nushell
androidSdk
android.platform-tools
];
shellHook = ''
echo "subtracks dev shell"
echo " java: $(java -version 2>&1 | head -n1)"
echo " ANDROID_HOME: $ANDROID_HOME"
'';
in
{
default = pkgs.mkShell {
packages = basePackages;
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
inherit shellHook;
};
integration = pkgs.mkShell {
packages = basePackages ++ [
servers.navidrome
servers.gonic
servers.lms
servers.sqlite
servers.php83
];
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
NEXTCLOUD_DIR = "${servers.nextcloud34}";
NEXTCLOUD_MUSIC_APP = "${servers.nextcloud34Packages.apps.music}";
inherit shellHook;
};
}
);
};
}