summaryrefslogtreecommitdiffstats
path: root/packages/aurora4x/default.nix
blob: adc1a53e1983d26f50cfaccb991ec9601bccb0ba (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
{
  lib,
  stdenv,
  fetchurl,
  makeDesktopItem,
  copyDesktopItems,
  mono,
  unrar
}:

stdenv.mkDerivation rec {
  name = "aurora4x-251";
  version = "251";

  srcs = [
    (fetchurl {
        url = "https://www.pentarch.org/steve/Aurora1130Full.rar";
        hash = "sha256-QaTka9fNXjK/PgiF0S5EX+1dtUGWitcqPQYr54qDYAQ=";
    })
    (fetchurl {
        url = "https://www.pentarch.org/steve/Aurora260.rar";
        hash = "sha256-AG10u3oVX1rN7FQERVg36l7JBocvpF19/7tvavxH5QQ=";
    })
  ];

  nativeBuildInputs = [
    copyDesktopItems
  ];

  buildInputs = [
    unrar
  ];

  runtimeLibs = lib.makeLibraryPath (
    [
      mono
    ]
  );

  desktopItems = [
    (makeDesktopItem {
      name = "aurora4x";
      desktopName = "Aurora 4X";
      exec = "aurora4x";
    })
  ];

  unpackCmd = "unrar x -o+ $curSrc";

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/aurora4x $out/bin

    runHook postInstall
  '';
}