nixpkgs/pkgs/by-name/ig/igv/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchzip, jdk17, testers, wrapGAppsHook3, igv }:
stdenv.mkDerivation rec {
pname = "igv";
version = "2.17.4";
src = fetchzip {
url = "https://data.broadinstitute.org/igv/projects/downloads/${lib.versions.majorMinor version}/IGV_${version}.zip";
sha256 = "sha256-LF/rwm/XlLHAJjiAlQVTmx5l+5Np2b5rPjoCdN/qERU=";
};
installPhase = ''
mkdir -pv $out/{share,bin}
cp -Rv * $out/share/
sed -i "s#prefix=.*#prefix=$out/share#g" $out/share/igv.sh
sed -i 's#\bjava\b#${jdk17}/bin/java#g' $out/share/igv.sh
sed -i "s#prefix=.*#prefix=$out/share#g" $out/share/igvtools
sed -i 's#\bjava\b#${jdk17}/bin/java#g' $out/share/igvtools
ln -s $out/share/igv.sh $out/bin/igv
ln -s $out/share/igvtools $out/bin/igvtools
chmod +x $out/bin/igv
chmod +x $out/bin/igvtools
'';
nativeBuildInputs = [ wrapGAppsHook3 ];
passthru.tests.version = testers.testVersion {
package = igv;
};
meta = with lib; {
homepage = "https://www.broadinstitute.org/igv/";
description = "Visualization tool for interactive exploration of genomic datasets";
license = licenses.mit;
platforms = platforms.unix;
maintainers = [ maintainers.mimame ];
};
}