mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
571c71e6f7
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.
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, libGL
|
|
, libGLU
|
|
, libpng
|
|
, libjpeg_turbo
|
|
, libuv
|
|
, libvorbis
|
|
, mbedtls_2
|
|
, openal
|
|
, pcre
|
|
, SDL2
|
|
, sqlite
|
|
, getconf
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "hashlink";
|
|
version = "1.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "HaxeFoundation";
|
|
repo = "hashlink";
|
|
rev = version;
|
|
sha256 = "lpHW0JWxbLtOBns3By56ZBn47CZsDzwOFBuW9MlERrE=";
|
|
};
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
buildInputs = [
|
|
libGL
|
|
libGLU
|
|
libjpeg_turbo
|
|
libpng
|
|
libuv
|
|
libvorbis
|
|
mbedtls_2
|
|
openal
|
|
pcre
|
|
SDL2
|
|
sqlite
|
|
];
|
|
|
|
nativeBuildInputs = [ getconf ];
|
|
|
|
# append default installPhase with library install for haxe
|
|
postInstall = let
|
|
haxelibPath = "$out/lib/haxe/hashlink/${lib.replaceStrings [ "." ] [ "," ] version}";
|
|
in ''
|
|
mkdir -p "${haxelibPath}"
|
|
echo -n "${version}" > "${haxelibPath}/../.current"
|
|
cp -r other/haxelib/* "${haxelibPath}"
|
|
'';
|
|
|
|
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Virtual machine for Haxe";
|
|
mainProgram = "hl";
|
|
homepage = "https://hashlink.haxe.org/";
|
|
license = licenses.mit;
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
|
maintainers = with maintainers; [ iblech locallycompact logo ];
|
|
};
|
|
}
|