nixpkgs/pkgs/games/dwarf-fortress/soundsense.nix
Morgan Jones ab31da0235
dwarf-fortress-packages.soundSense: fix initialization and drop JDK 8
We don't need the JDK 8 override anymore; soundsense works fine without
it if we use an --add-opens.
2025-04-20 13:26:20 -07:00

50 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchzip,
dos2unix,
soundPack ? stdenv.mkDerivation {
name = "soundsense-soundpack";
src = fetchzip {
url = "https://df.zweistein.cz/soundsense/soundpack.zip";
hash = "sha256-yjlhBLYYv/FXsk5IpiZNDG2ugDldaD5mf+Dyc6es4GM=";
};
installPhase = ''
cp -r . $out
'';
},
}:
stdenv.mkDerivation rec {
version = "2016-1_196";
dfVersion = "0.44.12";
inherit soundPack;
pname = "soundsense";
src = fetchzip {
url = "https://df.zweistein.cz/soundsense/soundSense_${version}.zip";
hash = "sha256-c+LOUxmJaZ3VqVOBYSQypiZxWyNAXOlRQVD3QZPReb4=";
};
nativeBuildInputs = [ dos2unix ];
buildPhase = ''
dos2unix soundSense.sh
chmod +x soundSense.sh
'';
installPhase = ''
mkdir $out
cp -R . $out/soundsense
ln -s $out/soundsense/dfhack $out/hack
ln -s $soundPack $out/soundsense/packs
'';
passthru = { inherit version dfVersion; };
meta = {
description = "Plays sound based on Dwarf Fortress game logs";
maintainers = with lib.maintainers; [
numinit
];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
homepage = "https://df.zweistein.cz/soundsense";
};
}