17 stdenv.mkDerivation rec {
21 src = fetchFromGitLab {
22 domain = "gitlab.alpinelinux.org";
26 sha256 = "sha256-xVxgcBchGfeVo1cgP9iVsWjZ6SHVN6R8zWaE1k3DcXQ=";
33 # for $out/bin/apkbuild-cpan and $out/bin/apkbuild-pypi
34 (perl.withPackages (ps: with ps; [
52 substituteInPlace ./Makefile \
53 --replace 'chmod 4555' '#chmod 4555'
57 "prefix=${placeholder "out"}"
62 "sysconfdir=${placeholder "out"}/etc"
66 # this script requires unpackaged 'augeas' rubygem, no reason
67 # to ship it if we can't provide the dependencies for it
68 rm -f ${placeholder "out"}/bin/apkbuild-gem-resolver
70 # Find all executables that are not compiled binaries and wrap
71 # them, make `apk-tools` available in their PATH and also the
72 # $out directory since many of the binaries provided call into
75 $(find ${placeholder "out"}/bin -type f -exec ${file}/bin/file -i '{}' + \
76 | grep -v x-executable | cut -d : -f1); do
78 --prefix PATH : "${lib.makeBinPath [ apk-tools ]}" \
79 --prefix PATH : "${placeholder "out"}/bin"
83 passthru.updateScript = gitUpdater { };
86 description = "Alpine Linux build tools";
87 homepage = "https://gitlab.alpinelinux.org/alpine/abuild";
88 license = licenses.gpl2Plus;
89 maintainers = with maintainers; [ onny ];
90 platforms = platforms.unix;