mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, sparrow3d
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "hase";
|
|
version = "unstable-2020-10-06";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "theZiz";
|
|
repo = "hase";
|
|
rev = "31d6840cdf0c72fc459f10402dae7726096b2974";
|
|
hash = "sha256-d9So3E8nCQJ1/BdlwMkGbaFPT9mkX1VzlDGKp71ptEE=";
|
|
};
|
|
|
|
patches = [ ./prefer-dynamic.patch ];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
sparrow3d
|
|
zlib
|
|
];
|
|
|
|
buildPhase = ''
|
|
NIX_CFLAGS_COMPILE=$(pkg-config --cflags sparrow3d zlib)
|
|
|
|
# build and install are one step, and inseparable without patching
|
|
mkdir -p $out/{bin,share/applications,share/pixmaps}
|
|
./install.sh $out
|
|
'';
|
|
|
|
postFixup = ''
|
|
substituteInPlace "$out/share/applications/hase.desktop" \
|
|
--replace "Exec=hase" "Exec=$out/bin/hase"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Open-source artillery shooter";
|
|
mainProgram = "hase";
|
|
longDescription = ''
|
|
Hase is an open source gravity based artillery shooter. It is similar to
|
|
Worms, Hedgewars or artillery, but the gravity force and direction
|
|
depends on the mass nearby. It is optimized for mobile game consoles like
|
|
the GP2X, Open Pandora or GCW Zero.
|
|
'';
|
|
homepage = "http://ziz.gp2x.de/hase/";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ colinsane ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|