summary refs log tree commit diff
path: root/pkgs/servers/mastodon/update.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/mastodon/update.nix')
-rw-r--r--pkgs/servers/mastodon/update.nix36
1 files changed, 23 insertions, 13 deletions
diff --git a/pkgs/servers/mastodon/update.nix b/pkgs/servers/mastodon/update.nix
index d7423b3e66c..2e7df482530 100644
--- a/pkgs/servers/mastodon/update.nix
+++ b/pkgs/servers/mastodon/update.nix
@@ -1,20 +1,30 @@
-{ 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}
-  '';
-
+{ pkgs
+, runCommand
+, lib
+, makeWrapper
+, yarn2nix
+, bundix
+, coreutils
+, diffutils
+, nix-prefetch-github
+, gnused
+, jq
+}:
+let
+  binPath = lib.makeBinPath [ yarn2nix bundix coreutils diffutils nix-prefetch-github gnused jq ];
+in
+runCommand "mastodon-update-script"
+{
   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;
   };
-}
+} ''
+  mkdir -p $out/bin
+  cp ${./update.sh} $out/bin/update.sh
+  patchShebangs $out/bin/update.sh
+  wrapProgram $out/bin/update.sh --prefix PATH : ${binPath}
+''