nixpkgs/pkgs/by-name/op/opendune/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

48 lines
1.2 KiB
Nix

{ stdenv, lib, fetchFromGitHub, pkg-config
, alsa-lib, 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 alsa-lib}/lib/libasound.so"
"--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib 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";
mainProgram = "opendune";
homepage = "https://github.com/OpenDUNE/OpenDUNE";
license = licenses.gpl2Only;
maintainers = [ ];
};
}