nixpkgs/pkgs/by-name/ce/cegui/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

66 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, ogre
, freetype
, boost
, expat
, darwin
, libiconv
, unstableGitUpdater
}:
stdenv.mkDerivation {
pname = "cegui";
version = "0-unstable-2023-03-18";
src = fetchFromGitHub {
owner = "paroj";
repo = "cegui";
rev = "186ce900e293b98f2721c11930248a8de54aa338";
hash = "sha256-RJ4MnxklcuxC+ZYEbfma5RDc2aeJ95LuTwNk+FnEhdo=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
];
buildInputs = [
ogre
freetype
boost
expat
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.Foundation
libiconv
];
cmakeFlags = [
"-DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer-0"
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
];
passthru.updateScript = unstableGitUpdater {
branch = "v0";
# The above branch is separate from the branch with the latest tags, so the updater doesn't pick them up
# This is what would be used to handle upstream's format, if it was able to see the tags
# tagConverter = writeShellScript "cegui-tag-converter.sh" ''
# sed -e 's/^v//g' -e 's/-/./g'
# '';
hardcodeZeroVersion = true;
};
meta = with lib; {
homepage = "http://cegui.org.uk/";
description = "C++ Library for creating GUIs";
mainProgram = "CEGUISampleFramework-0.9999";
license = licenses.mit;
platforms = platforms.unix;
};
}