default.nix (979B)
1 { lib, stdenv, fetchFromSourcehut, pkg-config, zig 2 , curl, SDL2, SDL2_image, SDL2_ttf 3 }: 4 5 stdenv.mkDerivation rec { 6 pname = "mepo"; 7 version = "0.2"; 8 9 src = fetchFromSourcehut { 10 owner = "~mil"; 11 repo = pname; 12 rev = version; 13 hash = "sha256-ECq748GpjOjvchzAWlGA7H7HBvKNxY9d43+PTOWopiM="; 14 }; 15 16 nativeBuildInputs = [ pkg-config zig ]; 17 18 buildInputs = [ curl SDL2 SDL2_image SDL2_ttf ]; 19 20 buildPhase = '' 21 export HOME=$TMPDIR 22 zig build -Drelease-safe=true 23 ''; 24 25 doCheck = true; 26 checkPhase = '' 27 zig build test 28 ''; 29 30 installPhase = '' 31 install -Dm755 zig-out/bin/mepo -t $out/bin 32 install -Dm755 scripts/mepo_* $out/bin 33 ''; 34 35 meta = with lib; { 36 description = "Fast, simple, and hackable OSM map viewer"; 37 inherit (src.meta) homepage; 38 license = licenses.gpl3Plus; 39 maintainers = [ maintainers.sikmir ]; 40 platforms = platforms.unix; 41 broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/issues/86299 42 }; 43 }