nuget-to-nix: include required dependencies

This commit is contained in:
Ivar Scholten 2022-02-11 18:31:29 +01:00 committed by Jonathan Ringer
parent f0af1ef49c
commit e3c19ba57e
2 changed files with 28 additions and 4 deletions

View File

@ -1,5 +1,27 @@
{ runCommand }:
{ lib
, runCommandLocal
, runtimeShell
, substituteAll
, nix
, coreutils
, findutils
, gnused
}:
runCommand "nuget-to-nix" { preferLocalBuild = true; } ''
install -D -m755 ${./nuget-to-nix.sh} $out/bin/nuget-to-nix
runCommandLocal "nuget-to-nix" {
script = substituteAll {
src = ./nuget-to-nix.sh;
inherit runtimeShell;
binPath = lib.makeBinPath [
nix
coreutils
findutils
gnused
];
};
meta.description = "Convert a nuget packages directory to a lockfile for buildDotnetModule";
} ''
install -Dm755 $script $out/bin/nuget-to-nix
''

View File

@ -1,7 +1,9 @@
#!/usr/bin/env bash
#!@runtimeShell@
set -euo pipefail
export PATH="@binPath@"
if [ $# -eq 0 ]; then
>&2 echo "Usage: $0 [packages directory] > deps.nix"
exit 1