mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-20 11:11:43 -04: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" ```
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ fetchFromGitHub
|
|
, lib
|
|
, mkDerivation
|
|
, qmake
|
|
, qtbase
|
|
, qtmultimedia
|
|
, stdenv
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "mlv-app";
|
|
version = "1.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ilia3101";
|
|
repo = "MLV-App";
|
|
rev = "QTv${version}";
|
|
sha256 = "sha256-RfZXHmWSjZBxNFwQ/bzHppsLS0LauURIdnkAzxAIBcU=";
|
|
};
|
|
|
|
patches = if stdenv.hostPlatform.isAarch64 then ./aarch64-flags.patch else null;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm555 -t $out/bin mlvapp
|
|
install -Dm444 -t $out/share/applications mlvapp.desktop
|
|
install -Dm444 -t $out/share/icons/hicolor/512x512/apps RetinaIMG/MLVAPP.png
|
|
runHook postInstall
|
|
'';
|
|
|
|
qmakeFlags = [ "MLVApp.pro" ];
|
|
|
|
preConfigure = ''
|
|
export HOME=$TMPDIR
|
|
cd platform/qt/
|
|
'';
|
|
|
|
buildInputs = [
|
|
qtmultimedia
|
|
qtbase
|
|
];
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
preFixup = ''
|
|
wrapQtApp "$out/bin/mlvapp"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
qmake
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "All in one MLV processing app that is pretty great";
|
|
homepage = "https://mlv.app";
|
|
license = licenses.gpl3;
|
|
maintainers = [ ];
|
|
platforms = platforms.linux;
|
|
mainProgram = "mlvapp";
|
|
};
|
|
}
|