nixpkgs/pkgs/applications/misc/mepo/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.0 KiB
Nix
Raw Normal View History

2022-01-13 09:00:46 +00:00
{ lib
, stdenv
, fetchFromSourcehut
, pkg-config
, zig
, curl
, SDL2
2022-01-31 07:43:17 +00:00
, SDL2_gfx
2022-01-13 09:00:46 +00:00
, SDL2_image
, SDL2_ttf
}:
stdenv.mkDerivation rec {
pname = "mepo";
2022-01-31 07:43:17 +00:00
version = "0.3";
2022-01-13 09:00:46 +00:00
src = fetchFromSourcehut {
owner = "~mil";
repo = pname;
rev = version;
2022-01-31 07:43:17 +00:00
hash = "sha256-B7BOAFhiOTILUdzh49hTMrNNHZpCNRDLW2uekXyptqQ=";
2022-01-13 09:00:46 +00:00
};
nativeBuildInputs = [ pkg-config zig ];
2022-01-31 07:43:17 +00:00
buildInputs = [ curl SDL2 SDL2_gfx SDL2_image SDL2_ttf ];
2022-01-13 09:00:46 +00:00
2022-01-31 07:43:17 +00:00
preBuild = ''
2022-01-13 09:00:46 +00:00
export HOME=$TMPDIR
'';
doCheck = true;
checkPhase = ''
runHook preCheck
zig build test
runHook postCheck
'';
installPhase = ''
runHook preInstall
2022-01-31 07:43:17 +00:00
zig build -Drelease-safe=true -Dcpu=baseline --prefix $out install
2022-01-13 09:00:46 +00:00
runHook postInstall
'';
meta = with lib; {
description = "Fast, simple, and hackable OSM map viewer";
homepage = "https://sr.ht/~mil/mepo/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
broken = stdenv.isDarwin; # See https://github.com/NixOS/nixpkgs/issues/86299
};
}