mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
flips: Darwin support
This commit is contained in:
parent
10809c9d67
commit
e99e423033
1 changed files with 22 additions and 9 deletions
|
@ -2,9 +2,12 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
gtk3,
|
||||
libdivsufsort,
|
||||
pkg-config,
|
||||
|
||||
withGTK3 ? !stdenv.hostPlatform.isDarwin,
|
||||
gtk3,
|
||||
llvmPackages,
|
||||
wrapGAppsHook3,
|
||||
}:
|
||||
|
||||
|
@ -21,24 +24,34 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook3
|
||||
];
|
||||
] ++ lib.optional withGTK3 wrapGAppsHook3;
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
libdivsufsort
|
||||
];
|
||||
buildInputs =
|
||||
[
|
||||
libdivsufsort
|
||||
]
|
||||
++ lib.optional withGTK3 gtk3
|
||||
++ lib.optional (withGTK3 && stdenv.hostPlatform.isDarwin) llvmPackages.openmp;
|
||||
|
||||
patches = [ ./use-system-libdivsufsort.patch ];
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
"TARGET=${if withGTK3 then "gtk" else "cli"}"
|
||||
];
|
||||
|
||||
installPhase = lib.optionalString (!withGTK3) ''
|
||||
runHook preInstall
|
||||
install -Dm755 flips -t $out/bin
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Patcher for IPS and BPS files";
|
||||
homepage = "https://github.com/Alcaro/Flips";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ aleksana ];
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "flips";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue