1 {lib, stdenv, fetchFromGitHub, mono}:
2 stdenv.mkDerivation rec {
3 pname = "wavefunctioncollapse";
4 version = "0.0pre20170130";
5 src = fetchFromGitHub {
7 repo = "WaveFunctionCollapse";
8 rev = "ef660c037b1d7c4ebce66efc625af2bb2f2111c0";
9 sha256 = "1dr5fvdgn1jqqacby6rrqm951adx3jw0j70r5i8pmrqnnw482l8m";
12 mcs *.cs -out:wavefunctioncollapse.exe -r:System.Drawing
13 grep -m1 -B999 '^[*][/]' Main.cs > COPYING.MIT
16 mkdir -p "$out"/{bin,share/doc/wavefunctioncollapse,share/wavefunctioncollapse}
17 cp README.md COPYING.MIT "$out"/share/doc/wavefunctioncollapse
18 cp wavefunctioncollapse.exe "$out"/bin
19 cp -r [Ss]amples samples.xml "$out/share/wavefunctioncollapse"
21 echo "#! ${stdenv.shell}" >> "$out/bin/wavefunctioncollapse"
22 echo "chmod u+w ." >> "$out/bin/wavefunctioncollapse"
23 echo "'${mono}/bin/mono' '$out/bin/wavefunctioncollapse.exe' \"\$@\"" >> "$out/bin/wavefunctioncollapse"
24 chmod a+x "$out/bin/wavefunctioncollapse"
28 description = "Generator of bitmaps that are locally similar to the input bitmap";
29 license = lib.licenses.mit;
30 maintainers = [lib.maintainers.raskin];
31 platforms = lib.platforms.linux;