mill: 0.12.14 -> 1.0.4 (#425108)

Changed files
+50 -20
pkgs
by-name
+32 -20
pkgs/by-name/mi/mill/package.nix
···
{
-
lib,
-
stdenv,
fetchurl,
jre,
makeWrapper,
}:
-
stdenv.mkDerivation (finalAttrs: {
pname = "mill";
-
version = "0.12.14";
-
src = fetchurl {
-
url = "https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${finalAttrs.version}/mill-dist-${finalAttrs.version}.exe";
-
hash = "sha256-2MyufFcgKH/bxVB83qXNESByAdgbzhyIHqAr36Bb9o0=";
-
};
-
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
dontConfigure = true;
···
installPhase = ''
runHook preInstall
-
install -Dm555 "$src" "$out/bin/.mill-wrapped"
# can't use wrapProgram because it sets --argv0
-
makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \
--prefix PATH : "${jre}/bin" \
-
--set JAVA_HOME "${jre}"
-
runHook postInstall
-
'';
-
doInstallCheck = true;
-
# The default release is a script which will do an impure download
-
# just ensure that the application can run without network
-
installCheckPhase = ''
-
$out/bin/mill --help > /dev/null
'';
meta = with lib; {
···
scalavision
zenithal
];
-
platforms = lib.platforms.all;
};
})
···
{
+
autoPatchelfHook,
fetchurl,
jre,
+
lib,
makeWrapper,
+
sourcesJSON ? ./sources.json,
+
stdenvNoCC,
+
zlib,
}:
+
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "mill";
+
version = "1.0.4";
+
src =
+
let
+
source = (lib.importJSON sourcesJSON)."${stdenvNoCC.hostPlatform.system}";
+
in
+
fetchurl {
+
url = "https://repo1.maven.org/maven2/com/lihaoyi/mill-dist-${source.artifact-suffix}/${finalAttrs.version}/mill-dist-${source.artifact-suffix}-${finalAttrs.version}.exe";
+
inherit (source) hash;
+
};
+
buildInputs = [ zlib ];
+
nativeBuildInputs = [
+
makeWrapper
+
]
+
++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook;
dontUnpack = true;
dontConfigure = true;
···
installPhase = ''
runHook preInstall
+
+
install -Dm 555 $src $out/bin/.mill-wrapped
# can't use wrapProgram because it sets --argv0
+
makeWrapper $out/bin/.mill-wrapped $out/bin/mill \
--prefix PATH : "${jre}/bin" \
+
--set-default JAVA_HOME "${jre}"
+
runHook postInstall
'';
meta = with lib; {
···
scalavision
zenithal
];
+
platforms = [
+
"x86_64-linux"
+
"aarch64-linux"
+
"aarch64-darwin"
+
"x86_64-darwin"
+
];
+
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
})
+18
pkgs/by-name/mi/mill/sources.json
···
···
+
{
+
"aarch64-darwin": {
+
"artifact-suffix": "native-mac-aarch64",
+
"hash": "sha256-A9dShPyfkfTuRJ1/DkLwb/5NTRTxc7OY7Rd1h0Tzjos="
+
},
+
"x86_64-darwin": {
+
"artifact-suffix": "native-mac-amd64",
+
"hash": "sha256-zctTOVxFghF9z9PUQt3OO20Ul/qY8H/j6MPpFNpw+Ow="
+
},
+
"aarch64-linux": {
+
"artifact-suffix": "native-linux-aarch64",
+
"hash": "sha256-E+IMTkRP1a1TigpRyVHPu0assgHEbzbF8lv7Rsm2FOM="
+
},
+
"x86_64-linux": {
+
"artifact-suffix": "native-linux-amd64",
+
"hash": "sha256-rgAqlTCZc8nedUU2D+Klo3KY0z9sI0KJczdaugM3//8="
+
}
+
}