15 stdenv.mkDerivation rec {
19 src = fetchFromGitLab {
20 domain = "gitlab.alpinelinux.org";
24 sha256 = "sha256-p4TohsZZTi4HxtJsyuoE5HDfkGa0pv53saGj3X9bmrI=";
31 # for $out/bin/apkbuild-cpan and $out/bin/apkbuild-pypi
32 (perl.withPackages (ps: with ps; [
49 substituteInPlace ./Makefile \
50 --replace 'chmod 4555' '#chmod 4555'
54 "prefix=${placeholder "out"}"
59 "sysconfdir=${placeholder "out"}/etc"
63 # this script requires unpackaged 'augeas' rubygem, no reason
64 # to ship it if we can't provide the dependencies for it
65 rm -f ${placeholder "out"}/bin/apkbuild-gem-resolver
67 # Find all executables that are not compiled binaries and wrap
68 # them, make `apk-tools` available in their PATH and also the
69 # $out directory since many of the binaries provided call into
72 $(find ${placeholder "out"}/bin -type f -exec ${file}/bin/file -i '{}' + \
73 | grep -v x-executable | cut -d : -f1); do
75 --prefix PATH : "${lib.makeBinPath [ apk-tools ]}" \
76 --prefix PATH : "${placeholder "out"}/bin"
81 description = "Alpine Linux build tools";
82 homepage = "https://gitlab.alpinelinux.org/alpine/abuild";
83 license = licenses.gpl2Plus;
84 maintainers = with maintainers; [ onny ];
85 platforms = platforms.unix;