nixpkgs/pkgs/by-name/bb/bb/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

39 lines
1.0 KiB
Nix

{ stdenv, lib, fetchurl, autoreconfHook, aalib, ncurses, xorg, libmikmod }:
stdenv.mkDerivation rec {
pname = "bb";
version = "1.3rc1";
src = fetchurl {
url = "mirror://sourceforge/aa-project/bb/${version}/${pname}-${version}.tar.gz";
sha256 = "1i411glxh7g4pfg4gw826lpwngi89yrbmxac8jmnsfvrfb48hgbr";
};
patches = [
# add / update include files to get function prototypes
./included-files-updates.diff
];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
aalib ncurses libmikmod
xorg.libXau xorg.libXdmcp xorg.libX11
];
# regparm attribute is not supported by clang
postPatch = lib.optionalString stdenv.cc.isClang ''
substituteInPlace config.h \
--replace-fail "__attribute__ ((regparm(n)))" ""
'';
meta = with lib; {
homepage = "http://aa-project.sourceforge.net/bb";
description = "AA-lib demo";
license = licenses.gpl2Plus;
maintainers = [ maintainers.rnhmjoj ];
platforms = platforms.unix;
mainProgram = "bb";
};
}