Something went wrong. Try again.
A simple to-do app focused on tasks that can be completed within a specific time span. taskline.tobinio.dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129{ description = "TaskLine Fullstack (Backend + Frontend)";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };
outputs = { self, nixpkgs }: let system = "x86_64-linux"; version = "3.4.1"; pnpm = pkgs.pnpm_12; pkgs = import nixpkgs { inherit system; };
mkBackend = { enablePostgres ? false, enableSqlite ? false, }: assert (enablePostgres || enableSqlite) || throw "taskline-backend: At least one database feature must be enabled (set enablePostgres = true or enableSqlite = true).";
pkgs.rustPlatform.buildRustPackage { pname = "taskline-backend"; inherit version;
doCheck = false;
src = pkgs.lib.fileset.toSource { root = ./.; fileset = pkgs.lib.fileset.unions [ ./api ./cli ./rpi-checker ./libs ./Cargo.toml ./Cargo.lock ]; }; buildAndTestSubdir = "api";
buildNoDefaultFeatures = true;
buildFeatures = (pkgs.lib.optional enablePostgres "postgres") ++ (pkgs.lib.optional enableSqlite "sqlite");
cargoHash = "sha256-fHVgFyBhOz6LH+UB/C9I7PLF5CQZiEzOHD4Ms5jIC00=";
nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [ pkgs.openssl pkgs.cacert ]; }; in { devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.pkg-config pkgs.openssl pkgs.sea-orm-cli pkgs.cargo-nextest ]; };
packages.${system} = { frontend = pkgs.stdenv.mkDerivation (finalAttrs: { pname = "taskline-frontend"; inherit version;
src = pkgs.lib.fileset.toSource { root = ./.; fileset = pkgs.lib.fileset.unions [ ./app ./i18n ./public ./server ./.npmrc ./.nuxtrc ./nuxt.config.ts ./package.json ./pnpm-lock.yaml ./pnpm-workspace.yaml ]; };
nativeBuildInputs = [ pkgs.nodejs pkgs.pnpmConfigHook pnpm ];
pnpmDeps = pkgs.fetchPnpmDeps { inherit (finalAttrs) pname version src; inherit pnpm; fetcherVersion = 4; hash = "sha256-eTcmGt/BnOPar7SLRyUYUrgu5J4o4Ly76XoYSZoONL0="; };
buildPhase = '' runHook preBuild export NUXT_TELEMETRY_DISABLED=1 pnpm build runHook postBuild '';
installPhase = '' runHook preInstall mkdir -p $out cp -r .output/* $out/ runHook postInstall ''; });
backend-postgres = mkBackend { enablePostgres = true; enableSqlite = false; };
backend-sqlite = mkBackend { enablePostgres = false; enableSqlite = true; }; }; };}