2021-04-15 00:06:29 +02:00
|
|
|
{ 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";
|
2021-08-03 23:44:19 +02:00
|
|
|
version = "5.1.8";
|
2021-04-15 00:06:29 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "snipe";
|
|
|
|
repo = "snipe-it";
|
|
|
|
rev = "v${version}";
|
2021-08-03 23:44:19 +02:00
|
|
|
sha256 = "sha256-4WOBk7DyCRQ03wCcGpThfrnqP03dzqN2EhYnKndrCbs=";
|
2021-04-15 00:06:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|