mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
32 lines
1.1 KiB
Nix
32 lines
1.1 KiB
Nix
{ lib, stdenv, buildDunePackage, fetchFromGitHub, dune-configurator, AppKit, Foundation, pkg-config, glib, gst_all_1 }:
|
|
|
|
buildDunePackage rec {
|
|
pname = "gstreamer";
|
|
version = "0.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "savonet";
|
|
repo = "ocaml-gstreamer";
|
|
rev = "v${version}";
|
|
sha256 = "0y8xi1q0ld4hrk96bn6jfh9slyjrxmnlhm662ynacp3yzalp8jji";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Foundation ];
|
|
propagatedBuildInputs = [ glib.dev gst_all_1.gstreamer.dev gst_all_1.gst-plugins-base ];
|
|
|
|
CFLAGS_COMPILE = [
|
|
"-I${glib.dev}/include/glib-2.0"
|
|
"-I${glib.out}/lib/glib-2.0/include"
|
|
"-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"
|
|
"-I${gst_all_1.gstreamer.dev}/include/gstreamer-1.0"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/savonet/ocaml-gstreamer";
|
|
description = "Bindings for the GStreamer library which provides functions for playning and manipulating multimedia streams";
|
|
license = licenses.lgpl21Only;
|
|
maintainers = with maintainers; [ dandellion ];
|
|
};
|
|
}
|