summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/0001-add-lockfile.patch47
-rw-r--r--pkgs/crs-tools.nix44
-rw-r--r--pkgs/overlay.nix1
3 files changed, 92 insertions, 0 deletions
diff --git a/pkgs/0001-add-lockfile.patch b/pkgs/0001-add-lockfile.patch
new file mode 100644
index 0000000..a8cd3ce
--- /dev/null
+++ b/pkgs/0001-add-lockfile.patch
@@ -0,0 +1,47 @@
+From 339d2c0c3df062eee919691740e8d5b4d4b5bc30 Mon Sep 17 00:00:00 2001
+From: stuebinm <stuebinm@disroot.org>
+Date: Tue, 28 Mar 2023 01:54:24 +0200
+Subject: [PATCH] add lockfile
+
+---
+ composer.lock | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+ create mode 100644 composer.lock
+
+diff --git a/composer.lock b/composer.lock
+new file mode 100644
+index 00000000..d2b67b38
+--- /dev/null
++++ b/composer.lock
+@@ -0,0 +1,28 @@
++{
++ "_readme": [
++ "This file locks the dependencies of your project to a known state",
++ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
++ "This file is @generated automatically"
++ ],
++ "content-hash": "b3c1951928eb81c8bcfcace0c956b376",
++ "packages": [],
++ "packages-dev": [],
++ "aliases": [],
++ "minimum-stability": "stable",
++ "stability-flags": [],
++ "prefer-stable": false,
++ "prefer-lowest": false,
++ "platform": {
++ "php": ">=7.1.0",
++ "ext-apcu": "*",
++ "ext-curl": "*",
++ "ext-intl": "*",
++ "ext-mbstring": "*",
++ "ext-openssl": "*",
++ "ext-xdiff": "*",
++ "ext-xmlrpc": "*",
++ "ext-xsl": "*"
++ },
++ "platform-dev": [],
++ "plugin-api-version": "2.3.0"
++}
+--
+2.38.4
+
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
+ '';
+ };
+}
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index bfc0175..0995095 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -75,4 +75,5 @@ self: super:
withX = false;
};
+ crs-tools = self.callPackage ./crs-tools.nix {};
}