mastodon.updateScript: use runCommand instead of mkDerivation
This commit is contained in:
parent
093d1a2bd9
commit
daf2b0f917
1 changed files with 23 additions and 13 deletions
|
@ -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}
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue