summary refs log tree commit diff
path: root/modules/packages/dotnet-pack.nix
blob: 27c419d7b93cb0f16f463efe2a581324c32fd0ee (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
{ pkgs ? import <nixpkgs> {} }:

#pkgs.stdenv.mkDerivation {
#  name = "dotnet-pack";
#  dontUnpack = true;
#  buildInputs = with pkgs; [ dotnet-sdk dotnet-sdk_7 dotnet-sdk_8 ];
#
#  # Define the build phase
#  buildPhase = ''
#    mkdir -p $out
#    ln -sf ${pkgs.dotnet-sdk}/* $out/
#    ln -sf ${pkgs.dotnet-sdk_7}/* $out/
#    ln -sf ${pkgs.dotnet-sdk_8}/* $out/
#  '';
#}

pkgs.symlinkJoin {
  name = "dotnet-pack";
  paths = [ pkgs.dotnet-sdk_8 pkgs.dotnet-sdk_7 pkgs.dotnet-sdk ];
  postBuild = ''
    rm -rfv $out/bin
    rm -rfv $out/dotnet
    cp -rv ${pkgs.dotnet-sdk_8}/dotnet $out/
    cp -rv ${pkgs.dotnet-sdk_8}/bin $out/
  '';
}