about summary refs log tree commit diff
path: root/mkdeps
blob: e6bea58f3307024a7755d954047e0c8ce9002cd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env nix-shell
#!nix-shell -i "bash -x" -p bash nuget-to-nix git dotnet-sdk_7 nix curl jq yq
projects=(
  MatrixRoomUtils.Web
)

find . | grep -E '(bin|obj)$' | while read d; do rm -rf $d & done
wait

execDir=$(pwd)

for p in $projects
do
  (
    cd $p
    pwd
    MSBUILDLIVELOGGER=false dotnet restore --packages=packages -v n --ucr
    #dotnet --list-sdks
    ${execDir}/nuget-to-nix.sh packages | tee deps.nix
    #where nuget-to-nix
    pwd
    du -sh packages
    rm -rf packages
    git add deps.nix
  )
  nix flake update
  git add flake.lock
done