
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.
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib, stdenv, ruby, rake, fetchFromGitHub, testers }:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "mruby";
|
|
version = "3.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mruby";
|
|
repo = "mruby";
|
|
rev = finalAttrs.version;
|
|
sha256 = "sha256-rCoEC1ioX6bOocPoPi+Lsn4PM8gY0DjKja1/MJvJ1n8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ rake ];
|
|
|
|
nativeCheckInputs = [ ruby ];
|
|
|
|
# Necessary so it uses `gcc` instead of `ld` for linking.
|
|
# https://github.com/mruby/mruby/blob/e502fd88b988b0a8d9f31b928eb322eae269c45a/tasks/toolchains/gcc.rake#L30
|
|
preBuild = "unset LD";
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
cp -R include build/host/{bin,lib} $out
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Embeddable implementation of the Ruby language";
|
|
homepage = "https://mruby.org";
|
|
maintainers = with maintainers; [ nicknovitski ];
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
mainProgram = "mruby";
|
|
};
|
|
})
|