about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/mastodon/update.nix
blob: 1bd557a74a5bce790068d842bd628f7a103e6179 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ pkgs
, runCommand
, lib
, makeWrapper
, yarn2nix
, bundix
, coreutils
, diffutils
, nix-prefetch-git
, gnused
, jq
}:
let
  binPath = lib.makeBinPath [ yarn2nix bundix coreutils diffutils nix-prefetch-git gnused jq ];
in
runCommand "mastodon-update-script"
{
  nativeBuildInputs = [ makeWrapper ];

  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}
''