nixpkgs/pkgs/by-name/un/unittest-cpp/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.0 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
}:
stdenv.mkDerivation rec {
pname = "unittest-cpp";
version = "2.0.0";
src = fetchFromGitHub {
owner = "unittest-cpp";
repo = "unittest-cpp";
rev = "v${version}";
sha256 = "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i";
};
patches = [
# GCC12 Patch
(fetchpatch {
url = "https://github.com/unittest-cpp/unittest-cpp/pull/185/commits/f361c2a1034c02ba8059648f9a04662d6e2b5553.patch";
hash = "sha256-xyhV2VBelw/uktUXSZ3JBxgG+8/Mout/JiXEZVV2+2Y=";
})
];
# Fix 'Version:' setting in .pc file. TODO: remove once upstreamed:
# https://github.com/unittest-cpp/unittest-cpp/pull/188
cmakeFlags = [ "-DPACKAGE_VERSION=${version}" ];
nativeBuildInputs = [ cmake ];
doCheck = false;
meta = {
homepage = "https://github.com/unittest-cpp/unittest-cpp";
description = "Lightweight unit testing framework for C++";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.unix;
};
}