about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/mastodon/update.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/mastodon/update.nix')
-rw-r--r--nixpkgs/pkgs/servers/mastodon/update.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/mastodon/update.nix b/nixpkgs/pkgs/servers/mastodon/update.nix
new file mode 100644
index 000000000000..28c0ff235e74
--- /dev/null
+++ b/nixpkgs/pkgs/servers/mastodon/update.nix
@@ -0,0 +1,21 @@
+{ pkgs, stdenv, lib, makeWrapper, yarn2nix, bundix, coreutils,
+  diffutils, nix-prefetch-github, gnused, jq }:
+stdenv.mkDerivation rec {
+  name = "mastodon-update-script";
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ${./update.sh} $out/bin/update.sh
+    patchShebangs $out/bin/update.sh
+    wrapProgram $out/bin/update.sh --prefix PATH : ${lib.makeBinPath buildInputs}
+  '';
+  phases = [ "installPhase" ];
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ yarn2nix bundix coreutils diffutils nix-prefetch-github gnused jq ];
+
+  meta = {
+    maintainers = with lib.maintainers; [ happy-river ];
+    description = "Utility to generate Nix expressions for Mastodon's dependencies";
+    platforms = lib.platforms.unix;
+  };
+}