2016-10-01 12:45:17 +01:00
|
|
|
{stdenv, fetchFromGitHub, mono}:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "wavefunctioncollapse";
|
2017-02-25 16:05:47 +00:00
|
|
|
version = "0.0pre20170130";
|
2016-10-01 12:45:17 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mxgmn";
|
|
|
|
repo = "WaveFunctionCollapse";
|
2017-02-25 16:05:47 +00:00
|
|
|
rev = "ef660c037b1d7c4ebce66efc625af2bb2f2111c0";
|
|
|
|
sha256 = "1dr5fvdgn1jqqacby6rrqm951adx3jw0j70r5i8pmrqnnw482l8m";
|
2016-10-01 12:45:17 +01:00
|
|
|
};
|
|
|
|
buildPhase = ''
|
|
|
|
mcs *.cs -out:wavefunctioncollapse.exe -r:System.Drawing
|
|
|
|
grep -m1 -B999 '^[*][/]' Main.cs > COPYING.MIT
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/wavefunctioncollapse,share/wavefunctioncollapse}
|
|
|
|
cp README.md COPYING.MIT "$out"/share/doc/wavefunctioncollapse
|
|
|
|
cp wavefunctioncollapse.exe "$out"/bin
|
|
|
|
cp -r [Ss]amples samples.xml "$out/share/wavefunctioncollapse"
|
|
|
|
|
|
|
|
echo "#! ${stdenv.shell}" >> "$out/bin/wavefunctioncollapse"
|
|
|
|
echo "chmod u+w ." >> "$out/bin/wavefunctioncollapse"
|
|
|
|
echo "'${mono}/bin/mono' '$out/bin/wavefunctioncollapse.exe' \"\$@\"" >> "$out/bin/wavefunctioncollapse"
|
|
|
|
chmod a+x "$out/bin/wavefunctioncollapse"
|
|
|
|
'';
|
|
|
|
buildInputs = [mono];
|
|
|
|
meta = {
|
|
|
|
inherit version;
|
|
|
|
description = ''A generator of bitmaps that are locally similar to the input bitmap'';
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|