2021-04-15 00:06:29 +02:00
|
|
|
{ pkgs, system, lib, fetchFromGitHub
|
2022-04-14 01:11:43 +02:00
|
|
|
, php, phpPackages
|
2021-04-15 00:06:29 +02:00
|
|
|
, dataDir ? "/var/lib/snipe-it"
|
|
|
|
, cacheDir ? "/var/cache/snipe-it"
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
package = (import ./composition.nix {
|
2022-04-14 01:11:43 +02:00
|
|
|
inherit pkgs system php phpPackages;
|
2021-04-15 00:06:29 +02:00
|
|
|
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";
|
2022-04-14 01:11:43 +02:00
|
|
|
version = "6.0.0-RC-7";
|
2021-04-15 00:06:29 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "snipe";
|
|
|
|
repo = "snipe-it";
|
|
|
|
rev = "v${version}";
|
2022-04-14 01:11:43 +02:00
|
|
|
sha256 = "sha256-GMGKo2qieTX5eR9WGZN7PnsPRUp14EysX1VyCzQZuUo=";
|
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;
|
|
|
|
};
|
|
|
|
}
|