mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 00:53:57 +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.
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{ lib, stdenv
|
|
, autoreconfHook
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, lua
|
|
, fpc
|
|
, pcre
|
|
, portaudio
|
|
, freetype
|
|
, libpng
|
|
, SDL2
|
|
, SDL2_image
|
|
, SDL2_gfx
|
|
, SDL2_mixer
|
|
, SDL2_net, SDL2_ttf
|
|
, ffmpeg
|
|
, sqlite
|
|
, zlib
|
|
, libX11
|
|
, libGLU
|
|
, libGL
|
|
}:
|
|
|
|
let
|
|
sharedLibs = [
|
|
pcre portaudio freetype
|
|
SDL2 SDL2_image SDL2_gfx SDL2_mixer SDL2_net SDL2_ttf
|
|
sqlite lua zlib libX11 libGLU libGL ffmpeg
|
|
];
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "ultrastardx";
|
|
version = "2024.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "UltraStar-Deluxe";
|
|
repo = "USDX";
|
|
rev = "v${version}";
|
|
hash = "sha256-X5LixPRAI7A8Ns3D2A24T05w0iHag1EJVqt0aW1ZBps=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
|
buildInputs = [ fpc libpng ] ++ sharedLibs;
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/config.inc.in \
|
|
--subst-var-by libpcre_LIBNAME libpcre.so.1
|
|
'';
|
|
|
|
preBuild =
|
|
let items = lib.concatMapStringsSep " " (x: "-rpath ${lib.getLib x}/lib") sharedLibs;
|
|
in ''
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS ${items}"
|
|
'';
|
|
|
|
# dlopened libgcc requires the rpath not to be shrinked
|
|
dontPatchELF = true;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://usdx.eu/";
|
|
description = "Free and open source karaoke game";
|
|
mainProgram = "ultrastardx";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ Profpatsch ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|