1
0
Fork 0
packages/pkgs/snipe-it/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

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-06-21 10:32:08 +02:00
version = "5.1.6";
2021-04-15 00:06:29 +02:00
src = fetchFromGitHub {
owner = "snipe";
repo = "snipe-it";
rev = "v${version}";
2021-06-21 10:32:08 +02:00
sha256 = "sha256-YuIYhQWEv+PLOe8DgRQnZfmEkas3GR8wlR7Gkf4OWPc=";
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;
};
}