depot/third_party/nixpkgs/pkgs/servers/mastodon/update.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

30 lines
663 B
Nix

{ 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 ];
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}
''