mastodon.updateScript: use runCommand instead of mkDerivation

This commit is contained in:
Kerstin Humm 2021-11-06 00:59:59 +01:00
parent 093d1a2bd9
commit daf2b0f917
No known key found for this signature in database
GPG key ID: 40293358C7B9326B

View file

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