about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/lz/lzsa/package.nix
blob: a8b1b5e05f66893bcf3b10c0dac8c31c449362c6 (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
{ lib
, stdenv
, fetchFromGitHub
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "lzsa";
  version = "1.4.1";

  src = fetchFromGitHub {
    owner = "emmanuel-marty";
    repo = "lzsa";
    rev = finalAttrs.version;
    hash = "sha256-XaPtMW9INv/wzMXvlyXgE3VfFJCY/5R/HFGhV3ZKvGs=";
  };

  makeFlags = [
    "CC=${stdenv.cc.targetPrefix}cc"
  ];

  installPhase = ''
    runHook preInstall
    install -Dm755 lzsa -t $out/bin/
    runHook postInstall
  '';

  meta = {
    homepage = "https://github.com/emmanuel-marty/lzsa";
    description = "Byte-aligned, efficient lossless packer that is optimized for fast decompression on 8-bit micros";
    mainProgram = "lzsa";
    license = with lib.licenses; [ cc0 ];
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.unix;
  };
})