nixpkgs/pkgs/development/interpreters/rakudo/zef.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-12-11 21:40:52 +00:00
{ lib
, stdenv
, fetchFromGitHub
, rakudo
, makeBinaryWrapper
}:
2023-12-11 21:40:52 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "zef";
2023-12-25 07:03:54 +00:00
version = "0.21.2";
src = fetchFromGitHub {
owner = "ugexe";
repo = "zef";
2023-12-11 21:40:52 +00:00
rev = "v${finalAttrs.version}";
2023-12-25 07:03:54 +00:00
hash = "sha256-7mqKcioMal4OR/xlzQ/EgGICau7Ijc13j4pSfu4/74E=";
};
2023-12-11 21:40:52 +00:00
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
rakudo
];
installPhase = ''
2023-12-11 21:40:52 +00:00
runHook preInstall
mkdir -p "$out"
# TODO: Find better solution. zef stores cache stuff in $HOME with the
# default config.
env HOME=$TMPDIR ${rakudo}/bin/raku -I. ./bin/zef --/depends --/test-depends --/build-depends --install-to=$out install .
2023-12-11 21:40:52 +00:00
runHook postInstall
'';
postFixup =''
wrapProgram $out/bin/zef --prefix RAKUDOLIB , "inst#$out"
'';
2023-12-11 21:40:52 +00:00
meta = {
description = "Raku / Perl6 Module Management";
homepage = "https://github.com/ugexe/zef";
2023-12-11 21:40:52 +00:00
license = lib.licenses.artistic2;
mainProgram = "zef";
maintainers = with lib.maintainers; [ sgo ];
platforms = lib.platforms.unix;
};
2023-12-11 21:40:52 +00:00
})