mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 06:23:36 +00:00
571c71e6f7
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.
33 lines
1.0 KiB
Nix
33 lines
1.0 KiB
Nix
{ lib, stdenv, fetchurl, file }:
|
||
|
||
stdenv.mkDerivation rec {
|
||
pname = "libmodplug";
|
||
version = "0.8.9.0";
|
||
|
||
src = fetchurl {
|
||
url = "mirror://sourceforge/project/modplug-xmms/libmodplug/${version}/${pname}-${version}.tar.gz";
|
||
sha256 = "1pnri98a603xk47smnxr551svbmgbzcw018mq1k6srbrq6kaaz25";
|
||
};
|
||
|
||
# Unfortunately, upstream appears inactive and the patches from the fork don’t apply cleanly.
|
||
# Modify `src/fastmix.cpp` to remove usage of the register storage class, which is
|
||
# not allowed in C++17 and is an error in clang 16.
|
||
prePatch = "substituteInPlace src/fastmix.cpp --replace 'register ' ''";
|
||
|
||
outputs = [ "out" "dev" ];
|
||
|
||
preConfigure = ''
|
||
substituteInPlace configure \
|
||
--replace ' -mmacosx-version-min=10.5' "" \
|
||
--replace /usr/bin/file ${file}/bin/file
|
||
'';
|
||
|
||
meta = with lib; {
|
||
description = "MOD playing library";
|
||
homepage = "https://modplug-xmms.sourceforge.net/";
|
||
license = licenses.publicDomain;
|
||
platforms = platforms.unix;
|
||
maintainers = with maintainers; [ raskin ];
|
||
};
|
||
}
|