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

stdenv.mkDerivation rec {
  pname = "crossguid";
  version = "unstable-2019-05-29";

  src = fetchFromGitHub {
    owner = "graeme-hill";
    repo = pname;
    rev = "ca1bf4b810e2d188d04cb6286f957008ee1b7681";
    hash = "sha256-37tKPDo4lukl/aaDWWSQYfsBNEnDjE7t6OnEZjBhcvQ=";
  };

  patches = [
    # Fix the build against gcc-13:
    #   https://github.com/graeme-hill/crossguid/pull/67
    (fetchpatch {
      name = "gcc-13.patch";
      url = "https://github.com/graeme-hill/crossguid/commit/1eb9bea38c320b2b588635cffceaaa2a8d434780.patch";
      hash = "sha256-0qKZUeuNfc3gt+aFeaTt+IexO391GCdjS+9PVJmBKV4=";
    })
  ];

  nativeBuildInputs = [ cmake ];
  buildInputs = lib.optional stdenv.isLinux libuuid;

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Lightweight cross platform C++ GUID/UUID library";
    license = licenses.mit;
    homepage = "https://github.com/graeme-hill/crossguid";
    maintainers = with maintainers; [ lilyinstarlight ];
    platforms = platforms.unix;
  };
}