From 3ff04d2fc26b8d487a02843a804b8ee8995f6521 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 4 Nov 2021 13:16:32 +0100 Subject: [PATCH 01/34] logstash7: Fix passthru.tests since -oss variant removal --- pkgs/tools/misc/logstash/7.x.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/logstash/7.x.nix b/pkgs/tools/misc/logstash/7.x.nix index 1e69fbc976d9..c8970033d0dd 100644 --- a/pkgs/tools/misc/logstash/7.x.nix +++ b/pkgs/tools/misc/logstash/7.x.nix @@ -1,4 +1,5 @@ -{ elk7Version +{ config +, elk7Version , enableUnfree ? true , lib , stdenv @@ -70,10 +71,10 @@ let maintainers = with maintainers; [ wjlroe offline basvandijk ]; }; passthru.tests = - optionalAttrs (!enableUnfree) ( - assert this.drvPath == nixosTests.elk.ELK-7.elkPackages.logstash.drvPath; + optionalAttrs (config.allowUnfree && enableUnfree) ( + assert this.drvPath == nixosTests.elk.unfree.ELK-7.elkPackages.logstash.drvPath; { - elk = nixosTests.elk.ELK-7; + elk = nixosTests.elk.unfree.ELK-7; } ); }; From d03162e8bf6d2884f41cc430677539513c26f568 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 1 Oct 2022 01:37:04 +0000 Subject: [PATCH 02/34] sagetex: 3.6 -> 3.6.1 --- pkgs/misc/sagetex/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/sagetex/default.nix b/pkgs/misc/sagetex/default.nix index a30f037d9c47..510219e51b9c 100644 --- a/pkgs/misc/sagetex/default.nix +++ b/pkgs/misc/sagetex/default.nix @@ -6,14 +6,14 @@ stdenv.mkDerivation rec { pname = "sagetex"; - version = "3.6"; + version = "3.6.1"; passthru.tlType = "run"; src = fetchFromGitHub { owner = "sagemath"; repo = "sagetex"; rev = "v${version}"; - sha256 = "8iHcJbaY/dh0vmvYyd6zj1ZbuJRaJGb6bUBK1v4gXWU="; + sha256 = "sha256-OfhbXHbGI+DaDHqZCOGiSHJPHjGuT7ZqSEjKweloW38="; }; buildInputs = [ From 579f230b0a0e00427c038a8b5948aff5ee082f3b Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 15 Nov 2022 21:23:54 -0500 Subject: [PATCH 03/34] nixos/environment: accept path for variables and sessionVariables --- nixos/modules/config/shells-environment.nix | 4 ++-- nixos/modules/config/system-environment.nix | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index 50bb9b17783b..d5ec420f3044 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -42,8 +42,8 @@ in strings. The latter is concatenated, interspersed with colon characters. ''; - type = with types; attrsOf (either str (listOf str)); - apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v); + type = with types; attrsOf (oneOf [ str path (listOf str) ]); + apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else "${v}"); }; environment.profiles = mkOption { diff --git a/nixos/modules/config/system-environment.nix b/nixos/modules/config/system-environment.nix index 5b226d5079b0..399304185223 100644 --- a/nixos/modules/config/system-environment.nix +++ b/nixos/modules/config/system-environment.nix @@ -1,6 +1,6 @@ # This module defines a system-wide environment that will be # initialised by pam_env (that is, not only in shells). -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; @@ -32,8 +32,7 @@ in therefore not possible to use PAM style variables such as `@{HOME}`. ''; - type = with types; attrsOf (either str (listOf str)); - apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v); + inherit (options.environment.variables) type apply; }; environment.profileRelativeSessionVariables = mkOption { From d8c8e9abb733b57d8534c6765d308b37eae39c39 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Thu, 21 Jan 2021 14:05:01 -0800 Subject: [PATCH 04/34] toolbox: init at 0.0.99.3 Fixes #96115 --- .../virtualization/toolbox/default.nix | 51 +++++++++++++++++++ .../virtualization/toolbox/glibc.patch | 12 +++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 65 insertions(+) create mode 100644 pkgs/applications/virtualization/toolbox/default.nix create mode 100644 pkgs/applications/virtualization/toolbox/glibc.patch diff --git a/pkgs/applications/virtualization/toolbox/default.nix b/pkgs/applications/virtualization/toolbox/default.nix new file mode 100644 index 000000000000..94928ff35733 --- /dev/null +++ b/pkgs/applications/virtualization/toolbox/default.nix @@ -0,0 +1,51 @@ +{ lib, buildGoModule, fetchFromGitHub, glibc, go-md2man, installShellFiles }: + +buildGoModule rec { + pname = "toolbox"; + version = "0.0.99.3"; + + src = fetchFromGitHub { + owner = "containers"; + repo = pname; + rev = version; + hash = "sha256-9HiWgEtaMypLOwXJ6Xg3grLSZOQ4NInZtcvLPV51YO8="; + }; + + patches = [ ./glibc.patch ]; + + vendorHash = "sha256-k79TcC9voQROpJnyZ0RsqxJnBT83W5Z+D+D3HnuQGsI="; + + postPatch = '' + substituteInPlace src/cmd/create.go --subst-var-by glibc ${glibc} + ''; + + modRoot = "src"; + + nativeBuildInputs = [ go-md2man installShellFiles ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/containers/toolbox/pkg/version.currentVersion=${version}" + ]; + + preCheck = "export PATH=$GOPATH/bin:$PATH"; + + postInstall = '' + cd .. + for d in doc/*.md; do + go-md2man -in $d -out ''${d%.md} + done + installManPage doc/*.[1-9] + installShellCompletion --bash completion/bash/toolbox + install profile.d/toolbox.sh -Dt $out/share/profile.d + ''; + + meta = with lib; { + homepage = "https://containertoolbx.org"; + changelog = "https://github.com/containers/toolbox/releases/tag/${version}"; + description = "Tool for containerized command line environments on Linux"; + license = licenses.asl20; + maintainers = with maintainers; [ urandom ]; + }; +} diff --git a/pkgs/applications/virtualization/toolbox/glibc.patch b/pkgs/applications/virtualization/toolbox/glibc.patch new file mode 100644 index 000000000000..1055dc965a0b --- /dev/null +++ b/pkgs/applications/virtualization/toolbox/glibc.patch @@ -0,0 +1,12 @@ +diff --git a/src/cmd/create.go b/src/cmd/create.go +index 74e90b1..113ef80 100644 +--- a/src/cmd/create.go ++++ b/src/cmd/create.go +@@ -423,6 +425,7 @@ func createContainer(container, image, release string, showCommandToEnter bool) + "--volume", toolboxPathMountArg, + "--volume", usrMountArg, + "--volume", runtimeDirectoryMountArg, ++ "--volume", "@glibc@:@glibc@:ro", + }...) + + createArgs = append(createArgs, avahiSocketMount...) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be3c2791aafb..daeb5ea56095 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12257,6 +12257,8 @@ with pkgs; todo = callPackage ../tools/misc/todo { }; + toolbox = callPackage ../applications/virtualization/toolbox { }; + tor = callPackage ../tools/security/tor { }; tor-browser-bundle-bin = callPackage ../applications/networking/browsers/tor-browser-bundle-bin { }; From 80d9e24cbf15faba75acd955770add1344315e41 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Sat, 26 Nov 2022 05:24:30 +0000 Subject: [PATCH 05/34] linx-server: init at unstable-2021-12-24 We were forced to patch out a single broke upstream test, and have left that patch as a pull request: ZizzyDizzyMC/linx-server#34. Fixes #188667 --- pkgs/servers/web-apps/linx-server/default.nix | 33 +++++++++ pkgs/servers/web-apps/linx-server/test.patch | 74 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 109 insertions(+) create mode 100644 pkgs/servers/web-apps/linx-server/default.nix create mode 100644 pkgs/servers/web-apps/linx-server/test.patch diff --git a/pkgs/servers/web-apps/linx-server/default.nix b/pkgs/servers/web-apps/linx-server/default.nix new file mode 100644 index 000000000000..995eacf792e4 --- /dev/null +++ b/pkgs/servers/web-apps/linx-server/default.nix @@ -0,0 +1,33 @@ +{ buildGoModule +, fetchFromGitHub +, go-rice +, lib +}: + +buildGoModule rec { + pname = "linx-server"; + version = "unstable-2021-12-24"; + + src = fetchFromGitHub { + owner = "zizzydizzymc"; + repo = pname; + rev = "3f503442f10fca68a3212975b23cf74d92c9988c"; + hash = "sha256-tTHw/rIb2Gs5i5vZKsSgbUePIY7Np6HofBXu4TTjKbw="; + }; + + # upstream tests are broken, see zizzydizzymc/linx-server#34 + patches = [ ./test.patch ]; + + vendorHash = "sha256-/N3AXrPyENp3li4X86LNXsfBYbjJulk+0EAyogPNIpc="; + + nativeBuildInputs = [ go-rice ]; + + preBuild = "rice embed-go"; + + meta = with lib; { + description = "Self-hosted file/code/media sharing website."; + homepage = "https://put.icu"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ urandom ]; + }; +} diff --git a/pkgs/servers/web-apps/linx-server/test.patch b/pkgs/servers/web-apps/linx-server/test.patch new file mode 100644 index 000000000000..7303aecaf8ef --- /dev/null +++ b/pkgs/servers/web-apps/linx-server/test.patch @@ -0,0 +1,74 @@ +diff --git a/server_test.go b/server_test.go +index fc225ce..2df3608 100644 +--- a/server_test.go ++++ b/server_test.go +@@ -446,63 +446,6 @@ func TestPostJSONUpload(t *testing.T) { + } + } + +-func TestPostJSONUploadMaxExpiry(t *testing.T) { +- mux := setup() +- Config.maxExpiry = 300 +- +- // include 0 to test edge case +- // https://github.com/andreimarcu/linx-server/issues/111 +- testExpiries := []string{"86400", "-150", "0"} +- for _, expiry := range testExpiries { +- w := httptest.NewRecorder() +- +- filename := generateBarename() + ".txt" +- +- var b bytes.Buffer +- mw := multipart.NewWriter(&b) +- fw, err := mw.CreateFormFile("file", filename) +- if err != nil { +- t.Fatal(err) +- } +- +- fw.Write([]byte("File content")) +- mw.Close() +- +- req, err := http.NewRequest("POST", "/upload/", &b) +- req.Header.Set("Content-Type", mw.FormDataContentType()) +- req.Header.Set("Accept", "application/json") +- req.Header.Set("Linx-Expiry", expiry) +- if err != nil { +- t.Fatal(err) +- } +- +- mux.ServeHTTP(w, req) +- +- if w.Code != 200 { +- t.Log(w.Body.String()) +- t.Fatalf("Status code is not 200, but %d", w.Code) +- } +- +- var myjson RespOkJSON +- err = json.Unmarshal([]byte(w.Body.String()), &myjson) +- if err != nil { +- t.Fatal(err) +- } +- +- myExp, err := strconv.ParseInt(myjson.Expiry, 10, 64) +- if err != nil { +- t.Fatal(err) +- } +- +- expected := time.Now().Add(time.Duration(Config.maxExpiry) * time.Second).Unix() +- if myExp != expected { +- t.Fatalf("File expiry is not %d but %s", expected, myjson.Expiry) +- } +- } +- +- Config.maxExpiry = 0 +-} +- + func TestPostExpiresJSONUpload(t *testing.T) { + mux := setup() + w := httptest.NewRecorder() +@@ -1301,5 +1244,4 @@ func TestPutAndGetCLI(t *testing.T) { + if !strings.HasPrefix(contentType, "text/plain") { + t.Fatalf("Didn't receive file directly but %s", contentType) + } +- + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ddd3f57f82b8..5756b469b44f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23844,6 +23844,8 @@ with pkgs; listmonk = callPackage ../servers/mail/listmonk { }; + linx-server = callPackage ../servers/web-apps/linx-server {}; + livepeer = callPackage ../servers/livepeer { }; lwan = callPackage ../servers/http/lwan { }; From 292ee77c817b5b0d00d096e28a6cf9825dc5c466 Mon Sep 17 00:00:00 2001 From: Evan Mattiza Date: Thu, 28 Oct 2021 19:42:51 +0000 Subject: [PATCH 06/34] maintainers: add emattiza --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d51ea84e9efb..cb0235957140 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4132,6 +4132,12 @@ githubId = 1365692; name = "Will Fancher"; }; + emattiza = { + email = "nix@mattiza.dev"; + github = "emattiza"; + githubId = 11719476; + name = "Evan Mattiza"; + }; emmabastas = { email = "emma.bastas@protonmail.com"; matrix = "@emmabastas:matrix.org"; From 4684607935932853e918ad07fa37ec07f13e8d90 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Sat, 26 Nov 2022 10:14:01 +0000 Subject: [PATCH 07/34] booster: init at 0.9 The check phase is disabled because integration tests need kernel and other impure resources to function. Fixes #173437 --- pkgs/applications/system/booster/default.nix | 58 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/applications/system/booster/default.nix diff --git a/pkgs/applications/system/booster/default.nix b/pkgs/applications/system/booster/default.nix new file mode 100644 index 000000000000..dda41f24531b --- /dev/null +++ b/pkgs/applications/system/booster/default.nix @@ -0,0 +1,58 @@ +{ bash +, binutils +, buildGoModule +, fetchFromGitHub +, kbd +, lib +, libfido2 +, lvm2 +, lz4 +, makeWrapper +, mdadm +, unixtools +, xz +, zfs +}: + +buildGoModule rec { + pname = "booster"; + version = "0.9"; + + src = fetchFromGitHub { + owner = "anatol"; + repo = pname; + rev = version; + hash = "sha256-kalVFVBb+ngoUpm+iiIHGS6vBVLEvTVyKuSMSMbp7Qc="; + }; + + vendorHash = "sha256-GD+nsT4/Y2mTF+ztOC3N560BY5+QSfsPrXZ+dJYtzAw="; + + postPatch = '' + substituteInPlace init/main.go --replace "/usr/bin/fsck" "${unixtools.fsck}/bin/fsck" + ''; + + # integration tests are run against the current kernel + doCheck = false; + + nativeBuildInputs = [ + kbd + lz4 + makeWrapper + xz + ]; + + postInstall = let + runtimeInputs = [ bash binutils kbd libfido2 lvm2 mdadm zfs ]; + in '' + wrapProgram $out/bin/generator --prefix PATH : ${lib.makeBinPath runtimeInputs} + wrapProgram $out/bin/init --prefix PATH : ${lib.makeBinPath runtimeInputs} + ''; + + meta = with lib; { + description = "Fast and secure initramfs generator "; + homepage = "https://github.com/anatol/booster"; + license = licenses.mit; + maintainers = with maintainers; [ urandom ]; + mainProgram = "init"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29973ea019f5..33f5d144afc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27776,6 +27776,8 @@ with pkgs; bonzomatic = callPackage ../applications/editors/bonzomatic { }; + booster = callPackage ../applications/system/booster {}; + bottles = callPackage ../applications/misc/bottles/fhsenv.nix { }; bottles-unwrapped = callPackage ../applications/misc/bottles { }; From 56a9ace9335180b6702f039c770e561478f428db Mon Sep 17 00:00:00 2001 From: Evan Mattiza Date: Thu, 28 Oct 2021 19:42:51 +0000 Subject: [PATCH 08/34] otel-cli: init at 0.0.20 Fixes #143471 Closes #143475 --- pkgs/tools/misc/otel-cli/default.nix | 30 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/misc/otel-cli/default.nix diff --git a/pkgs/tools/misc/otel-cli/default.nix b/pkgs/tools/misc/otel-cli/default.nix new file mode 100644 index 000000000000..68d89d1a6e4a --- /dev/null +++ b/pkgs/tools/misc/otel-cli/default.nix @@ -0,0 +1,30 @@ +{ lib, bash, buildGoModule, fetchFromGitHub, getent, stdenv }: + +buildGoModule rec { + pname = "otel-cli"; + version = "0.0.20"; + + src = fetchFromGitHub { + owner = "equinix-labs"; + repo = pname; + rev = "v${version}"; + hash = "sha256-bWdkuw0uEE75l9YCo2Dq1NpWXuMH61RQ6p7m65P1QCE="; + }; + + vendorHash = "sha256-IJ2Gq5z1oNvcpWPh+BMs46VZMN1lHyE+M7kUinTSRr8="; + + preCheck = '' + ln -s $GOPATH/bin/otel-cli . + '' + lib.optionalString (!stdenv.isDarwin) '' + substituteInPlace main_test.go \ + --replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent ]}`' + ''; + + meta = with lib; { + homepage = "https://github.com/equinix-labs/otel-cli"; + description = "A command-line tool for sending OpenTelemetry traces"; + changelog = "https://github.com/equinix-labs/otel-cli/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with lib.maintainers; [ emattiza urandom ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 887b29613371..dd2bc0fa1786 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10308,6 +10308,8 @@ with pkgs; ostree = callPackage ../tools/misc/ostree { }; + otel-cli = callPackage ../tools/misc/otel-cli {}; + otfcc = callPackage ../tools/misc/otfcc { }; otpclient = callPackage ../applications/misc/otpclient { }; From 35bb28b367312d94815f03d07d5600ecd362fb26 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 22 Dec 2022 23:00:14 -0500 Subject: [PATCH 09/34] nixos: Add iso_minimal_new_kernel_no_zfs Support for ZFS, while desirable, is problematic with newer kernel releases. The stable ZFS release seldom supports the current newest kernel version, and this makes the new_kernel iso basically useless as it cannot be published, and is not often built with new kernel releases. This uses a dirty workaround to work around the fact it is impossible to remove a list item from a modules system list type. Since ZFS support is conditional to being supported on the current platform, we can fake ZFS not being supported *for the no-zfs build only*. This overlay is only added when evaluating the iso, nothing else. --- .../installation-cd-minimal-new-kernel-no-zfs.nix | 15 +++++++++++++++ nixos/release.nix | 12 ++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix diff --git a/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix b/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix new file mode 100644 index 000000000000..9d09cdbe0206 --- /dev/null +++ b/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + imports = [ ./installation-cd-minimal-new-kernel.nix ]; + + # Makes `availableOn` fail for zfs, see . + # This is a workaround since we cannot remove the `"zfs"` string from `supportedFilesystems`. + # The proper fix would be to make `supportedFilesystems` an attrset with true/false which we + # could then `lib.mkForce false` + nixpkgs.overlays = [(final: super: { + zfs = super.zfs.overrideAttrs(_: { + meta.platforms = []; + }); + })]; +} diff --git a/nixos/release.nix b/nixos/release.nix index 919aa86a2d63..7907be3c02fa 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -181,14 +181,22 @@ in rec { inherit system; }); - # A variant with a more recent (but possibly less stable) kernel - # that might support more hardware. + # A variant with a more recent (but possibly less stable) kernel that might support more hardware. + # This variant keeps zfs support enabled, hoping it will build and work. iso_minimal_new_kernel = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeIso { module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix; type = "minimal-new-kernel"; inherit system; }); + # A variant with a more recent (but possibly less stable) kernel that might support more hardware. + # ZFS support disabled since it is unlikely to support the latest kernel. + iso_minimal_new_kernel_no_zfs = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeIso { + module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix; + type = "minimal-new-kernel-no-zfs"; + inherit system; + }); + sd_image = forMatchingSystems [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ] (system: makeSdImage { module = { armv6l-linux = ./modules/installer/sd-card/sd-image-raspberrypi-installer.nix; From d91e1f98fa83fecf614111b3bfde9bf2b3c3aa3d Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 22 Dec 2022 23:07:19 -0500 Subject: [PATCH 10/34] nixos: Add sd_image_minimal_new_kernel_no_zfs Support for ZFS, while desirable, is problematic with newer kernel releases. The stable ZFS release seldom supports the current newest kernel version, and this makes the new_kernel image basically useless as it cannot be published, and is not often built with new kernel releases. This uses a dirty workaround to work around the fact it is impossible to remove a list item from a modules system list type. Since ZFS support is conditional to being supported on the current platform, we can fake ZFS not being supported *for the no-zfs build only*. This overlay is only added when evaluating the image, nothing else. --- ...-image-aarch64-new-kernel-no-zfs-installer.nix | 15 +++++++++++++++ nixos/release.nix | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix diff --git a/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix b/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix new file mode 100644 index 000000000000..0e5055960294 --- /dev/null +++ b/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + imports = [ ./sd-image-aarch64-new-kernel-installer.nix ]; + + # Makes `availableOn` fail for zfs, see . + # This is a workaround since we cannot remove the `"zfs"` string from `supportedFilesystems`. + # The proper fix would be to make `supportedFilesystems` an attrset with true/false which we + # could then `lib.mkForce false` + nixpkgs.overlays = [(final: super: { + zfs = super.zfs.overrideAttrs(_: { + meta.platforms = []; + }); + })]; +} diff --git a/nixos/release.nix b/nixos/release.nix index 7907be3c02fa..946379bcd661 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -214,6 +214,14 @@ in rec { inherit system; }); + sd_image_new_kernel_no_zfs = forMatchingSystems [ "aarch64-linux" ] (system: makeSdImage { + module = { + aarch64-linux = ./modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix; + }.${system}; + type = "minimal-new-kernel-no-zfs"; + inherit system; + }); + # A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF). ova = forMatchingSystems [ "x86_64-linux" ] (system: From da625fb824416eab6f931fff8741c27512135b03 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 23 Dec 2022 17:12:05 +0000 Subject: [PATCH 11/34] python310Packages.yoda: 1.9.6 -> 1.9.7 --- pkgs/development/libraries/physics/yoda/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix index 5424ad73787c..233a4acc3ac7 100644 --- a/pkgs/development/libraries/physics/yoda/default.nix +++ b/pkgs/development/libraries/physics/yoda/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "yoda"; - version = "1.9.6"; + version = "1.9.7"; src = fetchurl { url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2"; - hash = "sha256-IVI/ova2yPM0iVnzqUhzSpMMollR08kZC0Qk4Tc18qQ="; + hash = "sha256-jQe7BNy3k2SFhxihggNFLY2foAAp+pQjnq+oUpAyuP8="; }; nativeBuildInputs = with python.pkgs; [ cython makeWrapper ]; From d666d47b9638e3219b813d45b14d3db3aaff931a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Dec 2022 21:06:38 +0100 Subject: [PATCH 12/34] python310Packages.yoda: add changelog to meta --- .../libraries/physics/yoda/default.nix | 43 ++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix index 233a4acc3ac7..8806b0611d13 100644 --- a/pkgs/development/libraries/physics/yoda/default.nix +++ b/pkgs/development/libraries/physics/yoda/default.nix @@ -1,4 +1,13 @@ -{ lib, stdenv, fetchurl, fetchpatch, python, root, makeWrapper, zlib, withRootSupport ? false }: +{ lib +, stdenv +, fetchurl +, fetchpatch +, python +, root +, makeWrapper +, zlib +, withRootSupport ? false +}: stdenv.mkDerivation rec { pname = "yoda"; @@ -9,11 +18,23 @@ stdenv.mkDerivation rec { hash = "sha256-jQe7BNy3k2SFhxihggNFLY2foAAp+pQjnq+oUpAyuP8="; }; - nativeBuildInputs = with python.pkgs; [ cython makeWrapper ]; - buildInputs = [ python ] - ++ (with python.pkgs; [ numpy matplotlib ]) - ++ lib.optional withRootSupport root; - propagatedBuildInputs = [ zlib ]; + nativeBuildInputs = with python.pkgs; [ + cython + makeWrapper + ]; + + buildInputs = [ + python + ] ++ (with python.pkgs; [ + numpy + matplotlib + ]) ++ lib.optional withRootSupport [ + root + ]; + + propagatedBuildInputs = [ + zlib + ]; enableParallelBuilding = true; @@ -31,13 +52,15 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; doInstallCheck = true; + installCheckTarget = "check"; - meta = { + meta = with lib; { description = "Provides small set of data analysis (specifically histogramming) classes"; - license = lib.licenses.gpl3Only; + license = licenses.gpl3Only; homepage = "https://yoda.hepforge.org"; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ veprbl ]; + changelog = "https://gitlab.com/hepcedar/yoda/-/blob/yoda-${version}/ChangeLog"; + platforms = platforms.unix; + maintainers = with maintainers; [ veprbl ]; }; } From 7f64e371c182a8018fde2eda5f1b44bf118a5e8f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Dec 2022 03:42:13 +0000 Subject: [PATCH 13/34] steamtinkerlaunch: 11.11 -> 12.0 --- pkgs/tools/games/steamtinkerlaunch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/games/steamtinkerlaunch/default.nix b/pkgs/tools/games/steamtinkerlaunch/default.nix index 3098bd2912e6..d780ba1ddf61 100644 --- a/pkgs/tools/games/steamtinkerlaunch/default.nix +++ b/pkgs/tools/games/steamtinkerlaunch/default.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { pname = "steamtinkerlaunch"; - version = "11.11"; + version = "12.0"; src = fetchFromGitHub { owner = "sonic2kk"; repo = pname; rev = "v${version}"; - hash = "sha256-rWENtgV6spokzkhnmrrzsAQ19dROJ50ofEulU5Jx5IE="; + hash = "sha256-cEGERh0INc/xetQhALqc+lp/HNDoy3JdTZr/nHlthYc="; }; # hardcode PROGCMD because #150841 From 2452bd1c491fbfa213eea77ce57066777535a69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20He=C3=9Felmann?= Date: Sun, 18 Dec 2022 16:54:13 +0100 Subject: [PATCH 14/34] osv-scanner: init at 1.0.2 --- pkgs/tools/security/osv-scanner/default.nix | 42 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/tools/security/osv-scanner/default.nix diff --git a/pkgs/tools/security/osv-scanner/default.nix b/pkgs/tools/security/osv-scanner/default.nix new file mode 100644 index 000000000000..192d9f13b0ff --- /dev/null +++ b/pkgs/tools/security/osv-scanner/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, osv-scanner +}: +buildGoModule rec { + pname = "osv-scanner"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = "google"; + repo = pname; + rev = "v${version}"; + hash = "sha256-RmR6ZJg+UkE+eSmz4hGuMlObl6UvnGKNoLtBGVKoQ8Q="; + }; + + vendorHash = "sha256-HUgzoQuWBRnt8+lCiu9QfO1XR5EMnqVIkrL+nIMf0IA="; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + "-X main.commit=n/a" + "-X main.date=1970-01-01T00:00:00Z" + ]; + + # Tests require network connectivity to query https://api.osv.dev. + doCheck = false; + + passthru.tests.version = testers.testVersion { + package = osv-scanner; + }; + + meta = with lib; { + description = "Vulnerability scanner written in Go which uses the data provided by https://osv.dev"; + homepage = "https://github.com/google/osv-scanner"; + changelog = "https://github.com/google/osv-scanner/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ stehessel urandom ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ccdec4f5573..dd227ff6aa72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5164,6 +5164,8 @@ with pkgs; osv-detector = callPackage ../tools/security/osv-detector {}; + osv-scanner = callPackage ../tools/security/osv-scanner {}; + pastel = callPackage ../applications/misc/pastel { inherit (darwin.apple_sdk.frameworks) Security; }; From d57af94bdeab4e7ec068945c63d632f8b43eed05 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Dec 2022 00:54:45 +0000 Subject: [PATCH 15/34] python310Packages.scikit-hep-testdata: 0.4.24 -> 0.4.25 --- .../python-modules/scikit-hep-testdata/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikit-hep-testdata/default.nix b/pkgs/development/python-modules/scikit-hep-testdata/default.nix index a4fc84d2f66b..1c6c2a1d640e 100644 --- a/pkgs/development/python-modules/scikit-hep-testdata/default.nix +++ b/pkgs/development/python-modules/scikit-hep-testdata/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "scikit-hep-testdata"; - version = "0.4.24"; + version = "0.4.25"; format = "pyproject"; # fetch from github as we want the data files @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "scikit-hep"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-Q9yyzwFQpqN3Q1SmNKDBxdo51uMqKp8xJ9Ilo9eCTV0="; + sha256 = "sha256-JiQaGyvoECylcJHWR2xm8ob5fA+0FmIEQpTuxxysvlw="; }; nativeBuildInputs = [ From 6ef390adbf7b83504d5fed981b8561e7c51031e4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Dec 2022 01:24:03 +0000 Subject: [PATCH 16/34] python310Packages.django-storages: 1.13.1 -> 1.13.2 --- pkgs/development/python-modules/django-storages/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/django-storages/default.nix b/pkgs/development/python-modules/django-storages/default.nix index 040fe39d2b50..97cb8a87d601 100644 --- a/pkgs/development/python-modules/django-storages/default.nix +++ b/pkgs/development/python-modules/django-storages/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "django-storages"; - version = "1.13.1"; + version = "1.13.2"; src = fetchPypi { inherit pname version; - sha256 = "sha256-s9mOzAnxsWJ8Kyz0MJZDIs5OCGF9v5tCNsFqModaHgs="; + sha256 = "sha256-y63RXJCc63JH1P/FA/Eqm+w2mZ340L73wx5XF31RJog="; }; propagatedBuildInputs = [ django ]; From 581f37593551a90ae2a95c8f868b00ff03e45226 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Dec 2022 10:09:15 +0100 Subject: [PATCH 17/34] python310Packages.django-storages: add changelog to meta --- .../python-modules/django-storages/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/django-storages/default.nix b/pkgs/development/python-modules/django-storages/default.nix index 97cb8a87d601..b49e983c1a73 100644 --- a/pkgs/development/python-modules/django-storages/default.nix +++ b/pkgs/development/python-modules/django-storages/default.nix @@ -1,6 +1,7 @@ -{ lib, buildPythonPackage, fetchPypi +{ lib +, buildPythonPackage +, fetchPypi , django - , azure-storage-blob , boto3 , dropbox @@ -15,10 +16,12 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-y63RXJCc63JH1P/FA/Eqm+w2mZ340L73wx5XF31RJog="; + hash = "sha256-y63RXJCc63JH1P/FA/Eqm+w2mZ340L73wx5XF31RJog="; }; - propagatedBuildInputs = [ django ]; + propagatedBuildInputs = [ + django + ]; preCheck = '' export DJANGO_SETTINGS_MODULE=tests.settings @@ -27,6 +30,7 @@ buildPythonPackage rec { --replace 'test_accessed_time' 'dont_test_accessed_time' \ --replace 'test_modified_time' 'dont_test_modified_time' ''; + checkInputs = [ azure-storage-blob boto3 @@ -36,11 +40,14 @@ buildPythonPackage rec { paramiko ]; - pythonImportsCheck = [ "storages" ]; + pythonImportsCheck = [ + "storages" + ]; meta = with lib; { description = "Collection of custom storage backends for Django"; homepage = "https://django-storages.readthedocs.io"; + changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst"; license = licenses.bsd3; maintainers = with maintainers; [ mmai ]; }; From 385c252b3aa291f2689047ae364f8158eeb030a3 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:26:54 +0100 Subject: [PATCH 18/34] jumanpp: unbreak on aarch64-darwin --- pkgs/tools/text/jumanpp/default.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/text/jumanpp/default.nix b/pkgs/tools/text/jumanpp/default.nix index 5c6943b281df..348c785ab28d 100644 --- a/pkgs/tools/text/jumanpp/default.nix +++ b/pkgs/tools/text/jumanpp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake, protobuf, libiconv }: +{ lib, stdenv, fetchurl, fetchpatch, cmake, protobuf, libiconv }: stdenv.mkDerivation rec { pname = "jumanpp"; @@ -9,7 +9,25 @@ stdenv.mkDerivation rec { sha256 = "sha256-ASdr6qbkSe71M7QmuuwidCa4xQhDVoXBJ2XqvSY53pQ="; }; - patches = [ ./0001-Exclude-all-tests-from-the-build.patch ]; + patches = [ + ./0001-Exclude-all-tests-from-the-build.patch + # https://github.com/ku-nlp/jumanpp/pull/132 + (fetchpatch { + name = "fix-unused-warning.patch"; + url = "https://github.com/ku-nlp/jumanpp/commit/cc0d555287c8b214e9d6f0279c449a4e035deee4.patch"; + sha256 = "sha256-yRKwuUJ2UPXJcjxBGhSOmcQI/EOijiJDMmmmSRdNpX8="; + }) + (fetchpatch { + name = "update-libs.patch"; + url = "https://github.com/ku-nlp/jumanpp/commit/5e9068f56ae310ed7c1df185b14d49654ffe1ab6.patch"; + sha256 = "sha256-X49/ZoLT0OGePLZYlgacNxA1dHM4WYdQ8I4LW3sW16E="; + }) + (fetchpatch { + name = "fix-mmap-on-apple-m1.patch"; + url = "https://github.com/ku-nlp/jumanpp/commit/0c22249f12928d0c962f03f229026661bf0c7921.patch"; + sha256 = "sha256-g6CuruqyoMJxU/hlNoALx1QnFM8BlTsTd0pwlVrco3I="; + }) + ]; cmakeFlags = [ "-DJPP_ENABLE_TESTS=OFF" ]; nativeBuildInputs = [ cmake ]; @@ -27,7 +45,5 @@ stdenv.mkDerivation rec { license = licenses.asl20; maintainers = with maintainers; [ mt-caret ]; platforms = platforms.all; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; } From c549ba2a2724ff9f2a5a686fee69a56c248249bb Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:31:03 +0100 Subject: [PATCH 19/34] mongoose: unbreak on aarch64-darwin --- .../science/math/mongoose/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/science/math/mongoose/default.nix b/pkgs/development/libraries/science/math/mongoose/default.nix index 401497379562..c7348c9e4a98 100644 --- a/pkgs/development/libraries/science/math/mongoose/default.nix +++ b/pkgs/development/libraries/science/math/mongoose/default.nix @@ -1,5 +1,7 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub +, fetchpatch , cmake }: @@ -16,17 +18,27 @@ stdenv.mkDerivation rec { sha256 = "0ymwd4n8p8s0ndh1vcbmjcsm0x2cc2b7v3baww5y6as12873bcrh"; }; + patches = [ + # TODO: remove on next release + (fetchpatch { + name = "add-an-option-to-disable-coverage.patch"; + url = "https://github.com/ScottKolo/Mongoose/commit/39f4a0059ff7bad5bffa84369f31839214ac7877.patch"; + sha256 = "sha256-V8lCq22ixCCzLmKtW6bUL8cvJFZzdgYoA4BFs4xYd3c="; + }) + ]; + nativeBuildInputs = [ cmake ]; + # ld: file not found: libclang_rt.profile_osx.a + cmakeFlags = lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-DENABLE_COVERAGE=OFF"; + meta = with lib; { description = "Graph Coarsening and Partitioning Library"; homepage = "https://github.com/ScottKolo/Mongoose"; - license = licenses.gpl3; - maintainers = with maintainers; []; + license = licenses.gpl3Only; + maintainers = with maintainers; [ wegank ]; platforms = with platforms; unix; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; } From 112fa92938583e841128d65d4637b409d00fc4a6 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Thu, 1 Dec 2022 13:18:24 +0000 Subject: [PATCH 20/34] calico-various,calicoctl,confd-calico: init at 3.24.5 As calico internally builds a series of images, and multiple images contain different calico binaries, we have had to segregate the various components into different derivations. We have also used these image's CMD or ENTRYPOINT as the mainProgram, so that nix run is more useful. The cgo build process also proved to be quite tricky, so for now calico-felix and calico-node, both of which depend on libbpf, have not been packaged. Updates #124071 --- .../networking/cluster/calico/default.nix | 81 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 11 +++ 2 files changed, 92 insertions(+) create mode 100644 pkgs/applications/networking/cluster/calico/default.nix diff --git a/pkgs/applications/networking/cluster/calico/default.nix b/pkgs/applications/networking/cluster/calico/default.nix new file mode 100644 index 000000000000..192899ff1b22 --- /dev/null +++ b/pkgs/applications/networking/cluster/calico/default.nix @@ -0,0 +1,81 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +builtins.mapAttrs (pname: { doCheck ? true, mainProgram ? pname, subPackages }: buildGoModule rec { + inherit pname; + version = "3.24.5"; + + src = fetchFromGitHub { + owner = "projectcalico"; + repo = "calico"; + rev = "v${version}"; + hash = "sha256-fB9FHiIqVieVkPfHmBvcaUmUqkT1ZbDT26+DUE9lbdc="; + }; + + vendorHash = "sha256-ogQ/REf5cngoGAFIBN++txew6UqOw1hqCVsixyuGtug="; + + inherit doCheck subPackages; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + homepage = "https://projectcalico.docs.tigera.io"; + changelog = "https://github.com/projectcalico/calico/releases/tag/v${version}"; + description = "Cloud native networking and network security"; + license = licenses.asl20; + maintainers = with maintainers; [ urandom ]; + inherit mainProgram; + }; +}) { + calico-apiserver = { + mainProgram = "apiserver"; + subPackages = [ + "apiserver/cmd/..." + ]; + }; + calico-app-policy = { + # integration tests require network + doCheck = false; + mainProgram = "dikastes"; + subPackages = [ + "app-policy/cmd/..." + ]; + }; + calico-cni-plugin = { + mainProgram = "calico"; + subPackages = [ + "cni-plugin/cmd/..." + ]; + }; + calico-kube-controllers = { + # integration tests require network and docker + doCheck = false; + mainProgram = "kube-controllers"; + subPackages = [ + "kube-controllers/cmd/..." + ]; + }; + calico-pod2daemon = { + mainProgram = "flexvol"; + subPackages = [ + "pod2daemon/csidriver" + "pod2daemon/flexvol" + "pod2daemon/nodeagent" + ]; + }; + calico-typha = { + subPackages = [ + "typha/cmd/..." + ]; + }; + calicoctl = { + subPackages = [ + "calicoctl/calicoctl" + ]; + }; + confd-calico = { + mainProgram = "confd"; + subPackages = [ + "confd" + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be3c2791aafb..aaa21f17860a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27822,6 +27822,17 @@ with pkgs; calibre-web = callPackage ../servers/calibre-web { }; + # calico-felix and calico-node have not been packaged due to libbpf, linking issues + inherit (callPackage ../applications/networking/cluster/calico {}) + calico-apiserver + calico-app-policy + calico-cni-plugin + calico-kube-controllers + calico-pod2daemon + calico-typha + calicoctl + confd-calico; + calligra = libsForQt5.callPackage ../applications/office/calligra { }; perkeep = callPackage ../applications/misc/perkeep { }; From faae415dcda7e23c5d22fef7a8a92c6cf80abfdc Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Wed, 21 Sep 2022 18:33:47 +0200 Subject: [PATCH 21/34] akkoma: init at 3.5.0 --- pkgs/servers/akkoma/default.nix | 210 +++++ pkgs/servers/akkoma/mix.nix | 1494 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 1706 insertions(+) create mode 100644 pkgs/servers/akkoma/default.nix create mode 100644 pkgs/servers/akkoma/mix.nix diff --git a/pkgs/servers/akkoma/default.nix b/pkgs/servers/akkoma/default.nix new file mode 100644 index 000000000000..050d2c64285c --- /dev/null +++ b/pkgs/servers/akkoma/default.nix @@ -0,0 +1,210 @@ +{ lib +, beamPackages +, fetchFromGitea, fetchFromGitHub, fetchFromGitLab +, cmake, file, libxcrypt +, writeText +, ... +}: + +beamPackages.mixRelease rec { + pname = "pleroma"; + version = "3.5.0"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "akkoma"; + rev = "v${version}"; + hash = "sha256-Apt+6nI4zOCyRb5msPt5UF9vyaendyaOjrYBMl0DqRY="; + }; + + postPatch = '' + # Remove dependency on OS_Mon + sed -E -i 's/(^|\s):os_mon,//' \ + mix.exs + ''; + + postBuild = '' + # Digest and compress static files + rm -f priv/static/READ_THIS_BEFORE_TOUCHING_FILES_HERE + mix phx.digest --no-deps-check + ''; + + # cf. https://github.com/whitfin/cachex/issues/205 + stripDebug = false; + + mixNixDeps = import ./mix.nix { + inherit beamPackages lib; + overrides = (final: prev: { + # mix2nix does not support git dependencies yet, + # so we need to add them manually + captcha = beamPackages.buildMix rec { + name = "captcha"; + version = "0.1.0"; + + src = fetchFromGitLab { + domain = "git.pleroma.social"; + group = "pleroma"; + owner = "elixir-libraries"; + repo = "elixir-captcha"; + rev = "e0f16822d578866e186a0974d65ad58cddc1e2ab"; + sha256 = "0qbf86l59kmpf1nd82v4141ba9ba75xwmnqzpgbm23fa1hh8pi9c"; + }; + }; + crypt = beamPackages.buildRebar3 rec { + name = "crypt"; + version = "0.4.3"; + + src = fetchFromGitHub { + owner = "msantos"; + repo = "crypt"; + rev = "f75cd55325e33cbea198fb41fe41871392f8fb76"; + sha256 = "sha256-ZYhZTe7cTITkl8DZ4z2IOlxTX5gnbJImu/lVJ2ZjR1o="; + }; + + buildInputs = [ libxcrypt ]; + + postInstall = '' + mv $out/lib/erlang/lib/crypt-${version}/priv/{source,crypt}.so + ''; + + beamDeps = with final; [ elixir_make ]; + }; + elasticsearch = beamPackages.buildMix rec { + name = "elasticsearch"; + version = "1.0.1"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "elasticsearch-elixir"; + rev = "6cd946f75f6ab9042521a009d1d32d29a90113ca"; + hash = "sha256-CtmQHVl+VTpemne+nxbkYGcErrgCo+t3ZBPbkFSpyF0="; + }; + }; + gettext = beamPackages.buildMix { + name = "gettext"; + version = "0.19.1"; + + src = fetchFromGitHub { + owner = "tusooa"; + repo = "gettext"; + rev = "72fb2496b6c5280ed911bdc3756890e7f38a4808"; + hash = "sha256-V0qmE+LcAbVoWsJmWE4fwrduYFIZ5BzK/sGzgLY3eH0="; + }; + }; + linkify = beamPackages.buildMix rec { + name = "linkify"; + version = "0.5.2"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "linkify"; + rev = "2567e2c1073fa371fd26fd66dfa5bc77b6919c16"; + hash = "sha256-e3wzlbRuyw/UB5Tb7IozX/WR1T+sIBf9C/o5Thki9vg="; + }; + }; + mfm_parser = beamPackages.buildMix rec { + name = "mfm_parser"; + version = "0.1.1"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "mfm-parser"; + rev = "912fba81152d4d572e457fd5427f9875b2bc3dbe"; + hash = "sha256-n3WmERxKK8VM8jFIBAPS6GkbT7/zjqi3AjjWbjOdMzs="; + }; + + beamDeps = with final; [ phoenix_view temple ]; + }; + remote_ip = beamPackages.buildMix rec { + name = "remote_ip"; + version = "0.1.5"; + + src = fetchFromGitLab { + domain = "git.pleroma.social"; + group = "pleroma"; + owner = "elixir-libraries"; + repo = "remote_ip"; + rev = "b647d0deecaa3acb140854fe4bda5b7e1dc6d1c8"; + sha256 = "0c7vmakcxlcs3j040018i7bfd6z0yq6fjfig02g5fgakx398s0x6"; + }; + beamDeps = with final; [ combine plug inet_cidr ]; + }; + search_parser = beamPackages.buildMix rec { + name = "search_parser"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "FloatingGhost"; + repo = "pleroma-contrib-search-parser"; + rev = "08971a81e68686f9ac465cfb6661d51c5e4e1e7f"; + hash = "sha256-sbo9Kcp2oT05o2GAF+IgziLPYmCkWgBfFMBCytmqg3Y="; + }; + + beamDeps = with final; [ nimble_parsec ]; + }; + temple = beamPackages.buildMix rec { + name = "temple"; + version = "0.9.0-rc.0"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "temple"; + rev = "066a699ade472d8fa42a9d730b29a61af9bc8b59"; + hash = "sha256-qA0z8WTMjO2OixcZBARn/LbuV3s3LGtwZ9nSjj/tWBc="; + }; + + mixEnv = "dev"; + beamDeps = with final; [ earmark_parser ex_doc makeup makeup_elixir makeup_erlang nimble_parsec ]; + }; + + + # Some additional build inputs and build fixes + fast_html = prev.fast_html.override { + nativeBuildInputs = [ cmake ]; + dontUseCmakeConfigure = true; + }; + http_signatures = prev.http_signatures.override { + patchPhase = '' + substituteInPlace mix.exs --replace ":logger" ":logger, :public_key" + ''; + }; + majic = prev.majic.override { + buildInputs = [ file ]; + }; + syslog = prev.syslog.override { + buildPlugins = with beamPackages; [ pc ]; + }; + + mime = prev.mime.override { + patchPhase = let + cfgFile = writeText "config.exs" '' + use Mix.Config + config :mime, :types, %{ + "application/activity+json" => ["activity+json"], + "application/jrd+json" => ["jrd+json"], + "application/ld+json" => ["activity+json"], + "application/xml" => ["xml"], + "application/xrd+xml" => ["xrd+xml"] + } + ''; + in '' + mkdir config + cp ${cfgFile} config/config.exs + ''; + }; + }); + }; + + meta = with lib; { + description = "ActivityPub microblogging server"; + homepage = "https://akkoma.social"; + license = licenses.agpl3; + maintainers = with maintainers; [ mvs ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/akkoma/mix.nix b/pkgs/servers/akkoma/mix.nix new file mode 100644 index 000000000000..f26d96c0f216 --- /dev/null +++ b/pkgs/servers/akkoma/mix.nix @@ -0,0 +1,1494 @@ +{ lib, beamPackages, overrides ? (x: y: {}) }: + +let + buildRebar3 = lib.makeOverridable beamPackages.buildRebar3; + buildMix = lib.makeOverridable beamPackages.buildMix; + buildErlangMk = lib.makeOverridable beamPackages.buildErlangMk; + + self = packages // (overrides self packages); + + packages = with beamPackages; with self; { + base62 = buildMix rec { + name = "base62"; + version = "1.2.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1fvpygkdmd7l737lv7svir8n1vhk0m094i8ygwcvx9gam2ykc4yl"; + }; + + beamDeps = [ custom_base ]; + }; + + bbcode_pleroma = buildMix rec { + name = "bbcode_pleroma"; + version = "0.2.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1hyixcxhcf2j2gyavmmnvfslnl6z60dz1qa9xysfspws85s1118r"; + }; + + beamDeps = [ nimble_parsec ]; + }; + + bcrypt_elixir = buildMix rec { + name = "bcrypt_elixir"; + version = "2.3.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0ybjs37fyn45x31lzhxic4kd4jmzwcwkgy4spwayykbn8rgjs622"; + }; + + beamDeps = [ comeonin elixir_make ]; + }; + + benchee = buildMix rec { + name = "benchee"; + version = "1.1.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "14vdbvmkkqhcqvilq1w8zl895f4hpbv7fw2q5c0ml5h3a1a7v9bx"; + }; + + beamDeps = [ deep_merge statistex ]; + }; + + bunt = buildMix rec { + name = "bunt"; + version = "0.2.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "19bp6xh052ql3ha0v3r8999cvja5d2p6cph02mxphfaj4jsbyc53"; + }; + + beamDeps = []; + }; + + cachex = buildMix rec { + name = "cachex"; + version = "3.4.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1rfbbij81zmk6p75z33wg04mfcjqsxzzh67vclllvfjgmfqj609p"; + }; + + beamDeps = [ eternal jumper sleeplocks unsafe ]; + }; + + calendar = buildMix rec { + name = "calendar"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0vqa1zpzsdgr6i3yx8j9b6qscvgrbvzn43p5bqm930hcja0ra3lr"; + }; + + beamDeps = [ tzdata ]; + }; + + castore = buildMix rec { + name = "castore"; + version = "0.1.19"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0291pdk3x7qzbv8laris1y90vi7g9akmykd23m2fz0nwlmhh2vp9"; + }; + + beamDeps = []; + }; + + certifi = buildRebar3 rec { + name = "certifi"; + version = "2.9.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0ha6vmf5p3xlbf5w1msa89frhvfk535rnyfybz9wdmh6vdms8v96"; + }; + + beamDeps = []; + }; + + combine = buildMix rec { + name = "combine"; + version = "0.10.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "06s5y8b0snr1s5ax9v3s7rc6c8xf5vj6878d1mc7cc07j0bvq78v"; + }; + + beamDeps = []; + }; + + comeonin = buildMix rec { + name = "comeonin"; + version = "5.3.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1pw4rhhsh8mwj26dkbxz2niih9j8pc3qijlpcl8jh208rg1cjf1y"; + }; + + beamDeps = []; + }; + + concurrent_limiter = buildMix rec { + name = "concurrent_limiter"; + version = "0.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1sqnb987qwwy4ip7kxh9g7vv5wz61fpv3pbnxpbv9yy073r8z5jk"; + }; + + beamDeps = [ telemetry ]; + }; + + connection = buildMix rec { + name = "connection"; + version = "1.1.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1746n8ba11amp1xhwzp38yfii2h051za8ndxlwdykyqqljq1wb3j"; + }; + + beamDeps = []; + }; + + cors_plug = buildMix rec { + name = "cors_plug"; + version = "2.0.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1sls8rns2k48qrga0ngysbn9aknapmn3xfn28by1gqbcir0y2jpf"; + }; + + beamDeps = [ plug ]; + }; + + cowboy = buildErlangMk rec { + name = "cowboy"; + version = "2.9.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1phv0a1zbgk7imfgcm0dlacm7hbjcdygb0pqmx4s26jf9f9rywic"; + }; + + beamDeps = [ cowlib ranch ]; + }; + + cowboy_telemetry = buildRebar3 rec { + name = "cowboy_telemetry"; + version = "0.3.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1bzhcdq12p837cii2jgvzjyrffiwgm5bsb1pra2an3hkcqrzsvis"; + }; + + beamDeps = [ cowboy telemetry ]; + }; + + cowlib = buildRebar3 rec { + name = "cowlib"; + version = "2.11.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1ac6pj3x4vdbsa8hvmbzpdfc4k0v1p102jbd39snai8wnah9sgib"; + }; + + beamDeps = []; + }; + + credo = buildMix rec { + name = "credo"; + version = "1.6.7"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1lvxzksdrc2lbl0rzrww4q5rmayf37q0phcpz2kyvxq7n2zi1qa1"; + }; + + beamDeps = [ bunt file_system jason ]; + }; + + custom_base = buildMix rec { + name = "custom_base"; + version = "0.2.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0qx47d4w2mxa3rr6mrxdasgk7prxqwd0y9zpjhz61jayrkx1kw4d"; + }; + + beamDeps = []; + }; + + db_connection = buildMix rec { + name = "db_connection"; + version = "2.4.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "04iwywfqf8k125yfvm084l1mp0bcv82mwih7xlpb7kx61xdw29y1"; + }; + + beamDeps = [ connection telemetry ]; + }; + + decimal = buildMix rec { + name = "decimal"; + version = "2.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0xzm8hfhn8q02rmg8cpgs68n5jz61wvqg7bxww9i1a6yanf6wril"; + }; + + beamDeps = []; + }; + + deep_merge = buildMix rec { + name = "deep_merge"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0c2li2a3hxcc05nwvy4kpsal0315yk900kxyybld972b15gqww6f"; + }; + + beamDeps = []; + }; + + earmark = buildMix rec { + name = "earmark"; + version = "1.4.33"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "01mfb0c1vq72pira1622cmvaly2p6n4dxwmsrw10i9x0srii7cr1"; + }; + + beamDeps = [ earmark_parser ]; + }; + + earmark_parser = buildMix rec { + name = "earmark_parser"; + version = "1.4.29"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "00rmqvf3hkxfvkijqd624n0hn1xqims8h211xmm02fdi7qdsy0j9"; + }; + + beamDeps = []; + }; + + eblurhash = buildRebar3 rec { + name = "eblurhash"; + version = "1.2.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0k040pj8hlm8mwy0ra459hk35v9gfsvvgp596nl27q2dj00cl84c"; + }; + + beamDeps = []; + }; + + ecto = buildMix rec { + name = "ecto"; + version = "3.9.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "05cxg8rq6rawmn8ryfks5hj7h9b4k9bxxsn7k8l5b7p0fx8nsii1"; + }; + + beamDeps = [ decimal jason telemetry ]; + }; + + ecto_enum = buildMix rec { + name = "ecto_enum"; + version = "1.4.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1r2ffrr020fhfviqn21cv06sd3sp4bf1jra0xrgb3hl1f445rdcg"; + }; + + beamDeps = [ ecto ecto_sql postgrex ]; + }; + + ecto_psql_extras = buildMix rec { + name = "ecto_psql_extras"; + version = "0.7.10"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "123h3s4zpk5q618rcxlfz4axj3rz3cmyk68gps8c05sg3vc8qpjh"; + }; + + beamDeps = [ ecto_sql postgrex table_rex ]; + }; + + ecto_sql = buildMix rec { + name = "ecto_sql"; + version = "3.9.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "060iqmkqnsyy2kv05s218ady9lgnz7rvgknwz6xjks7jzyj71m2z"; + }; + + beamDeps = [ db_connection ecto postgrex telemetry ]; + }; + + elixir_make = buildMix rec { + name = "elixir_make"; + version = "0.6.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "05ppvbhqi5m9zk1c4xnrki814sqhxrc7d1dpvfmwm2v7qm8xdjzm"; + }; + + beamDeps = []; + }; + + eternal = buildMix rec { + name = "eternal"; + version = "1.2.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "10p7m6kv2z2c16gw36wgiwnkykss4lfkmm71llxp09ipkhmy77rc"; + }; + + beamDeps = []; + }; + + ex_aws = buildMix rec { + name = "ex_aws"; + version = "2.1.9"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "040dmj94xg3wnk9wplm0myr2q12zad4w1xz1zc0n01y90dkpfv1y"; + }; + + beamDeps = [ hackney jason sweet_xml ]; + }; + + ex_aws_s3 = buildMix rec { + name = "ex_aws_s3"; + version = "2.3.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "017iswr9m2kwri2m5j3r9m0b7hk4vqqddbqy09k5d4nfz6vg0i00"; + }; + + beamDeps = [ ex_aws sweet_xml ]; + }; + + ex_const = buildMix rec { + name = "ex_const"; + version = "0.2.4"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0rwppain0bd36krph1as0vxlxb42psc6mlkfi67jp6fc21k39zcn"; + }; + + beamDeps = []; + }; + + ex_doc = buildMix rec { + name = "ex_doc"; + version = "0.29.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1xkljn0ggg7fk8qv2dmr2m40h3lmfhi038p2hksdldja6yk5yx5p"; + }; + + beamDeps = [ earmark_parser makeup_elixir makeup_erlang ]; + }; + + ex_machina = buildMix rec { + name = "ex_machina"; + version = "2.7.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1y2v4j1zg1ji8q8di0fxpc3z3n2jmbnc85d6hx68j4fykfisg6j1"; + }; + + beamDeps = [ ecto ecto_sql ]; + }; + + ex_syslogger = buildMix rec { + name = "ex_syslogger"; + version = "1.5.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "16c376cvw0bcjz8a6gs3nhmg037i894gl5kgxi8jdinv6r0sp7xb"; + }; + + beamDeps = [ poison syslog ]; + }; + + excoveralls = buildMix rec { + name = "excoveralls"; + version = "0.12.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1nnsr9dv7mybcxx3y5p2gqzyy3p479w21c55vvsq6hi6dihkx2jn"; + }; + + beamDeps = [ hackney jason ]; + }; + + fast_html = buildMix rec { + name = "fast_html"; + version = "2.0.5"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "01k51qri44535b1hwixlxk7151vph6vapswlfq918g245544ypv0"; + }; + + beamDeps = [ elixir_make nimble_pool ]; + }; + + fast_sanitize = buildMix rec { + name = "fast_sanitize"; + version = "0.2.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1qjnbs63q0d95dqhh2r9sz3zpg2y4hjy23kxsqanwf6h21njibg8"; + }; + + beamDeps = [ fast_html plug ]; + }; + + file_system = buildMix rec { + name = "file_system"; + version = "0.2.10"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1p0myxmnjjds8bbg69dd6fvhk8q3n7lb78zd4qvmjajnzgdmw6a1"; + }; + + beamDeps = []; + }; + + finch = buildMix rec { + name = "finch"; + version = "0.13.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1k56zfbadpppn8flavb4aczq0npcqnlhg993l51c1k8dw76pv5a9"; + }; + + beamDeps = [ castore mime mint nimble_options nimble_pool telemetry ]; + }; + + flake_id = buildMix rec { + name = "flake_id"; + version = "0.1.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "09yq3dlqqrb7v4ysblwpz1al0q5qcmryldkwq1kx5b71zn881z1i"; + }; + + beamDeps = [ base62 ecto ]; + }; + + floki = buildMix rec { + name = "floki"; + version = "0.34.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1769xg2sqdh6s1j06l7gi98iy35ri79xk6sq58rh1phdyi1ryflw"; + }; + + beamDeps = []; + }; + + gen_smtp = buildRebar3 rec { + name = "gen_smtp"; + version = "0.15.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "03s40l97j6z4mx6a84cbl9w94v3dvfw4f97dqx4hi61hh2l19g99"; + }; + + beamDeps = []; + }; + + gun = buildRebar3 rec { + name = "gun"; + version = "2.0.0-rc.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1z2lsbbpl2925z8x2ri0rhp30ccn9d08pgqd2hkxf4342jp1x7bb"; + }; + + beamDeps = [ cowlib ]; + }; + + hackney = buildRebar3 rec { + name = "hackney"; + version = "1.18.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "13hja14kig5jnzcizpdghj68i88f0yd9wjdfjic9nzi98kzxmv54"; + }; + + beamDeps = [ certifi idna metrics mimerl parse_trans ssl_verify_fun unicode_util_compat ]; + }; + + hpax = buildMix rec { + name = "hpax"; + version = "0.1.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "04wci9ifsfyd2pbcrnpgh2aq0a8fi1lpkrzb91kz3x93b8yq91rc"; + }; + + beamDeps = []; + }; + + html_entities = buildMix rec { + name = "html_entities"; + version = "0.5.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1k7xyj0q38ms3n5hbn782pa6w1vgd6biwlxr4db6319l828a6fy5"; + }; + + beamDeps = []; + }; + + http_signatures = buildMix rec { + name = "http_signatures"; + version = "0.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "18s2b5383xl2qjijkxag4mvwk2p5kv2fw58c9ii7pk12fc08lfyc"; + }; + + beamDeps = []; + }; + + httpoison = buildMix rec { + name = "httpoison"; + version = "1.8.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "08crb48yz7r7w00pzw9gfk862g99z2ma2x6awab0rqvjd7951crb"; + }; + + beamDeps = [ hackney ]; + }; + + idna = buildRebar3 rec { + name = "idna"; + version = "6.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1sjcjibl34sprpf1dgdmzfww24xlyy34lpj7mhcys4j4i6vnwdwj"; + }; + + beamDeps = [ unicode_util_compat ]; + }; + + inet_cidr = buildMix rec { + name = "inet_cidr"; + version = "1.0.4"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1g61i08cizr99ivy050lv8fmvnwia9zmipfvlwff8jkhi40x78k4"; + }; + + beamDeps = []; + }; + + jason = buildMix rec { + name = "jason"; + version = "1.4.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0891p2yrg3ri04p302cxfww3fi16pvvw1kh4r91zg85jhl87k8vr"; + }; + + beamDeps = [ decimal ]; + }; + + joken = buildMix rec { + name = "joken"; + version = "2.5.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1rvlvwgxi7myg5mp1yb0f75gk82yl90660iigg5dhpkwc64mrci2"; + }; + + beamDeps = [ jose ]; + }; + + jose = buildMix rec { + name = "jose"; + version = "1.11.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1lj715gzl022yc47qsg9712x8nc9wi7x70msv8c3lpym92y3y54q"; + }; + + beamDeps = []; + }; + + jumper = buildMix rec { + name = "jumper"; + version = "1.0.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0cvlbfkapkvbwaijmjq3cxg5m6yv4rh69wvss9kfj862i83mk31i"; + }; + + beamDeps = []; + }; + + majic = buildMix rec { + name = "majic"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "17hab8kmqc6gsiqicfgsaik0rvmakb6mbshlbxllj3b5fs7qa1br"; + }; + + beamDeps = [ elixir_make mime nimble_pool plug ]; + }; + + makeup = buildMix rec { + name = "makeup"; + version = "1.1.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "19jpprryixi452jwhws3bbks6ki3wni9kgzah3srg22a3x8fsi8a"; + }; + + beamDeps = [ nimble_parsec ]; + }; + + makeup_elixir = buildMix rec { + name = "makeup_elixir"; + version = "0.16.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1rrqydcq2bshs577z7jbgdnrlg7cpnzc8n48kap4c2ln2gfcpci8"; + }; + + beamDeps = [ makeup nimble_parsec ]; + }; + + makeup_erlang = buildMix rec { + name = "makeup_erlang"; + version = "0.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1fvw0zr7vqd94vlj62xbqh0yrih1f7wwnmlj62rz0klax44hhk8p"; + }; + + beamDeps = [ makeup ]; + }; + + meck = buildRebar3 rec { + name = "meck"; + version = "0.9.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "09jq0jrsd3dwzjlnwqjv6m9r2rijgiv57yja6jl41p2p2db4yd41"; + }; + + beamDeps = []; + }; + + metrics = buildRebar3 rec { + name = "metrics"; + version = "1.0.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "05lz15piphyhvvm3d1ldjyw0zsrvz50d2m5f2q3s8x2gvkfrmc39"; + }; + + beamDeps = []; + }; + + mime = buildMix rec { + name = "mime"; + version = "1.6.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "19qrpnmaf3w8bblvkv6z5g82hzd10rhc7bqxvqyi88c37xhsi89i"; + }; + + beamDeps = []; + }; + + mimerl = buildRebar3 rec { + name = "mimerl"; + version = "1.2.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "08wkw73dy449n68ssrkz57gikfzqk3vfnf264s31jn5aa1b5hy7j"; + }; + + beamDeps = []; + }; + + mint = buildMix rec { + name = "mint"; + version = "1.4.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "106x9nmzi4ji5cqaddn76pxiyxdihk12z2qgszcdgd2rrjxsaxff"; + }; + + beamDeps = [ castore hpax ]; + }; + + mock = buildMix rec { + name = "mock"; + version = "0.3.7"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0p3yrx049fdw88kjidngd2lkwqkkyck5r51ng2dxj7z41539m92d"; + }; + + beamDeps = [ meck ]; + }; + + mogrify = buildMix rec { + name = "mogrify"; + version = "0.9.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "17b9dy40rq3rwn7crjggjafibxz4ys4nqq81adcf486af3yi13f1"; + }; + + beamDeps = []; + }; + + mox = buildMix rec { + name = "mox"; + version = "1.0.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1wpyh6wp76lyx0q2cys23rpmci4gj1pqwnqvfk467xxanchlk1pr"; + }; + + beamDeps = []; + }; + + nimble_options = buildMix rec { + name = "nimble_options"; + version = "0.4.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0bd0pi3sij9vxhiilv25x6n3jls75g3b38rljvm1x896ycd1qw76"; + }; + + beamDeps = []; + }; + + nimble_parsec = buildMix rec { + name = "nimble_parsec"; + version = "1.2.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1c3hnppmjkwnqrc9vvm72kpliav0mqyyk4cjp7vsqccikgiqkmy8"; + }; + + beamDeps = []; + }; + + nimble_pool = buildMix rec { + name = "nimble_pool"; + version = "0.2.6"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0gv59waa505mz2gi956sj1aa6844c65w2dp2qh2jfgsx15am0w8w"; + }; + + beamDeps = []; + }; + + oban = buildMix rec { + name = "oban"; + version = "2.12.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0n6h8a6v9hzk6s5dhadfbrvwnx2nkl64n575ff5ph3afnz14864v"; + }; + + beamDeps = [ ecto_sql jason postgrex telemetry ]; + }; + + open_api_spex = buildMix rec { + name = "open_api_spex"; + version = "3.10.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0rc7q857b8zb9vc4c699arjihca353rzm3bfjc31z0ib7pg2pfrd"; + }; + + beamDeps = [ jason plug poison ]; + }; + + parse_trans = buildRebar3 rec { + name = "parse_trans"; + version = "3.3.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "12w8ai6b5s6b4hnvkav7hwxd846zdd74r32f84nkcmjzi1vrbk87"; + }; + + beamDeps = []; + }; + + phoenix = buildMix rec { + name = "phoenix"; + version = "1.6.15"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0wh6s8id3b4c4hgiawq995p192wxsws4sr4bm1g7b55kyvxvj2np"; + }; + + beamDeps = [ castore jason phoenix_pubsub phoenix_view plug plug_cowboy plug_crypto telemetry ]; + }; + + phoenix_ecto = buildMix rec { + name = "phoenix_ecto"; + version = "4.4.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1h9wnjmxns8y8dsr0r41ks66gscaqm7ivk4gsh5y07nkiralx1h9"; + }; + + beamDeps = [ ecto phoenix_html plug ]; + }; + + phoenix_html = buildMix rec { + name = "phoenix_html"; + version = "3.2.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0ky5idgid1psz6hmh2b2kmj6n974axww74hrxwv02p6jasx9gv1n"; + }; + + beamDeps = [ plug ]; + }; + + phoenix_live_dashboard = buildMix rec { + name = "phoenix_live_dashboard"; + version = "0.6.5"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0lmq1m7k465i9mzw35l7bx69n85mibwzd76976840r43sw6sakzg"; + }; + + beamDeps = [ ecto ecto_psql_extras mime phoenix_live_view telemetry_metrics ]; + }; + + phoenix_live_view = buildMix rec { + name = "phoenix_live_view"; + version = "0.17.12"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1j4r1pjl60hphan7mf0fn60cnqkdc7hah9zmf4sz8vy1mbhdavdg"; + }; + + beamDeps = [ jason phoenix phoenix_html telemetry ]; + }; + + phoenix_pubsub = buildMix rec { + name = "phoenix_pubsub"; + version = "2.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1nfqrmbrq45if9pgk6g6vqiply2sxc40is3bfanphn7a3rnpqdl1"; + }; + + beamDeps = []; + }; + + phoenix_swoosh = buildMix rec { + name = "phoenix_swoosh"; + version = "0.3.4"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "072pa2rnzkvw645f3jh15rmgsnzccbyqjx1wbsmj28138qc24w9r"; + }; + + beamDeps = [ hackney phoenix phoenix_html swoosh ]; + }; + + phoenix_template = buildMix rec { + name = "phoenix_template"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0ms39n5s6kh532s20yxzj7sh0rz5lslh09ibq5j21lkglacny1hv"; + }; + + beamDeps = [ phoenix_html ]; + }; + + phoenix_view = buildMix rec { + name = "phoenix_view"; + version = "2.0.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0vykabqxyk08gkfm45zy5dnlnzygwx6g9z4z2h7fxix51qiyfad9"; + }; + + beamDeps = [ phoenix_html phoenix_template ]; + }; + + plug = buildMix rec { + name = "plug"; + version = "1.10.4"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1874ixvvjklg0hnxr6d990qzarvvfxhd4s35c5bfqbixwwzj67md"; + }; + + beamDeps = [ mime plug_crypto telemetry ]; + }; + + plug_cowboy = buildMix rec { + name = "plug_cowboy"; + version = "2.6.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "19jgv5dm53hv5aqgxxzr3fnrpgfll9ics199swp6iriwfl5z4g07"; + }; + + beamDeps = [ cowboy cowboy_telemetry plug ]; + }; + + plug_crypto = buildMix rec { + name = "plug_crypto"; + version = "1.2.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "18plj2idhp3f0nmqyjjf2rzj849l3br0797m8ln20p5dqscj0rxm"; + }; + + beamDeps = []; + }; + + plug_static_index_html = buildMix rec { + name = "plug_static_index_html"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1kxm1flxw3rnsj5jj24c2p23wq1wyblbl32n4rf6046i6k7lzzbr"; + }; + + beamDeps = [ plug ]; + }; + + poison = buildMix rec { + name = "poison"; + version = "5.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1z6kv2s6w5nrq20446510nys30ir0hfr8ksrlxi0rf01qlbn3p0i"; + }; + + beamDeps = [ decimal ]; + }; + + poolboy = buildRebar3 rec { + name = "poolboy"; + version = "1.5.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1qq116314418jp4skxg8c6jx29fwp688a738lgaz6h2lrq29gmys"; + }; + + beamDeps = []; + }; + + postgrex = buildMix rec { + name = "postgrex"; + version = "0.16.5"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1s5jbwfzsdsyvlwgx3bqlfwilj2c468wi3qxq0c2d23fvhwxdspd"; + }; + + beamDeps = [ connection db_connection decimal jason ]; + }; + + pot = buildRebar3 rec { + name = "pot"; + version = "1.0.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1q62ascgjgddq0l42nvysfwkxmbvh9qsd8m5dsfr2psgb9zi5zkq"; + }; + + beamDeps = []; + }; + + quack = buildMix rec { + name = "quack"; + version = "0.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0hr5ppds4a9vih14hzs3lfj07r5069w8ifr7022fn4j18jkvydnp"; + }; + + beamDeps = [ poison tesla ]; + }; + + ranch = buildRebar3 rec { + name = "ranch"; + version = "1.8.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1rfz5ld54pkd2w25jadyznia2vb7aw9bclck21fizargd39wzys9"; + }; + + beamDeps = []; + }; + + recon = buildMix rec { + name = "recon"; + version = "2.5.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "070f4dgfp1vzvz0fxwavzv9bd7nl5fx3rmmkyr0zy7g9vv426x9c"; + }; + + beamDeps = []; + }; + + sleeplocks = buildRebar3 rec { + name = "sleeplocks"; + version = "1.1.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "19argym7xifhsbrp21glkgs0dz1xpd00yfhsbhqdd0dpqm4d1rcz"; + }; + + beamDeps = []; + }; + + ssl_verify_fun = buildRebar3 rec { + name = "ssl_verify_fun"; + version = "1.1.6"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1026l1z1jh25z8bfrhaw0ryk5gprhrpnirq877zqhg253x3x5c5x"; + }; + + beamDeps = []; + }; + + statistex = buildMix rec { + name = "statistex"; + version = "1.0.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "09vcm2sz2llv00cm7krkx3n5r8ra1b42zx9gfjs8l0imf3p8p7gz"; + }; + + beamDeps = []; + }; + + sweet_xml = buildMix rec { + name = "sweet_xml"; + version = "0.7.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1fpmwhqgvakvdpbwmmyh31ays3hzhnm9766xqyzp9zmkl5kwh471"; + }; + + beamDeps = []; + }; + + swoosh = buildMix rec { + name = "swoosh"; + version = "1.8.2"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1nxpcwq7ynvqjp65z544dvdfw7jx9k0m58w4kb0bdbdg1rsvln6h"; + }; + + beamDeps = [ cowboy ex_aws finch gen_smtp hackney jason mime plug_cowboy telemetry ]; + }; + + syslog = buildRebar3 rec { + name = "syslog"; + version = "1.1.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1qarnqappln4xhlr700rhnhfnfvgvv9l3y1ywdxmh83y7hvl2sjc"; + }; + + beamDeps = []; + }; + + table_rex = buildMix rec { + name = "table_rex"; + version = "3.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "141404hwnwnpspvhs112j2la8dfnvkwr0xy14ff42w6nljmj72k7"; + }; + + beamDeps = []; + }; + + telemetry = buildRebar3 rec { + name = "telemetry"; + version = "0.4.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0hc0fr2bh97wah9ycpm7hb5jdqr5hnl1s3b2ibbbx9gxbwvbhwpb"; + }; + + beamDeps = []; + }; + + telemetry_metrics = buildMix rec { + name = "telemetry_metrics"; + version = "0.6.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1iilk2n75kn9i95fdp8mpxvn3rcn3ghln7p77cijqws13j3y1sbv"; + }; + + beamDeps = [ telemetry ]; + }; + + tesla = buildMix rec { + name = "tesla"; + version = "1.4.4"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0mv48vgby1fv9b2npc0ird3y4isr10np3a3yas3v5hfyz54kll6m"; + }; + + beamDeps = [ castore finch gun hackney jason mime mint poison telemetry ]; + }; + + timex = buildMix rec { + name = "timex"; + version = "3.7.9"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1q8chs28k5my6nzzm61rhc2l9wkhzfn0kiqzf87i71xvwn11asb4"; + }; + + beamDeps = [ combine gettext tzdata ]; + }; + + trailing_format_plug = buildMix rec { + name = "trailing_format_plug"; + version = "0.0.7"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0gv9z8m1kpfs5f5zcsh9m6vr36s88x1xc6g0k6lr7sgk2m6dwkxx"; + }; + + beamDeps = [ plug ]; + }; + + tzdata = buildMix rec { + name = "tzdata"; + version = "1.1.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "11wpm1mjla8hbkb5mssprg3gsq1v24s8m8nyk3hx5z7aaa1yr756"; + }; + + beamDeps = [ hackney ]; + }; + + ueberauth = buildMix rec { + name = "ueberauth"; + version = "0.10.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1lz660mr1sgv302f6qkr85swpd2jgs7255fg70h7zsb4dimg750k"; + }; + + beamDeps = [ plug ]; + }; + + unicode_util_compat = buildRebar3 rec { + name = "unicode_util_compat"; + version = "0.7.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "08952lw8cjdw8w171lv8wqbrxc4rcmb3jhkrdb7n06gngpbfdvi5"; + }; + + beamDeps = []; + }; + + unsafe = buildMix rec { + name = "unsafe"; + version = "1.0.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1rahpgz1lsd66r7ycns1ryz2qymamz1anrlps986900lsai2jxvc"; + }; + + beamDeps = []; + }; + + vex = buildMix rec { + name = "vex"; + version = "0.9.0"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "0zw51hj525xiiggjk9n5ciix6pdhr8fvl6z7mqgkzan8sm2gz7y6"; + }; + + beamDeps = []; + }; + + web_push_encryption = buildMix rec { + name = "web_push_encryption"; + version = "0.3.1"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "18p2f1gqkg209vf3nychjxy7xpxhgiwyhn4halvr7yr2fvjv50jg"; + }; + + beamDeps = [ httpoison jose ]; + }; + + websockex = buildMix rec { + name = "websockex"; + version = "0.4.3"; + + src = fetchHex { + pkg = "${name}"; + version = "${version}"; + sha256 = "1r2kmi2pcmdzvgbd08ci9avy0g5p2lhx80jn736a98w55c3ygwlm"; + }; + + beamDeps = []; + }; + }; +in self + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 342052eb5f85..85d64e1dcdc6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1194,6 +1194,8 @@ with pkgs; adminer = callPackage ../servers/adminer { }; + akkoma = callPackage ../servers/akkoma { }; + advancecomp = callPackage ../tools/compression/advancecomp {}; aefs = callPackage ../tools/filesystems/aefs { }; From 6658dfbefbf4de06efc4df3fdd4b416dae53daf4 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 23 Sep 2022 00:10:40 +0200 Subject: [PATCH 22/34] akkoma-frontends/pleroma-fe: init at unstable-2022-12-10 --- pkgs/servers/akkoma/pleroma-fe/default.nix | 82 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/servers/akkoma/pleroma-fe/default.nix diff --git a/pkgs/servers/akkoma/pleroma-fe/default.nix b/pkgs/servers/akkoma/pleroma-fe/default.nix new file mode 100644 index 000000000000..71f3bcd8aee2 --- /dev/null +++ b/pkgs/servers/akkoma/pleroma-fe/default.nix @@ -0,0 +1,82 @@ +{ lib +, stdenv +, fetchFromGitea, fetchYarnDeps +, fixup_yarn_lock, yarn, nodejs +, jpegoptim, oxipng, nodePackages +}: + +stdenv.mkDerivation rec { + pname = "pleroma-fe"; + version = "unstable-2022-12-10"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "pleroma-fe"; + rev = "9c9b4cc07c018a21c8261dd7680a97aa3a670756"; + hash = "sha256-jYJcG2Q5kxOH29G5WV/6Cx7a+b7FuFROEn/8ruh7cDc="; + }; + + offlineCache = fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-pz6NHBYZRi+Rwx6H74895vFWGLSivI7Ul8XV6wMbgJg="; + }; + + nativeBuildInputs = [ + fixup_yarn_lock + yarn + nodejs + jpegoptim + oxipng + nodePackages.svgo + ]; + + postPatch = '' + # Build scripts assume to be used within a Git repository checkout + sed -E -i '/^let commitHash =/,/;$/clet commitHash = "${builtins.substring 0 7 src.rev}";' \ + build/webpack.prod.conf.js + ''; + + configurePhase = '' + runHook preConfigure + + export HOME="$(mktemp -d)" + + yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg offlineCache} + fixup_yarn_lock yarn.lock + + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + export NODE_ENV="production" + export NODE_OPTIONS="--openssl-legacy-provider" + yarn run build --offline + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + # (Losslessly) optimise compression of image artifacts + find dist -type f -name '*.jpg' -execdir ${jpegoptim}/bin/jpegoptim -w$NIX_BUILD_CORES {} \; + find dist -type f -name '*.png' -execdir ${oxipng}/bin/oxipng -o max -t $NIX_BUILD_CORES {} \; + find dist -type f -name '*.svg' -execdir ${nodePackages.svgo}/bin/svgo {} \; + + cp -R -v dist $out + + runHook postInstall + ''; + + meta = with lib; { + description = "Frontend for Akkoma and Pleroma"; + homepage = "https://akkoma.dev/AkkomaGang/pleroma-fe/"; + license = licenses.agpl3; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85d64e1dcdc6..be7694ec68f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1195,6 +1195,9 @@ with pkgs; adminer = callPackage ../servers/adminer { }; akkoma = callPackage ../servers/akkoma { }; + akkoma-frontends = recurseIntoAttrs { + pleroma-fe = callPackage ../servers/akkoma/pleroma-fe { }; + }; advancecomp = callPackage ../tools/compression/advancecomp {}; From 628b61f33fcbb2530da55e9419c99bc5924675ad Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sun, 25 Sep 2022 16:01:48 +0200 Subject: [PATCH 23/34] akkoma-frontends/admin-fe: init at unstable-2022-09-10 --- pkgs/servers/akkoma/admin-fe/default.nix | 84 + pkgs/servers/akkoma/admin-fe/deps.patch | 46 + pkgs/servers/akkoma/admin-fe/yarn.lock | 12493 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 4 files changed, 12624 insertions(+) create mode 100644 pkgs/servers/akkoma/admin-fe/default.nix create mode 100644 pkgs/servers/akkoma/admin-fe/deps.patch create mode 100644 pkgs/servers/akkoma/admin-fe/yarn.lock diff --git a/pkgs/servers/akkoma/admin-fe/default.nix b/pkgs/servers/akkoma/admin-fe/default.nix new file mode 100644 index 000000000000..9b75d1e0dbcf --- /dev/null +++ b/pkgs/servers/akkoma/admin-fe/default.nix @@ -0,0 +1,84 @@ +{ lib +, stdenv +, fetchFromGitea, fetchYarnDeps +, fixup_yarn_lock, yarn, nodejs +, python3, pkg-config, libsass +}: + +stdenv.mkDerivation rec { + pname = "admin-fe"; + version = "unstable-2022-09-10"; + + src = fetchFromGitea { + domain = "akkoma.dev"; + owner = "AkkomaGang"; + repo = "admin-fe"; + rev = "e094e12c3ecb540df839fdf20c5a03d10454fcad"; + hash = "sha256-dqkW8p4x+5z1Hd8gp8V4+DsLm8EspVwPXDxtvlp1AIk="; + }; + + patches = [ ./deps.patch ]; + + offlineCache = fetchYarnDeps { + yarnLock = ./yarn.lock; + hash = "sha256-h+QUBT2VwPWu2l05Zkcp+0vHN/x40uXxw2KYjq7l/Xk="; + }; + + nativeBuildInputs = [ + fixup_yarn_lock + yarn + nodejs + pkg-config + python3 + libsass + ]; + + postPatch = '' + cp ${./yarn.lock} yarn.lock + ''; + + configurePhase = '' + runHook preConfigure + + export HOME="$(mktemp -d)" + + yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg offlineCache} + fixup_yarn_lock yarn.lock + + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules/cross-env + + mkdir -p "$HOME/.node-gyp/${nodejs.version}" + echo 9 >"$HOME/.node-gyp/${nodejs.version}/installVersion" + ln -sfv "${nodejs}/include" "$HOME/.node-gyp/${nodejs.version}" + export npm_config_nodedir=${nodejs} + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + pushd node_modules/node-sass + LIBSASS_EXT=auto yarn run build --offline + popd + + export NODE_OPTIONS="--openssl-legacy-provider" + yarn run build:prod --offline + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + cp -R -v dist $out + runHook postInstall + ''; + + meta = with lib; { + description = "Admin interface for Akkoma"; + homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/"; + license = licenses.agpl3; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/servers/akkoma/admin-fe/deps.patch b/pkgs/servers/akkoma/admin-fe/deps.patch new file mode 100644 index 000000000000..35e1efdff84a --- /dev/null +++ b/pkgs/servers/akkoma/admin-fe/deps.patch @@ -0,0 +1,46 @@ +diff --git a/package.json b/package.json +index f267be19..fb806527 100644 +--- a/package.json ++++ b/package.json +@@ -31,14 +31,12 @@ + "type": "git", + "url": "git+https://akkoma.dev/AkkomaGang/admin-fe.git" + }, +- "resolutions": { +- "prosemirror-model": "1.9.1" +- }, + "bugs": { + "url": "https://akkoma.dev/AkkomaGang/admin-fe/-/issues" + }, + "dependencies": { + "@babel/runtime": "^7.3.4", ++ "@toast-ui/editor": "^3.2.0", + "axios": "0.18.0", + "clipboard": "1.7.1", + "codemirror": "5.39.2", +@@ -65,7 +63,6 @@ + "sortablejs": "1.7.0", + "tiptap": "^1.29.6", + "tiptap-extensions": "^1.32.7", +- "tui-editor": "1.2.7", + "vue": "^2.6.8", + "vue-count-to": "1.0.13", + "vue-i18n": "^8.9.0", +diff --git a/src/components/element-ui/MarkdownEditor/index.vue b/src/components/element-ui/MarkdownEditor/index.vue +index 7ae9fd40..18114701 100644 +--- a/src/components/element-ui/MarkdownEditor/index.vue ++++ b/src/components/element-ui/MarkdownEditor/index.vue +@@ -5,10 +5,10 @@ +