nixpkgs/pkgs/by-name/wa/wavefunctioncollapse/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

34 lines
1.3 KiB
Nix

{lib, stdenv, fetchFromGitHub, mono}:
stdenv.mkDerivation rec {
pname = "wavefunctioncollapse";
version = "0.0pre20170130";
src = fetchFromGitHub {
owner = "mxgmn";
repo = "WaveFunctionCollapse";
rev = "ef660c037b1d7c4ebce66efc625af2bb2f2111c0";
sha256 = "1dr5fvdgn1jqqacby6rrqm951adx3jw0j70r5i8pmrqnnw482l8m";
};
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 = {
description = "Generator of bitmaps that are locally similar to the input bitmap";
license = lib.licenses.mit;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
};
}