2022-05-18 14:49:53 +00:00
|
|
|
{ pkgs, stdenv, lib, fetchFromGitHub, dataDir ? "/var/lib/snipe-it" }:
|
|
|
|
|
|
|
|
let
|
|
|
|
package = (import ./composition.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
noDev = true; # Disable development dependencies
|
|
|
|
}).overrideAttrs (attrs : {
|
|
|
|
installPhase = attrs.installPhase + ''
|
|
|
|
rm -R $out/storage $out/public/uploads $out/bootstrap/cache
|
|
|
|
ln -s ${dataDir}/.env $out/.env
|
|
|
|
ln -s ${dataDir}/storage $out/
|
|
|
|
ln -s ${dataDir}/public/uploads $out/public/uploads
|
|
|
|
ln -s ${dataDir}/bootstrap/cache $out/bootstrap/cache
|
|
|
|
chmod +x $out/artisan
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
in package.override rec {
|
|
|
|
pname = "snipe-it";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "6.0.7";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "snipe";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "09jvkz7j2qb79mjnyrz75015xpgf8l483yha3ma14pzk4pibn620";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A free open source IT asset/license management system ";
|
|
|
|
longDescription = ''
|
|
|
|
Snipe-IT was made for IT asset management, to enable IT departments to track
|
|
|
|
who has which laptop, when it was purchased, which software licenses and accessories
|
|
|
|
are available, and so on.
|
|
|
|
Details for snipe-it can be found on the official website at https://snipeitapp.com/.
|
|
|
|
'';
|
|
|
|
homepage = "https://snipeitapp.com/";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ yayayayaka ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|