mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +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.
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, unzip, puredata }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "helmholtz";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.katjaas.nl/helmholtz/helmholtz~.zip";
|
|
name = "helmholtz.zip";
|
|
curlOpts = "--user-agent ''";
|
|
sha256 = "0h1fj7lmvq9j6rmw33rb8k0byxb898bi2xhcwkqalb84avhywgvs";
|
|
};
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
buildInputs = [ puredata ];
|
|
|
|
unpackPhase = ''
|
|
unzip $src
|
|
mv helmholtz~/src/helmholtz\~.cpp .
|
|
mv helmholtz~/src/Helmholtz.cpp .
|
|
mv helmholtz~/src/include/ .
|
|
mv helmholtz~/src/Makefile .
|
|
rm -rf helmholtz~/src/
|
|
rm helmholtz~/helmholtz~.pd_darwin
|
|
rm helmholtz~/helmholtz~.pd_linux
|
|
rm helmholtz~/helmholtz~.dll
|
|
rm -rf __MACOSX
|
|
'';
|
|
|
|
patchPhase = ''
|
|
mkdir -p $out/helmholtz~
|
|
sed -i "s@current: pd_darwin@current: pd_linux@g" Makefile
|
|
sed -i "s@-Wl@@g" Makefile
|
|
sed -i "s@\$(NAME).pd_linux \.\./\$(NAME).pd_linux@helmholtz~.pd_linux $out/helmholtz~/@g" Makefile
|
|
'';
|
|
|
|
installPhase = ''
|
|
cp -r helmholtz~/ $out/
|
|
'';
|
|
|
|
meta = {
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
|
description = "Time domain pitch tracker for Pure Data";
|
|
homepage = "http://www.katjaas.nl/helmholtz/helmholtz.html";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ lib.maintainers.magnetophon ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|