diff options
Diffstat (limited to '')
-rw-r--r-- | pkgs/crs-tools.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/crs-tools.nix b/pkgs/crs-tools.nix new file mode 100644 index 0000000..def657c --- /dev/null +++ b/pkgs/crs-tools.nix @@ -0,0 +1,44 @@ +{ stdenv, lib, fetchFromGitHub, system, ... }: + +let + # we need php < 8; some of the tracker's code is kinda deprecated + nixpkgs = fetchFromGitHub { + owner = "NixOS"; + repo = "nixpkgs"; + rev = "21.05"; + sha256 = "sha256-ZjBd81a6J3TwtlBr3rHsZspYUwT9OdhDk+a/SgSEf7I="; + }; +in + +rec { + php = (import nixpkgs { inherit system; }).php73.withExtensions + (e: with e.all; e.enabled ++ [curl intl mbstring openssl xsl apcu]); + + tracker = stdenv.mkDerivation { + pname = "crs-tracker"; + version = "yolo"; + + src = fetchFromGitHub { + owner = "crs-tools"; + repo = "tracker"; + rev = "7763c665522c7c027ed7f70cba00d7eef47b0644"; + sha256 = "sha256-MA04yiDLquKmiJ/6kUXigFPt7JtNB7/HI9SA60bRhH0="; + fetchSubmodules = true; + }; + + patches = [ + ./0001-add-lockfile.patch + ]; + + buildInputs = [ php php.packages.composer ]; + + buildPhase = '' + composer install --ignore-platform-req=ext-xdiff --ignore-platform-req=ext-xmlrpc + ''; + + installPhase = '' + mkdir -p $out + cp -r * $out + ''; + }; +} |