overlays(firebird-emu): add overlay for darwin support
This commit is contained in:
parent
9fb0f80686
commit
b2ef51a5a1
1
overlays/default/firebird-emu.nix
Normal file
1
overlays/default/firebird-emu.nix
Normal file
@ -0,0 +1 @@
|
||||
import ./firebird-emu/default.nix
|
3
overlays/default/firebird-emu/default.nix
Normal file
3
overlays/default/firebird-emu/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
self: super: {
|
||||
firebird-emu = self.libsForQt5.callPackage ./package.nix {};
|
||||
}
|
44
overlays/default/firebird-emu/package.nix
Normal file
44
overlays/default/firebird-emu/package.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
qmake,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtquickcontrols,
|
||||
wrapQtAppsHook,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "firebird-emu";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nspire-emus";
|
||||
repo = "firebird";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-ZptjlnOiF+hKuKYvBFJL95H5YQuR99d4biOco/MVEmE=";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
|
||||
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
|
||||
];
|
||||
|
||||
nativeBuildInputs = [qmake wrapQtAppsHook];
|
||||
|
||||
buildInputs = [qtbase qtdeclarative qtquickcontrols];
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir $out/Applications
|
||||
mv $out/bin/${pname}.app $out/Applications/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/nspire-emus/firebird";
|
||||
description = "Third-party multi-platform emulator of the ARM-based TI-Nspire™ calculators";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [pneumaticat];
|
||||
# Only tested on Linux, but likely possible to build on, e.g. macOS
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user