Loading pkgs/by-name/mi/mill/package.nix +32 −20 Original line number Diff line number Diff line { lib, stdenv, autoPatchelfHook, fetchurl, jre, lib, makeWrapper, sourcesJSON ? ./sources.json, stdenvNoCC, zlib, }: stdenv.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: { pname = "mill"; version = "0.12.14"; version = "1.0.4"; src = fetchurl { url = "https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${finalAttrs.version}/mill-dist-${finalAttrs.version}.exe"; hash = "sha256-2MyufFcgKH/bxVB83qXNESByAdgbzhyIHqAr36Bb9o0="; 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; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ zlib ]; nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook; dontUnpack = true; dontConfigure = true; Loading @@ -26,19 +37,14 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall install -Dm555 "$src" "$out/bin/.mill-wrapped" install -Dm 555 $src $out/bin/.mill-wrapped # can't use wrapProgram because it sets --argv0 makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \ makeWrapper $out/bin/.mill-wrapped $out/bin/mill \ --prefix PATH : "${jre}/bin" \ --set JAVA_HOME "${jre}" runHook postInstall ''; --set-default JAVA_HOME "${jre}" 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 runHook postInstall ''; meta = with lib; { Loading @@ -57,6 +63,12 @@ stdenv.mkDerivation (finalAttrs: { scalavision zenithal ]; platforms = lib.platforms.all; platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; }) pkgs/by-name/mi/mill/sources.json 0 → 100644 +18 −0 Original line number Diff line number Diff line { "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=" } } Loading
pkgs/by-name/mi/mill/package.nix +32 −20 Original line number Diff line number Diff line { lib, stdenv, autoPatchelfHook, fetchurl, jre, lib, makeWrapper, sourcesJSON ? ./sources.json, stdenvNoCC, zlib, }: stdenv.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: { pname = "mill"; version = "0.12.14"; version = "1.0.4"; src = fetchurl { url = "https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${finalAttrs.version}/mill-dist-${finalAttrs.version}.exe"; hash = "sha256-2MyufFcgKH/bxVB83qXNESByAdgbzhyIHqAr36Bb9o0="; 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; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ zlib ]; nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook; dontUnpack = true; dontConfigure = true; Loading @@ -26,19 +37,14 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall install -Dm555 "$src" "$out/bin/.mill-wrapped" install -Dm 555 $src $out/bin/.mill-wrapped # can't use wrapProgram because it sets --argv0 makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \ makeWrapper $out/bin/.mill-wrapped $out/bin/mill \ --prefix PATH : "${jre}/bin" \ --set JAVA_HOME "${jre}" runHook postInstall ''; --set-default JAVA_HOME "${jre}" 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 runHook postInstall ''; meta = with lib; { Loading @@ -57,6 +63,12 @@ stdenv.mkDerivation (finalAttrs: { scalavision zenithal ]; platforms = lib.platforms.all; platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; })
pkgs/by-name/mi/mill/sources.json 0 → 100644 +18 −0 Original line number Diff line number Diff line { "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=" } }