mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-12 17:26:22 +00:00
fix: opening hours not updating feat: lazy-load opening hours module feat: add e2e tests for opening hours refactor: migrate opening hours to on-push change detection feat: show exact minutes in opening hours starting one hour before next change
78 lines
2.5 KiB
Nix
78 lines
2.5 KiB
Nix
{
|
|
description = "A Nix-flake-based development environment for OpenStApps";
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
buildToolsVersion = "30.0.3";
|
|
overlays = [
|
|
(final: prev: rec {
|
|
nodejs = prev.nodejs-18_x;
|
|
pnpm = prev.nodePackages.pnpm;
|
|
chrome = prev.google-chrome;
|
|
firefox = prev.firefox;
|
|
webkit = prev.epiphany; # Safari-ish browser
|
|
android = prev.androidenv.composeAndroidPackages {
|
|
buildToolsVersions = [ "${buildToolsVersion}" ];
|
|
platformVersions = [ "32" ];
|
|
};
|
|
cypress = prev.cypress.overrideAttrs(cyPrev: rec {
|
|
version = "13.2.0";
|
|
src = prev.fetchzip {
|
|
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
|
|
hash = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
|
|
};
|
|
});
|
|
})
|
|
];
|
|
# TODO: aarch64-linux, x68_64-darwin, aarch64-darwin
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
|
pkgs = import nixpkgs {
|
|
inherit overlays system;
|
|
config = {
|
|
allowUnfree = true;
|
|
android_sdk.accept_license = true;
|
|
};
|
|
};
|
|
});
|
|
in
|
|
{
|
|
devShells = forEachSupportedSystem ({ pkgs }:
|
|
let
|
|
python = (pkgs.python311.withPackages(ps: with ps; [ brotli fonttools ] ++ (with fonttools.optional-dependencies; [ ufo lxml unicode woff ])));
|
|
in
|
|
{
|
|
default = (pkgs.buildFHSUserEnv {
|
|
name = "StApps Dev";
|
|
targetPkgs = pkgs: with pkgs; [
|
|
nodejs
|
|
pnpm
|
|
python
|
|
docker
|
|
# tools
|
|
curl
|
|
jq
|
|
# browsers
|
|
firefox
|
|
chrome
|
|
webkit
|
|
cypress
|
|
# android
|
|
jdk17
|
|
android.androidsdk
|
|
musl
|
|
];
|
|
runScript = "bash";
|
|
profile = ''
|
|
export CYPRESS_INSTALL_BINARY=0
|
|
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress
|
|
export ANDROID_SDK_ROOT=${pkgs.android.androidsdk}/libexec/android-sdk
|
|
export ANDROID_JAVA_HOME=${pkgs.jdk.home}
|
|
export DOCKER_HOST=unix:///run/user/1000/docker.sock
|
|
{ dockerd-rootless & } 2>/dev/null
|
|
'';
|
|
}).env;
|
|
});
|
|
};
|
|
}
|