nuget-to-nix: include required dependencies

main
Ivar Scholten 2 years ago committed by Jonathan Ringer
parent f0af1ef49c
commit e3c19ba57e
  1. 28
      pkgs/build-support/dotnet/nuget-to-nix/default.nix
  2. 4
      pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh

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

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

Loading…
Cancel
Save