about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-01-09 13:03:34 +0300
committerK900 <me@0upti.me>2024-01-09 13:03:34 +0300
commitbff9ee8862ff6df90bddaeca8369b2e1d332ce4e (patch)
tree7871f44f20037afe7fc5cd1d600f51739e3147a7 /pkgs/development/compilers
parentc999add543505bfad4d2c7be9583010225d2527e (diff)
parent1e4909f24b8cb50442c769624ae3d3a4629635f2 (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/jasmin/default.nix46
-rw-r--r--pkgs/development/compilers/rust/cargo.nix3
2 files changed, 33 insertions, 16 deletions
diff --git a/pkgs/development/compilers/jasmin/default.nix b/pkgs/development/compilers/jasmin/default.nix
index 01f09772a84ec..db58f48b97bbf 100644
--- a/pkgs/development/compilers/jasmin/default.nix
+++ b/pkgs/development/compilers/jasmin/default.nix
@@ -1,31 +1,49 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchurl
 , unzip
-, jdk8
 , ant
+, jdk8
 , makeWrapper
+, canonicalize-jars-hook
 , callPackage
 }:
 
-let jre = jdk8.jre; jdk = jdk8; in
-stdenv.mkDerivation rec {
+let
+  jdk = jdk8;
+  jre = jdk8.jre;
+
+in stdenv.mkDerivation (finalAttrs: {
   pname = "jasmin";
   version = "2.4";
 
   src = fetchurl {
-    url = "mirror://sourceforge/jasmin/jasmin-${version}/jasmin-${version}.zip";
-    sha256 = "17a41vr96glcdrdbk88805wwvv1r6w8wg7if23yhd0n6rrl0r8ga";
+    url = "mirror://sourceforge/jasmin/jasmin-${finalAttrs.version}.zip";
+    hash = "sha256-6qEMaM7Gggb9EC6exxE3OezNeQEIoblabow+k/IORJ0=";
   };
 
-  nativeBuildInputs = [ unzip jdk ant makeWrapper ];
+  nativeBuildInputs = [
+    unzip
+    ant
+    jdk
+    makeWrapper
+    canonicalize-jars-hook
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    ant all
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
 
-  buildPhase = "ant all";
-  installPhase =
-  ''
     install -Dm644 jasmin.jar $out/share/java/jasmin.jar
-    mkdir -p $out/bin
     makeWrapper ${jre}/bin/java $out/bin/jasmin \
       --add-flags "-jar $out/share/java/jasmin.jar"
+
+    runHook postInstall
   '';
 
   passthru.tests = {
@@ -34,11 +52,11 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An assembler for the Java Virtual Machine";
-    homepage = "https://jasmin.sourceforge.net/";
     downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
+    homepage = "https://jasmin.sourceforge.net/";
     license = licenses.bsd3;
+    mainProgram = "jasmin";
     maintainers = with maintainers; [ fgaz ];
     platforms = platforms.all;
   };
-}
-
+})
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index ff0ecf45fd235..1377cfad6c6c1 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -98,8 +98,7 @@ rustPlatform.buildRustPackage.override {
   # Disable check phase as there are failures (4 tests fail)
   doCheck = false;
 
-  doInstallCheck = !stdenv.hostPlatform.isStatic &&
-    stdenv.hostPlatform.parsed.kernel.execFormat == lib.systems.parse.execFormats.elf;
+  doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
   installCheckPhase = ''
     runHook preInstallCheck
     readelf -a $out/bin/.cargo-wrapped | grep -F 'Shared library: [libcurl.so'