This commit is contained in:
Toast 2025-10-09 00:56:42 +02:00 committed by GitHub
commit 98f32f6823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1449 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "codemirror";
version = "5.65.18";
src = fetchFromGitHub {
owner = "codemirror";
repo = "codemirror5";
tag = version;
hash = "sha256-VQTpLaTYfJRUKUjLgomE6TijHIZszQqH0L+khErruAU=";
};
env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;
npmDepsHash = "sha256-OjftAKA4YQIHJqfZ0yuZbIWtgAJOLSeroLua3FA+rTk=";
patches = [
./../../../../../scripts/deps-docker/codemirror.patch
];
postPatch = ''
# Upstream doesn't have a package-lock.json
cp ${./package-lock.json} ./package-lock.json
sed -ri '/^var urlRE = /d' mode/gfm/gfm.js
'';
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,19 @@
{ buildNpmPackage, fetchFromGitHub }:
buildNpmPackage rec {
pname = "marked";
version = "4.3.0";
src = fetchFromGitHub {
owner = "markedjs";
repo = "marked";
tag = "v${version}";
hash = "sha256-xJotgIUoZSmjgLRIgJP9134PR1GYKjVXM5jp+JpM7bg=";
};
npmDepsHash = "sha256-omsoER0I28ZHN78X0aku2jNJApPvpqYKgfPhRbEi+HM=";
patches = [
./../../../../../scripts/deps-docker/marked.patch
./../../../../../scripts/deps-docker/marked-ln.patch
];
}

View file

@ -3,6 +3,10 @@ final: prev: {
ffmpeg = final.ffmpeg-full;
};
# Dependencies
codemirror = final.callPackage ./deps/codemirror { };
marked = final.callPackage ./deps/marked { };
python3 = prev.python3.override {
packageOverrides = pyFinal: pyPrev: {
partftpy = pyFinal.callPackage ./partftpy { };

View file

@ -39,6 +39,19 @@
withSMB = true;
};
# Make sure that the nix dependencies don't drift away
checks.nix-deps-updated = pkgs.runCommandLocal "nix-deps-updated-check" { } ''
hash="6e3a014f303f86992e75446c3ce3aaf704fc838b850ba3688c9a1f5d358bc9f4"
dockerfilePath="${self.outPath}/scripts/deps-docker/Dockerfile"
echo "If you can see this, the dependencies dockerfile updated."
echo "Please update the nix packages (if necessary) and the hash on this check"
echo $hash $dockerfilePath | sha256sum --check --status
# Need to make an empty folder so that Nix doesn't complain
mkdir $out
'';
packages = {
inherit (pkgs)
copyparty