mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Commited my experimental Visual C# build function. Currently, it should only be used by brave people
svn path=/nixpkgs/trunk/; revision=22272
This commit is contained in:
parent
f1a2bd1580
commit
970ce3a878
61
pkgs/build-support/dotnetenv/buildSolution.nix
Normal file
61
pkgs/build-support/dotnetenv/buildSolution.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{stdenv, dotnetfx}:
|
||||
{ name
|
||||
, src
|
||||
, baseDir ? "."
|
||||
, slnFile
|
||||
, targets ? "ReBuild"
|
||||
, verbosity ? "detailed"
|
||||
, options ? "/p:Configuration=Debug;Platform=Win32"
|
||||
, assemblyInputs ? []
|
||||
, runtimeAssemblies ? []
|
||||
, preBuild ? ""
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name src preBuild;
|
||||
|
||||
buildInputs = [ dotnetfx ];
|
||||
preConfigure = ''
|
||||
cd ${baseDir}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
for i in ${toString assemblyInputs}
|
||||
do
|
||||
windowsPath=$(cygpath --windows $i)
|
||||
echo "Using assembly path: $windowsPath"
|
||||
|
||||
if [ "$assemblySearchPaths" = "" ]
|
||||
then
|
||||
assemblySearchPaths="$windowsPath"
|
||||
else
|
||||
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Assembly search paths are: $assemblySearchPaths"
|
||||
|
||||
if [ "$assemblySearchPaths" != "" ]
|
||||
then
|
||||
echo "Using assembly search paths args: $assemblySearchPathsArg"
|
||||
export AssemblySearchPaths=$assemblySearchPaths
|
||||
fi
|
||||
|
||||
ensureDir $out
|
||||
MSBuild.exe ${slnFile} /nologo /t:${targets} /p:IntermediateOutputPath=$(cygpath --windows $out)\\ /p:OutputPath=$(cygpath --windows $out)\\ /verbosity:${verbosity} ${options}
|
||||
|
||||
# Create references to runtime dependencies
|
||||
# !!! Should be more efficient (e.g. symlinking)
|
||||
|
||||
for i in ${toString runtimeAssemblies}
|
||||
do
|
||||
cd $i
|
||||
|
||||
for j in $(find . -type f)
|
||||
do
|
||||
mkdir -p $out/$(dirname $j)
|
||||
cp $j $out/$(dirname $j)
|
||||
done
|
||||
done
|
||||
'';
|
||||
}
|
10
pkgs/build-support/dotnetenv/default.nix
Normal file
10
pkgs/build-support/dotnetenv/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{stdenv, dotnetfx}:
|
||||
|
||||
{
|
||||
buildSolution = import ./buildSolution.nix {
|
||||
inherit stdenv;
|
||||
dotnetfx = dotnetfx.pkg;
|
||||
};
|
||||
|
||||
inherit (dotnetfx) assembly20Path wcfPath referenceAssembly30Path referenceAssembly35Path;
|
||||
}
|
23
pkgs/development/libraries/dotnetfx35/default.nix
Normal file
23
pkgs/development/libraries/dotnetfx35/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{stdenv}:
|
||||
|
||||
let
|
||||
windir = "/cygdrive/c/WINDOWS";
|
||||
in
|
||||
{
|
||||
pkg = stdenv.mkDerivation {
|
||||
name = "dotnetfx-3.5";
|
||||
src = "${windir}/Microsoft.NET/Framework/v3.5";
|
||||
buildCommand = ''
|
||||
ensureDir $out/bin
|
||||
ln -s $src/MSBuild.exe $out/bin
|
||||
'';
|
||||
};
|
||||
|
||||
assembly20Path = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727";
|
||||
|
||||
wcfPath = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.0/WINDOW~1";
|
||||
|
||||
referenceAssembly30Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.0";
|
||||
|
||||
referenceAssembly35Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.5";
|
||||
}
|
@ -230,6 +230,11 @@ let
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
dotnetenv = import ../build-support/dotnetenv {
|
||||
inherit stdenv;
|
||||
dotnetfx = dotnetfx35;
|
||||
};
|
||||
|
||||
fetchbzr = import ../build-support/fetchbzr {
|
||||
inherit stdenv bazaar;
|
||||
};
|
||||
@ -653,6 +658,10 @@ let
|
||||
inherit builderDefs;
|
||||
};
|
||||
|
||||
dotnetfx35 = import ../development/libraries/dotnetfx35 {
|
||||
inherit stdenv;
|
||||
};
|
||||
|
||||
dropbear = makeOverridable (import ../tools/networking/dropbear) {
|
||||
inherit fetchurl stdenv;
|
||||
enableStatic = true;
|
||||
|
Loading…
Reference in New Issue
Block a user