snipe-it: 5.2.0 -> 6.0.0-RC-7
parent
5496c6acf8
commit
65218d2d20
|
@ -8,7 +8,6 @@ let
|
|||
|
||||
phpPackage = cfg.phpPackage.withExtensions ({ enabled, all }:
|
||||
enabled ++ (with all; [
|
||||
json
|
||||
openssl
|
||||
pdo
|
||||
mbstring
|
||||
|
@ -37,7 +36,10 @@ let
|
|||
|
||||
useSSL = with cfg.nginx; (addSSL || forceSSL || onlySSL || enableACME);
|
||||
|
||||
snipe-it = cfg.package.override { inherit (cfg) cacheDir dataDir; };
|
||||
snipe-it = cfg.package.override {
|
||||
inherit (cfg) cacheDir dataDir;
|
||||
php = phpPackage; phpPackages = phpPackage.packages;
|
||||
};
|
||||
|
||||
artisan = pkgs.writeShellScriptBin "snipe-it" ''
|
||||
cd ${snipe-it}
|
||||
|
@ -61,7 +63,7 @@ in {
|
|||
|
||||
phpPackage = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.php74;
|
||||
default = pkgs.php80;
|
||||
description = "PHP package to use.";
|
||||
};
|
||||
|
||||
|
|
|
@ -4,11 +4,16 @@
|
|||
|
||||
let
|
||||
inherit (phpPackages) composer;
|
||||
|
||||
filterSrc = src:
|
||||
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
|
||||
|
||||
buildZipPackage = { name, src }:
|
||||
stdenv.mkDerivation {
|
||||
inherit name src;
|
||||
buildInputs = [ unzip ];
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildCommand = ''
|
||||
shopt -s dotglob
|
||||
unzip $src
|
||||
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
|
||||
cd $baseDir
|
||||
|
@ -133,10 +138,9 @@ let
|
|||
''}
|
||||
'') (builtins.attrNames dependencies);
|
||||
|
||||
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
|
||||
extraArgs = removeAttrs args [ "packages" "devPackages" "buildInputs" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "composer-${name}";
|
||||
buildInputs = [ php composer ] ++ buildInputs;
|
||||
|
||||
inherit unpackPhase buildPhase;
|
||||
|
@ -233,6 +237,7 @@ let
|
|||
} // extraArgs);
|
||||
in
|
||||
{
|
||||
inherit filterSrc;
|
||||
composer = lib.makeOverridable composer;
|
||||
buildZipPackage = lib.makeOverridable buildZipPackage;
|
||||
buildPackage = lib.makeOverridable buildPackage;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, noDev ? false}:
|
||||
}, system ? builtins.currentSystem, noDev ? false, php ? pkgs.php, phpPackages ? pkgs.phpPackages}:
|
||||
|
||||
let
|
||||
composerEnv = import ./composer-env.nix {
|
||||
inherit (pkgs) stdenv lib writeTextFile fetchurl php unzip phpPackages;
|
||||
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip;
|
||||
inherit php phpPackages;
|
||||
};
|
||||
in
|
||||
import ./php-packages.nix {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{ pkgs, system, lib, fetchFromGitHub
|
||||
, php, phpPackages
|
||||
, dataDir ? "/var/lib/snipe-it"
|
||||
, cacheDir ? "/var/cache/snipe-it"
|
||||
}:
|
||||
|
||||
let
|
||||
package = (import ./composition.nix {
|
||||
inherit pkgs system;
|
||||
inherit pkgs system php phpPackages;
|
||||
noDev = true;
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
installPhase = oldAttrs.installPhase + ''
|
||||
|
@ -20,13 +21,13 @@ let
|
|||
|
||||
in package.override rec {
|
||||
name = "snipe-it";
|
||||
version = "5.2.0";
|
||||
version = "6.0.0-RC-7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "snipe";
|
||||
repo = "snipe-it";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-LT1JVHwmprLS52+OWgnddTKam5dEHDSuyHKxFG9WadM=";
|
||||
sha256 = "sha256-GMGKo2qieTX5eR9WGZN7PnsPRUp14EysX1VyCzQZuUo=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue