about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/miniz/default.nix
blob: 8592dc5f122484aaf7ad4460c30527038136ab34 (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
{ lib, stdenv, fetchFromGitHub, cmake }:

stdenv.mkDerivation rec {
  pname = "miniz";
  version = "2.2.0";

  src = fetchFromGitHub {
    owner = "richgel999";
    repo = pname;
    rev = version;
    sha256 = "sha256-7hc/yNJh4sD5zGQLeHjowbUtV/1mUDQre1tp9yKMSSY=";
  };

  nativeBuildInputs = [ cmake ];

  postFixup = ''
    substituteInPlace "$out"/share/pkgconfig/miniz.pc \
      --replace '=''${prefix}//' '=/' \
      --replace '=''${exec_prefix}//' '=/'
  '';

  meta = with lib; {
    description = "Single C source file zlib-replacement library";
    homepage = "https://github.com/richgel999/miniz";
    license = licenses.mit;
    maintainers = with maintainers; [ astro ];
    platforms = platforms.unix;
  };
}