1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 fetchpatch,
6}:
7
8buildGoModule {
9 pname = "primitive";
10 version = "0-unstable-2020-05-04";
11
12 src = fetchFromGitHub {
13 owner = "fogleman";
14 repo = "primitive";
15 rev = "0373c216458be1c4b40655b796a3aefedf8b7d23";
16 hash = "sha256-stKb3tPP/pgHTfdyTmWwVj/hLjOHtFpvJxXgBhhWgPQ=";
17 };
18 vendorHash = "sha256-I3rhP87QJJxNM9D7JYo3BjG/1PhsDWbnK/NJTf4aqmI=";
19
20 patches = [
21 (fetchpatch {
22 name = "add-modules.patch";
23 url = "https://github.com/regularpoe/primitive/commit/2fa9b9f575ac2602e771c5263747bdbb48e9810b.patch";
24 hash = "sha256-TX3dGqVuY+qLh9EBg7oNVYWhGuETZHJdjPTroCDyZ74=";
25 })
26 ];
27
28 meta = {
29 description = "Reproducing images with geometric primitives";
30 homepage = "https://github.com/fogleman/primitive";
31 license = lib.licenses.mit;
32 maintainers = with lib.maintainers; [ stunkymonkey ];
33 mainProgram = "primitive";
34 platforms = lib.platforms.all;
35 };
36}