summary refs log tree commit diff
path: root/pkgs/by-name/di/disarchive/package.nix
blob: 9bc24e531552de81fba0a6432e6c63eeb2cd6e28 (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
{ stdenv
, lib
, fetchurl
, guile
, autoreconfHook
, guile-gcrypt
, guile-lzma
, guile-quickcheck
, makeWrapper
, pkg-config
, zlib
}:

stdenv.mkDerivation rec {
  pname = "disarchive";
  version = "0.5.0";

  src = fetchurl {
    url = "https://files.ngyro.com/disarchive/disarchive-${version}.tar.gz";
    hash = "sha256-Agt7v5HTpaskXuYmMdGDRIolaqCHUpwd/CfbZCe9Ups=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    autoreconfHook
    guile
    guile-gcrypt
    guile-lzma
    makeWrapper
    pkg-config
  ];

  buildInputs = [
    guile
    zlib
  ];

  propagatedBuildInputs = [
    guile-gcrypt
    guile-lzma
  ];

  doCheck = !stdenv.isDarwin;

  nativeCheckInputs = [
    guile-quickcheck
  ];

  postInstall = ''
    wrapProgram $out/bin/disarchive \
      --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
      --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
  '';

  meta = with lib; {
    description = "Disassemble software into data and metadata";
    homepage = "https://ngyro.com/software/disarchive.html";
    license = licenses.gpl3Plus;
    mainProgram = "disarchive";
    maintainers = with maintainers; [ foo-dogsquared ];
    platforms = guile.meta.platforms;
  };
}