mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 06:23:36 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, unzip
|
|
, ant
|
|
, jdk8
|
|
, makeWrapper
|
|
, stripJavaArchivesHook
|
|
, callPackage
|
|
}:
|
|
|
|
let
|
|
jdk = jdk8;
|
|
jre = jdk8.jre;
|
|
|
|
in stdenv.mkDerivation (finalAttrs: {
|
|
pname = "jasmin";
|
|
version = "2.4";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/jasmin/jasmin-${finalAttrs.version}.zip";
|
|
hash = "sha256-6qEMaM7Gggb9EC6exxE3OezNeQEIoblabow+k/IORJ0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
unzip
|
|
ant
|
|
jdk
|
|
makeWrapper
|
|
stripJavaArchivesHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
ant all
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm644 jasmin.jar $out/share/java/jasmin.jar
|
|
makeWrapper ${jre}/bin/java $out/bin/jasmin \
|
|
--add-flags "-jar $out/share/java/jasmin.jar"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
minimal-module = callPackage ./test-assemble-hello-world {};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Assembler for the Java Virtual Machine";
|
|
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;
|
|
};
|
|
})
|