summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/akkoma/default.nix6
-rw-r--r--pkgs/bookwyrm.nix142
-rw-r--r--pkgs/bookwyrm/default.nix94
-rw-r--r--pkgs/bookwyrm/unwrapped.nix80
-rw-r--r--pkgs/default.nix2
-rw-r--r--pkgs/hikari.nix3
-rw-r--r--pkgs/mollysocket.nix2
-rw-r--r--pkgs/nomsring/nomsring.cabal2
-rw-r--r--pkgs/overlay.nix39
-rw-r--r--pkgs/patches/akkoma-fe-toki-pona-2.patch13
-rw-r--r--pkgs/patches/akkoma-fe-toki-pona.patch14
-rw-r--r--pkgs/python/django-imagekit.nix4
-rw-r--r--pkgs/python/django-sass-processor.nix6
-rw-r--r--pkgs/wlroots_0_15.nix9
14 files changed, 243 insertions, 173 deletions
diff --git a/pkgs/akkoma/default.nix b/pkgs/akkoma/default.nix
index 2e577f0..32d85a9 100644
--- a/pkgs/akkoma/default.nix
+++ b/pkgs/akkoma/default.nix
@@ -11,12 +11,12 @@
}:
beamPackages.mixRelease rec {
pname = "akkoma";
- version = "3.15.1";
+ version = "3.15.2";
src = fetchgit {
url = "https://akkoma.dev/AkkomaGang/akkoma.git";
- rev = "refs/tags/v3.15.1";
- hash = "sha256-6qsqTguEVu9t6dW8c+VAE5Z7D3FbQ0S2ZfAN5qy7Xak=";
+ rev = "refs/tags/v${version}";
+ hash = "sha256-GW86OyO/XPIrCS+cPKQ8LG8PdhhfA2rNH1FXFiuL6vM=";
};
postPatch = ''
diff --git a/pkgs/bookwyrm.nix b/pkgs/bookwyrm.nix
deleted file mode 100644
index a72176c..0000000
--- a/pkgs/bookwyrm.nix
+++ /dev/null
@@ -1,142 +0,0 @@
-{ lib
-, fetchFromGitHub
-, python
-, writeShellScriptBin
-, writeText
-, settings ? { }
-}:
-
-let
- # set some dummy values to make the package build
- settingsWithDefaults = {
- DOMAIN = "localhost";
- DEBUG = false;
- USE_HTTPS = false;
- EMAIL = "your@email.here";
- PGPORT = 5432;
- POSTGRES_USER = "bookwyrm";
- POSTGRES_DB = "bookwyrm";
- POSTGRES_HOST = "localhost";
- REDIS_ACTIVITY_HOST = "localhost";
- REDIS_ACTIVITY_PORT = 6379;
- REDIS_BROKER_HOST = "localhost";
- REDIS_BROKER_PORT = 6379;
- EMAIL_HOST = "smtp.example.com";
- EMAIL_PORT = 587;
- EMAIL_HOST_USER = "mail@example.org";
- EMAIL_HOST_PASSWORD = "blub";
- MEDIA_ROOT = "/var/lib/bookwyrm/images";
- } // settings;
-
- # toShellVar produces "" for false, which bookwyrm rejects
- toDjangoVar = name: value: lib.toShellVar name
- (if value == false then "false" else
- (if value == true then "true" else value));
-
- envfile = writeText "bookwyrm.env"
- (lib.strings.concatLines
- (lib.mapAttrsToList toDjangoVar settingsWithDefaults));
-
- bookwyrm = python.pkgs.buildPythonApplication rec {
- pname = "bookwyrm";
- version = "0.7.4";
-
- format = "other";
-
- src = fetchFromGitHub {
- owner = "bookwyrm-social";
- repo = "bookwyrm";
- rev = "refs/tags/v${version}";
- hash = "sha256-fhFgAsq859fbCvCw+QAioI5lW1c2k6rEiCxwFBGe7vE=";
- };
-
- propagatedBuildInputs = with python.pkgs; [
- aiohttp
- bleach
- celery
- colorthief
- django
- django-celery-beat
- bw-file-resubmit
- django-compressor
- django-imagekit
- django-model-utils
- django-sass-processor
- django-csp
- django-oauth-toolkit
- django-storages
- django-pgtrigger
- s3-tar
- environs
- flower
- gunicorn
- libsass
- markdown
- packaging
- pillow
- psycopg2
- pycryptodome
- dateutil
- redis
- requests
- responses
- pytz
- boto3
- django-storages
- django-redis
- opentelemetry-api
- opentelemetry-exporter-otlp-proto-grpc
- # opentelemetry-instrumentation-celery
- opentelemetry-instrumentation-django
- # opentelemetry-instrumentation-pyscopg2
- opentelemetry-sdk
- protobuf
- pyotp
- qrcode
- grpcio
- ];
-
- postBuild = ''
- ln -s ${envfile} .env
- # needed for the python settings.py file to not fail, but not
- # used during the commands executed below, so this is safe
- export SECRET_KEY=fnord
-
- substituteInPlace contrib/systemd/* \
- --replace /opt/bookwyrm/venv/bin/gunicorn ${lib.getExe python.pkgs.gunicorn} \
- --replace /opt/bookwyrm/venv/bin/celery ${lib.getExe' python.pkgs.celery "celery"} \
- --replace /opt/bookwyrm $out
-
- sed -i /BindPath/d contrib/systemd/*
-
- python manage.py compile_themes
- python manage.py collectstatic --no-input
- '';
-
- postInstall = ''
- mkdir -p $out/lib/systemd/system
- cp -r * .env $out
- cp -r contrib/systemd/* $out/lib/systemd/system
- '';
-
- passthru = {
- pythonPath = python.pkgs.makePythonPath propagatedBuildInputs;
- gunicorn = python.pkgs.gunicorn;
- celery = python.pkgs.celery;
- manage = environmentFile: writeShellScriptBin "bookwyrm-manage.py" ''
- set -a
- ${if environmentFile != null
- then "source ${environmentFile}"
- else ""}
- export PYTHONPATH=${passthru.pythonPath}
- cd ${bookwyrm.outPath}
- exec ${bookwyrm.outPath}/manage.py "$@"
- '';
- };
-
- # hacky hacky hack
- shellHook = ''
- export PYTHONPATH=${passthru.pythonPath}
- '';
- };
-in bookwyrm
diff --git a/pkgs/bookwyrm/default.nix b/pkgs/bookwyrm/default.nix
new file mode 100644
index 0000000..e4c55bf
--- /dev/null
+++ b/pkgs/bookwyrm/default.nix
@@ -0,0 +1,94 @@
+{ lib
+, stdenvNoCC
+, writeShellScriptBin
+, writeText
+, source-han-sans-vf-ttf
+, bookwyrm-unwrapped
+, settings ? { }
+}:
+
+let
+ # set some dummy values to make the package build
+ settingsWithDefaults = {
+ DOMAIN = "localhost";
+ DEBUG = false;
+ USE_HTTPS = false;
+ EMAIL = "your@email.here";
+ PGPORT = 5432;
+ POSTGRES_USER = "bookwyrm";
+ POSTGRES_DB = "bookwyrm";
+ POSTGRES_HOST = "localhost";
+ REDIS_ACTIVITY_HOST = "localhost";
+ REDIS_ACTIVITY_PORT = 6379;
+ REDIS_BROKER_HOST = "localhost";
+ REDIS_BROKER_PORT = 6379;
+ EMAIL_HOST = "smtp.example.com";
+ EMAIL_PORT = 587;
+ EMAIL_HOST_USER = "mail@example.org";
+ EMAIL_HOST_PASSWORD = "blub";
+ MEDIA_ROOT = "/var/lib/bookwyrm/images";
+ } // settings;
+
+ # toShellVar produces "" for false, which bookwyrm rejects
+ toDjangoVar = name: value: lib.toShellVar name
+ (if value == false then "false" else
+ (if value == true then "true" else value));
+
+ envfile = writeText "bookwyrm.env"
+ (lib.strings.concatLines
+ (lib.mapAttrsToList toDjangoVar settingsWithDefaults));
+
+in stdenvNoCC.mkDerivation (finalAttrs: {
+ pname = "bookwyrm";
+ inherit (bookwyrm-unwrapped) version;
+ src = bookwyrm-unwrapped;
+
+ dontConfigure = true;
+
+ buildPhase = ''
+ runHook preBuild
+
+ ln -s ${envfile} .env
+ # needed for the python settings.py file to not fail, but not
+ # used during the commands executed below, so this is safe
+ export SECRET_KEY=fnord
+
+ export PYTHONPATH=${bookwyrm-unwrapped.pythonPath}
+ ./manage.py compile_themes
+ ./manage.py collectstatic --no-input
+
+ ln -s ${source-han-sans-vf-ttf}/share/fonts/variable/SourceHanSans-VF.ttf.ttc static/fonts/source_han_sans/
+
+ substituteInPlace contrib/systemd/* \
+ --replace /opt/bookwyrm/venv/bin/gunicorn ${lib.getExe bookwyrm-unwrapped.gunicorn} \
+ --replace /opt/bookwyrm/venv/bin/celery ${lib.getExe' bookwyrm-unwrapped.celery "celery"} \
+ --replace /opt/bookwyrm $out
+
+ sed -i /BindPath/d contrib/systemd/*
+
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out/lib/systemd/system
+ cp -r * .env $out
+ cp -r contrib/systemd/* $out/lib/systemd/system
+
+ runHook postInstall
+ '';
+
+ passthru = rec {
+ inherit (bookwyrm-unwrapped) celery gunicorn pythonPath;
+ manage = environmentFile: writeShellScriptBin "bookwyrm-manage.py" ''
+ set -a
+ ${if environmentFile != null
+ then "source ${environmentFile}"
+ else ""}
+ export PYTHONPATH=${pythonPath}
+ cd ${finalAttrs.finalPackage.outPath}
+ exec ${finalAttrs.finalPackage.outPath}/manage.py "$@"
+ '';
+ };
+})
diff --git a/pkgs/bookwyrm/unwrapped.nix b/pkgs/bookwyrm/unwrapped.nix
new file mode 100644
index 0000000..151a9b5
--- /dev/null
+++ b/pkgs/bookwyrm/unwrapped.nix
@@ -0,0 +1,80 @@
+{ lib
+, fetchFromGitHub
+, python
+}:
+
+python.pkgs.buildPythonApplication rec {
+ pname = "bookwyrm-unwrapped";
+ version = "0.7.5";
+
+ format = "other";
+
+ src = fetchFromGitHub {
+ owner = "bookwyrm-social";
+ repo = "bookwyrm";
+ rev = "refs/tags/v${version}";
+ hash = "sha256-/oak9dEB2rR2z8b9oXVQ6+F2H7s0F5hVxmAlPdpaA0w=";
+ };
+
+ propagatedBuildInputs = with python.pkgs; [
+ aiohttp
+ bleach
+ celery
+ colorthief
+ django
+ django-celery-beat
+ bw-file-resubmit
+ django-compressor
+ django-imagekit
+ django-model-utils
+ django-sass-processor
+ django-csp
+ django-oauth-toolkit
+ django-storages
+ django-pgtrigger
+ s3-tar
+ environs
+ flower
+ gunicorn
+ libsass
+ markdown
+ packaging
+ pillow
+ psycopg2
+ pycryptodome
+ dateutil
+ redis
+ requests
+ responses
+ pytz
+ boto3
+ django-storages
+ django-redis
+ opentelemetry-api
+ opentelemetry-exporter-otlp-proto-grpc
+ # opentelemetry-instrumentation-celery
+ opentelemetry-instrumentation-django
+ # opentelemetry-instrumentation-pyscopg2
+ opentelemetry-sdk
+ protobuf
+ pyotp
+ qrcode
+ grpcio
+ ];
+
+ postInstall = ''
+ mkdir $out
+ cp -r * $out
+ '';
+
+ passthru = {
+ pythonPath = python.pkgs.makePythonPath propagatedBuildInputs;
+ gunicorn = python.pkgs.gunicorn;
+ celery = python.pkgs.celery;
+ };
+
+ # hacky hacky hack
+ shellHook = ''
+ export PYTHONPATH=${passthru.pythonPath}
+ '';
+}
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 3f8dda3..9e4b3b4 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -7,7 +7,7 @@
travelynx crs-tracker crs-php bahnhof-name matrix-to
hikari_unstable heartwood radicle-interface radicle-tui
inweb nomsring bookwyrm mollysocket git-annex-remote-remarkable2
- ntfy-matrix-bot transport_validator mergiraf;
+ ntfy-matrix-bot transport_validator mergiraf git-who;
pkgs = nixpkgs;
}
diff --git a/pkgs/hikari.nix b/pkgs/hikari.nix
index 6506590..afbc335 100644
--- a/pkgs/hikari.nix
+++ b/pkgs/hikari.nix
@@ -2,6 +2,7 @@
, pkg-config, bmake
, cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman
, libucl, wayland, wayland-protocols, wayland-scanner, wlroots, mesa
+, libdrm, libgbm
, features ? {
gammacontrol = true;
layershell = true;
@@ -27,6 +28,8 @@ stdenv.mkDerivation rec {
libevdev
libinput
libxkbcommon
+ libdrm
+ libgbm
linux-pam
pango
pixman
diff --git a/pkgs/mollysocket.nix b/pkgs/mollysocket.nix
index 1a079b4..a58c1a0 100644
--- a/pkgs/mollysocket.nix
+++ b/pkgs/mollysocket.nix
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-2OWkPTbrD4oXHoB+qszVjLr0e/AUuNnuaYXZ3kOyuxg=";
};
- cargoHash = "sha256-fVH5gzQYzW6uIBO8Fob04IiVyxHDh+Pr21rSow40qLk=";
+ cargoHash = "sha256-fR87PUgb+F2Q4vRYUonmGi6JzJLvGWPEKhwHw+TAsyQ=";
nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/nomsring/nomsring.cabal b/pkgs/nomsring/nomsring.cabal
index fca40c5..ea3625f 100644
--- a/pkgs/nomsring/nomsring.cabal
+++ b/pkgs/nomsring/nomsring.cabal
@@ -13,7 +13,7 @@ common warnings
executable nomsring
import: warnings
main-is: Main.hs
- build-depends: base ^>=4.18
+ build-depends: base
, cgi ^>=3001.5
, data-clist ^>= 0.2
default-language: GHC2021
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index b54a774..687d5cf 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -12,7 +12,7 @@ let
radicle = import ./radicle.nix;
in
{
- beam = super.beam_nox;
+ beam = super.beam_minimal;
git-annex-remote-remarkable2 = self.callPackage
({ rustPlatform, fetchgit, ... }:
@@ -31,8 +31,11 @@ in
galmon-core = self.callPackage ./galmon.nix {};
galmon-full = self.callPackage ./galmon.nix { buildAll = true; };
- akkoma-fe = super.akkoma-frontends.akkoma-fe.overrideAttrs (old: {
- patches = [ ./patches/akkoma-fe-toki-pona.patch ];
+ akkoma-fe = super.akkoma-fe.overrideAttrs (old: {
+ patches = [
+ ./patches/akkoma-fe-toki-pona.patch
+ ./patches/akkoma-fe-toki-pona-2.patch
+ ];
});
akkoma = (self.callPackage ./akkoma {}).overrideAttrs {
@@ -202,7 +205,7 @@ in
, lib, stm, text, time, vector, wai, wai-extra, warp
}:
mkDerivation {
- pname = "bahnhof.name";
+ pname = "bahnhof-name";
version = "0.2.0.0";
src = inputs.bahnhof-name;
isLibrary = false;
@@ -212,6 +215,7 @@ in
http-client-openssl http-types stm text time vector wai wai-extra
warp
];
+ jailbreak = true;
mainProgram = "bahnhof-name";
license = lib.licenses.eupl12;
postInstall = ''
@@ -243,6 +247,30 @@ in
};
});
+ git-who = self.buildGoModule rec {
+ pname = "git-who";
+ version = "1.1";
+
+ src = (self.fetchFromGitHub {
+ owner = "sinclairtarget";
+ repo = "git-who";
+ rev = "v${version}";
+ hash = "sha256-H6RbmkM8/n0HDMI3auz6YyEn/vsfXWk5ig+pBhZG3nI=";
+ # submodules contain test data and have ssh urls, hence this absurdity
+ fetchSubmodules = true;
+ leaveDotGit = true;
+ }).overrideAttrs {
+ GIT_CONFIG_COUNT = 1;
+ GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
+ GIT_CONFIG_VALUE_0 = "git@github.com:";
+ };
+
+ vendorHash = "sha256-e2P7szjtAn4EFTy+eGi/9cYf/Raw/7O+PbYEOD8i3Hs=";
+
+ nativeCheckInputs = [ self.gitMinimal ];
+ };
+
+
hikari = self.callPackage ./hikari.nix { wlroots = self.wlroots_0_15; };
wlroots_0_15 = self.callPackage ./wlroots_0_15.nix {};
@@ -253,7 +281,8 @@ in
#### packaged mostly as shitpost / to play around with ####
- bookwyrm = (self.callPackage ./bookwyrm.nix {
+ bookwyrm = self.callPackage ./bookwyrm {};
+ bookwyrm-unwrapped = (self.callPackage ./bookwyrm/unwrapped.nix {
python = super.python312.override ({
packageOverrides = self: super: {
django-sass-processor = self.callPackage ./python/django-sass-processor.nix {};
diff --git a/pkgs/patches/akkoma-fe-toki-pona-2.patch b/pkgs/patches/akkoma-fe-toki-pona-2.patch
new file mode 100644
index 0000000..3dc549b
--- /dev/null
+++ b/pkgs/patches/akkoma-fe-toki-pona-2.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/post_language.js b/src/lib/post_language.js
+index 7dcaebce..4d146773 100644
+--- a/src/lib/post_language.js
++++ b/src/lib/post_language.js
+@@ -3,7 +3,7 @@ import { computed } from 'vue'
+
+ export const usePostLanguageOptions = () => {
+ const postLanguageOptions = computed(() => {
+- return iso6391.getAllCodes().map(lang => ({
++ return iso6391.getAllCodes().concat(['tok']).map(lang => ({
+ key: lang,
+ value: lang,
+ label: lang,
diff --git a/pkgs/patches/akkoma-fe-toki-pona.patch b/pkgs/patches/akkoma-fe-toki-pona.patch
index 281fdfc..b556fb6 100644
--- a/pkgs/patches/akkoma-fe-toki-pona.patch
+++ b/pkgs/patches/akkoma-fe-toki-pona.patch
@@ -4,23 +4,9 @@ Date: Fri, 23 Jun 2023 01:56:43 +0200
Subject: [PATCH] mi la, toki pona li pona a
---
- src/components/post_status_form/post_status_form.js | 2 +-
src/services/locale/locale.service.js | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
-diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
-index 5647a9eb..25180ba9 100644
---- a/src/components/post_status_form/post_status_form.js
-+++ b/src/components/post_status_form/post_status_form.js
-@@ -303,7 +303,7 @@ const PostStatusForm = {
- mobileLayout: state => state.interface.mobileLayout
- }),
- isoLanguages () {
-- return iso6391.getAllCodes();
-+ return iso6391.getAllCodes().concat(['tok']);
- }
- },
- watch: {
diff --git a/src/services/locale/locale.service.js b/src/services/locale/locale.service.js
index 8cef2522..8bee6ad2 100644
--- a/src/services/locale/locale.service.js
diff --git a/pkgs/python/django-imagekit.nix b/pkgs/python/django-imagekit.nix
index 9a11a4f..f746db7 100644
--- a/pkgs/python/django-imagekit.nix
+++ b/pkgs/python/django-imagekit.nix
@@ -9,12 +9,12 @@
buildPythonPackage rec {
pname = "django-imagekit";
- version = "4.1.0";
+ version = "5.0.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
- hash = "sha256-5VmuquQ6M7NPh2Man6VpZFXkRR/6c4pCY1/eRC/trFw=";
+ hash = "sha256-qun3So6bbOtdFffY4mYwKQHnbZ9TLHi9UTXLD6IGprA=";
};
propagatedBuildInputs = [
diff --git a/pkgs/python/django-sass-processor.nix b/pkgs/python/django-sass-processor.nix
index 90bba5f..8566bea 100644
--- a/pkgs/python/django-sass-processor.nix
+++ b/pkgs/python/django-sass-processor.nix
@@ -8,13 +8,13 @@
}:
buildPythonPackage rec {
- pname = "django-sass-processor";
- version = "1.2.2";
+ pname = "django_sass_processor";
+ version = "1.4.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
- hash = "sha256-9gmMGBzJWiFZPfa7UCeR4yAVYVIigD3iFv3Mi7QsD3c=";
+ hash = "sha256-Hp0Edp922Ju/d7myebqD36ytnJjAPKiljs/CnZl+b88=";
};
propagatedBuildInputs = [
diff --git a/pkgs/wlroots_0_15.nix b/pkgs/wlroots_0_15.nix
index 93095f8..6b63e4c 100644
--- a/pkgs/wlroots_0_15.nix
+++ b/pkgs/wlroots_0_15.nix
@@ -23,6 +23,9 @@
, glslang
, libliftoff
, libdisplay-info
+, libdrm
+, libgbm
+, cmake
, nixosTests
, enableXWayland ? true
@@ -47,6 +50,8 @@ stdenv.mkDerivation {
hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM=";
};
+ CFLAGS = [ "-Wno-calloc-transposed-args" ];
+
postPatch = ''
substituteInPlace backend/drm/meson.build \
--replace /usr/share/hwdata/ ${hwdata}/share/hwdata/
@@ -58,10 +63,12 @@ stdenv.mkDerivation {
strictDeps = true;
depsBuildBuild = [ pkg-config ];
- nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang ];
+ nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang cmake ];
buildInputs = [
libGL
+ libdrm
+ libgbm
libcap
libinput
libpng