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.
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, autoconf
|
|
, automake
|
|
, darwin
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, pkg-config
|
|
, SDL2
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "smpeg2";
|
|
version = "unstable-2022-05-26";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "icculus";
|
|
repo = "smpeg";
|
|
rev = "c5793e5f3f2765fc09c24380d7e92136a0e33d3b";
|
|
sha256 = "sha256-Z0u83K1GIXd0jUYo5ZyWUH2Zt7Hn8z+yr06DAtAEukw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ];
|
|
|
|
buildInputs = [ SDL2 ]
|
|
++ lib.optional stdenv.hostPlatform.isDarwin darwin.libobjc;
|
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
preConfigure = ''
|
|
sh autogen.sh
|
|
'';
|
|
|
|
postInstall = ''
|
|
moveToOutput bin/smpeg2-config "$dev"
|
|
wrapProgram $dev/bin/smpeg2-config \
|
|
--prefix PATH ":" "${pkg-config}/bin" \
|
|
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
homepage = "http://icculus.org/smpeg/";
|
|
description = "SDL2 MPEG Player Library";
|
|
license = licenses.lgpl2;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ orivej ];
|
|
};
|
|
}
|