Files
nixpkgs/pkgs/by-name/fr/freenukum/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

81 lines
1.8 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitLab,
makeDesktopItem,
installShellFiles,
dejavu_fonts,
SDL2,
SDL2_ttf,
SDL2_image,
}:
let
pname = "freenukum";
description = "Clone of the original Duke Nukum 1 Jump'n Run game";
desktopItem = makeDesktopItem {
desktopName = pname;
name = pname;
exec = pname;
icon = pname;
comment = description;
categories = [
"Game"
"ArcadeGame"
"ActionGame"
];
genericName = pname;
};
in
rustPlatform.buildRustPackage rec {
inherit pname;
version = "0.4.0";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "silwol";
repo = "freenukum";
rev = "v${version}";
hash = "sha256-Tk9n2gPwyPin6JZ4RSO8d/+xVpEz4rF8C2eGKwrAXU0=";
};
cargoHash = "sha256-lQZ9Z/1tbL7BeLmGxJXNUvrXsOGtgzGXNt6WYGezxi0=";
nativeBuildInputs = [
installShellFiles
];
buildInputs = [
SDL2
SDL2_ttf
SDL2_image
];
postPatch = ''
substituteInPlace src/graphics.rs \
--replace /usr $out
'';
postInstall = ''
mkdir -p $out/share/fonts/truetype/dejavu
ln -sf \
${dejavu_fonts}/share/fonts/truetype/DejaVuSans.ttf \
$out/share/fonts/truetype/dejavu/DejaVuSans.ttf
mkdir -p $out/share/doc/freenukum
install -Dm644 README.md CHANGELOG.md $out/share/doc/freenukum/
installManPage doc/freenukum.6
install -Dm644 "${desktopItem}/share/applications/"* -t $out/share/applications/
'';
meta = {
description = "Clone of the original Duke Nukum 1 Jump'n Run game";
homepage = "https://salsa.debian.org/silwol/freenukum";
changelog = "https://salsa.debian.org/silwol/freenukum/-/blob/v${version}/CHANGELOG.md";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ _0x4A6F ];
broken = stdenv.hostPlatform.isDarwin;
};
}