{ pkgs, system, lib, fetchFromGitHub , dataDir ? "/var/lib/snipe-it" , cacheDir ? "/var/cache/snipe-it" }: let package = (import ./composition.nix { inherit pkgs system; noDev = true; }).overrideAttrs (oldAttrs: { installPhase = oldAttrs.installPhase + '' rm -R $out/storage $out/public/uploads $out/bootstrap/cache ln -s ${dataDir}/.env $out/.env ln -s ${dataDir}/storage $out/storage ln -s ${dataDir}/uploads $out/public/uploads ln -s ${dataDir}/database.sqlite $out/database/database.sqlite ln -s ${cacheDir}/bootstrap $out/bootstrap/cache ''; }); in package.override rec { name = "snipe-it"; version = "5.1.6"; src = fetchFromGitHub { owner = "snipe"; repo = "snipe-it"; rev = "v${version}"; sha256 = "sha256-YuIYhQWEv+PLOe8DgRQnZfmEkas3GR8wlR7Gkf4OWPc="; }; meta = with lib; { description = "A free open source IT asset management system"; homepage = "https://www.snipeitapp.com/"; license = licenses.agpl3; maintainers = with maintainers; [ aw ]; platforms = platforms.unix; }; }