Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 mono, 6}: 7stdenv.mkDerivation { 8 pname = "wavefunctioncollapse"; 9 version = "0.0pre20170130"; 10 src = fetchFromGitHub { 11 owner = "mxgmn"; 12 repo = "WaveFunctionCollapse"; 13 rev = "ef660c037b1d7c4ebce66efc625af2bb2f2111c0"; 14 sha256 = "1dr5fvdgn1jqqacby6rrqm951adx3jw0j70r5i8pmrqnnw482l8m"; 15 }; 16 buildPhase = '' 17 mcs *.cs -out:wavefunctioncollapse.exe -r:System.Drawing 18 grep -m1 -B999 '^[*][/]' Main.cs > COPYING.MIT 19 ''; 20 installPhase = '' 21 mkdir -p "$out"/{bin,share/doc/wavefunctioncollapse,share/wavefunctioncollapse} 22 cp README.md COPYING.MIT "$out"/share/doc/wavefunctioncollapse 23 cp wavefunctioncollapse.exe "$out"/bin 24 cp -r [Ss]amples samples.xml "$out/share/wavefunctioncollapse" 25 26 echo "#! ${stdenv.shell}" >> "$out/bin/wavefunctioncollapse" 27 echo "chmod u+w ." >> "$out/bin/wavefunctioncollapse" 28 echo "'${mono}/bin/mono' '$out/bin/wavefunctioncollapse.exe' \"\$@\"" >> "$out/bin/wavefunctioncollapse" 29 chmod a+x "$out/bin/wavefunctioncollapse" 30 ''; 31 buildInputs = [ mono ]; 32 meta = { 33 description = "Generator of bitmaps that are locally similar to the input bitmap"; 34 license = lib.licenses.mit; 35 maintainers = [ lib.maintainers.raskin ]; 36 platforms = lib.platforms.linux; 37 }; 38}