diff options
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/jasmin/default.nix | 46 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/cargo.nix | 3 |
2 files changed, 33 insertions, 16 deletions
diff --git a/pkgs/development/compilers/jasmin/default.nix b/pkgs/development/compilers/jasmin/default.nix index 01f09772a84e..db58f48b97bb 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 ff0ecf45fd23..1377cfad6c6c 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' |