about summary refs log tree commit diff
path: root/pkgs/by-name/pa/pablodraw/package.nix
blob: 012961c99b19a2a9a19194a7900ac4e5d96283a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, wrapGAppsHook3
, copyDesktopItems
, gtk3
, libnotify
, makeDesktopItem
, stdenv
}:

buildDotnetModule rec {
  pname = "pablodraw";
  version = "3.3.13-beta";

  src = fetchFromGitHub {
    owner = "cwensley";
    repo = "pablodraw";
    rev = version;
    hash = "sha256-PsCFiNcWYh6Bsf5Ihi3IoYyv66xUT1cRBKkx+K5gB/M=";
  };

  postPatch = ''
    substituteInPlace ${projectFile} \
      --replace-warn '<EnableCompressionInSingleFile>True</EnableCompressionInSingleFile>' ""
  '';

  projectFile = "Source/PabloDraw/PabloDraw.csproj";

  executables = [ "PabloDraw" ];

  dotnet-sdk = dotnetCorePackages.sdk_7_0;
  dotnet-runtime = dotnetCorePackages.runtime_7_0;

  nugetDeps = ./deps.nix;

  nativeBuildInputs = [ wrapGAppsHook3 copyDesktopItems ];

  runtimeDeps = [ gtk3 libnotify ];

  desktopItems = [
    (makeDesktopItem {
      name = "PabloDraw";
      exec = "PabloDraw";
      comment = "An Ansi/Ascii text and RIPscrip vector graphic art editor/viewer";
      type = "Application";
      icon = "pablodraw";
      desktopName = "PabloDraw";
      terminal = false;
      categories = [ "Graphics" ];
    })
  ];

  postInstall = ''
    install -Dm644 Assets/PabloDraw-512.png $out/share/icons/hicolor/512x512/apps/pablodraw.png
    install -Dm644 Assets/PabloDraw-64.png $out/share/icons/hicolor/64x64/apps/pablodraw.png
  '';

  meta = with lib; {
    description = "Ansi/Ascii text and RIPscrip vector graphic art editor/viewer with multi-user capabilities";
    homepage = "https://picoe.ca/products/pablodraw";
    license = licenses.mit;
    mainProgram = "PabloDraw";
    maintainers = with maintainers; [ aleksana kip93 ];
    platforms = platforms.all;
    broken = stdenv.hostPlatform.isDarwin; # Eto.Platform.Mac64 not found in nugetSource
  };
}