mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ stdenv, lib, fetchFromGitHub, pkgconfig
|
|
, alsaLib, libpulseaudio, SDL2, SDL2_image, SDL2_mixer }:
|
|
|
|
# - set the opendune configuration at ~/.config/opendune/opendune.ini:
|
|
# [opendune]
|
|
# datadir=/path/to/opendune-data
|
|
# - download dune2 into [datadir] http://www.bestoldgames.net/eng/old-games/dune-2.php
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "opendune";
|
|
version = "0.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OpenDUNE";
|
|
repo = "OpenDUNE";
|
|
rev = version;
|
|
sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
|
|
};
|
|
|
|
configureFlags = [
|
|
"--with-alsa=${lib.getLib alsaLib}/lib/libasound.so"
|
|
"--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
|
|
];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ alsaLib libpulseaudio SDL2 SDL2_image SDL2_mixer ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm555 -t $out/bin bin/opendune
|
|
install -Dm444 -t $out/share/doc/opendune enhancement.txt README.txt
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Dune, Reinvented";
|
|
homepage = "https://github.com/OpenDUNE/OpenDUNE";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ nand0p ];
|
|
};
|
|
}
|